Wire Level Debug for ActiveResource

Posted by dave
on February 13, 2007 @ 08:08 AM

ActiveResource provides the mechanism to implement RESTful Ruby clients in Rails 1.2. If you want to see wire level debug output from the Net::HTTP layer you can enable it by editing:


[activeresource]/lib/activeresource/connection.rb

Add the set_debug_output line to the (private) http method.

1
2
3
4
5
6
7
8
9
10
11
12

     def http
        unless @http
          @http             = Net::HTTP.new(@site.host, @site.port)
          @http.use_ssl     = @site.is_a?(URI::HTTPS)
          @http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @http.use_ssl
          # enable debug http wirelevel dumps
          @http.set_debug_output $stderr
        end

        @http
      end
Very handy for debugging ActiveResource with a Rails console.

Switched to Mephisto

Posted by dave
on February 06, 2007 @ 10:18 PM
Thanks to Bluehosts shenanigans of upgrading the underlying version of Rails without any notice, I've had to say farewell to Typo. I've made the switch to Mephisto. Still managed to keep the Scribbish theme but live search is no more and theres a couple of other issues to sort out (haven't managed to get the del.icio.us plugin working yet).

Theme hosed 0

Posted by dave
on February 05, 2007 @ 06:18 AM
Looks like Bluehost upgraded Rails on my hosting box to 1.2. My scribbish Typo theme is none to pleased so thats why everything looks woeful. Hopefully will get it fixed when get a spare minute.