RVM ruby 1.8.7 running debugger fails when starting web server
When using RVM with ruby 1.8.7 I am unable to run the debugger. I am using rails 2.3.9 and mongrel
script/server --debugger
returns: You need to install ruby-debug to run the server in debugging开发者_运维百科 mode. With gems, use 'gem install ruby-debug'
this is what my gem list looks like: ruby-debug (0.10.3) ruby-debug-base (0.10.3)
Do you have rvm
configured correctly?
Run which gem
to check you are using the rvm
version of gem
. When you run gem install ruby-debug
, what happens?
Check the permissions on the files/folders in your $GEM_HOME
as well to make sure they are readable by you - I've had problems with gems being installed as root read-only before.
Edit
Try running sudo ./script/server --debugger
to make sure it isn't a permissions issue.
Can you debug a basic ruby script successfully?
$ cat test.rb
#!/path/to/ruby
debugger
puts 'Hello world'
$ rdebug /path/to/test.rb
Can you run rdebug ./script/server
?
精彩评论