Can install gem ruby-debug, but rails server can't find it

2.9k views Asked by At

I found a pretty interesting problem installing ruby gems

bluehat@Matapan:~/code/Amacron$ rails server --debugger
=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
Exiting
bluehat@Matapan:~/code/Amacron$ sudo gem install ruby-debug
Successfully installed ruby-debug-0.10.4
1 gem installed
Installing ri documentation for ruby-debug-0.10.4...
Installing RDoc documentation for ruby-debug-0.10.4...
bluehat@Matapan:~/code/Amacron$ rails server --debugger
=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
Exiting
bluehat@Matapan:~/code/Amacron$ sudo gem update ruby-debug
Updating installed gems
Nothing to update
bluehat@Matapan:~/code/Amacron$ gem --version
1.3.7
bluehat@Matapan:~/code/Amacron$ rails --version
Rails 3.0.3

System is an up-to-date Ubuntu 11.04

4

There are 4 answers

4
Ryan Bigg On BEST ANSWER

Did you put this gem in your application's Gemfile?

0
Julia Zhao On

I had exactly the same problem. The reason was that in the application's Gemfile, the line "gem 'ruby-debug'" was commented out. I enabled this line and everything worked fine.

0
bissej On

I solved this problem by installing the irb package. The error message was about ruby-debug, but once I installed the debian packed for irb all was fine.

0
jbee On

I was having a similar issue. I tried running script/server as sudo, and that worked fine, and oddly after that I was able to run it as my regular user.