Remote debugging with Rails 3.1
I am trying to remote debug with Rails 3.1
I run this:
rdebug-ide --port 1234 -- /usr/bin/rails server
and then nothing happens, i watch top and it doesn't load rails, it just sits there. I can't connect with . (I checked port is open using netcat & telnet)
I ran just /usr/bin/rails and when I control-c it does give me the proper output, so i guess it took the 'server' option, but still nothing happens
Then I control-c twice to quit and this is stacktrace:
Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.11) listens on 127.0.0.1:1234
^C^C/usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/activesupport-3.1.3/lib/active_support/core_ext/string/multibyte.rb:2:in `require': Interrupt
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/activesupport-3.1.3/lib/active_support/core_ext/string/multibyte.rb:2:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/activesupport-3.1.3/lib/active_support/inflector/transliterate.rb:2:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/activesupport-3.1.3/lib/active_support/inflector/transliterate.rb:2:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/activesupport-3.1.3/lib/active_support/inflector.rb:3:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/activesupport-3.1.3/lib/active_support/inflector.rb:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/railtie.rb:3:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/railtie.rb:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/engine.rb:1:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/engine.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/plugin.rb:1:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/plugin.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/application.rb:4:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/application.rb:4:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails.rb:10:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails.rb:10:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/all.rb:1:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/all.rb:1:in `<top (required)>'
from /vagrant/config/application.rb:3:in `require'
from /vagrant/config/application.rb:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/commands.rb:52:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/commands.rb:52:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/commands.rb:49:in `tap'
from /usr/local/rvm/gems/ruby-1.9.2-p290-patched/gems/railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:5:in `require'
from script/rails:5:in `<main>'
请先登录再写评论。
Also after running that, there is nothing listening on port 3000, but it is listening on port 1234
(i checked by running lsof)
With Rails 3 the 'rails' command is from the gem bin, so I tried:
/usr/lib/ruby/gems/1.9.1/gems/rails-3.1.3/bin/rails s
that still didn't work
Also after running that, there is nothing listening on port 3000, but it is listening on port 1234
(i checked by running lsof)
With Rails 3 the 'rails' command is from the gem bin, so I tried:
/usr/lib/ruby/gems/1.9.1/gems/rails-3.1.3/bin/rails s
that still didn't work
---
Original message URL: http://devnet.jetbrains.net/message/5443174#5443174
I looked closer at the command line and solved it by calling with -h 0.0.0.0
I was using with vagrant and the virtualbox port forwarding so I thought it would work on localhost, but it still needed 0.0.0.0.
Unicorn BTW doesn't work, but thin, mongrel & webbrick work fine