[英]Can install gem ruby-debug, but rails server can't find it
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 系统是最新的Ubuntu 11.04
你把这个宝石放在应用程序的Gemfile中了吗?
I solved this problem by installing the irb package. 我通过安装irb包解决了这个问题。 The error message was about ruby-debug, but once I installed the debian packed for irb all was fine.
错误消息是关于ruby-debug,但是一旦我安装了为irb打包的debian,一切都很好。
I had exactly the same problem. 我有完全相同的问题。 The reason was that in the application's Gemfile, the line "gem 'ruby-debug'" was commented out.
原因是在应用程序的Gemfile中,“gem'ruby-debug'”行被注释掉了。 I enabled this line and everything worked fine.
我启用了这一行,一切正常。
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.
我尝试将脚本/服务器作为sudo运行,并且工作正常,奇怪的是之后我能够以普通用户身份运行它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.