Tuesday, May 22, 2012

Debugging Rails with Passanger and Apache

Some of the threads I was following seem old, so maybe what I am trying to do has been superseded by something else--if that is the case, please let me know!



I just reinstalled a Rails app on a new server, but this time am using Apache and Passenger. Rails version 1.8.7, Apache2, and Passenger on a Ubuntu 12.04 server. I would like to still have a debugger, so I tried following this thread:



http://chrisadams.me.uk/2009/04/28/how-to-set-up-a-debugger-with-mod_railspassenger/
http://duckpunching.com/passenger-mod_rails-for-development-now-with-debugger
(the original article)



I'm pretty sure I followed this exactly, and my files are correct. But I am getting two discrepencies. First, when I refresh my webpage, my site does not hang (as stated on the duckpunching page)...second, when I put in:



rdebug -c


I get the following error:



/usr/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug.rb:109:in initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug.rb:109:in
new'
from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug.rb:109:in start_client'
from /usr/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/bin/rdebug:336
from /usr/bin/rdebug:23:in
load'
from /usr/bin/rdebug:23



So I feel like my terminal is not automatically connecting somehow? As I stated, I can't really find updated information online about this problem, so any help is appreciated in either making this work (console-type debugging for Apache / Passenger, like what I had with WEBrick) or current best-practices. Thanks!





No comments:

Post a Comment