加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – Ruby调试器安装帮助!

发布时间:2020-12-17 04:31:06 所属栏目:百科 来源:网络整理
导读:我安装 ruby-debugger但是在那之后,当我尝试使用“–debugger”选项启动rails服务器时,我得到一个控制台错误,说没有安装ruby-debugger,请参阅下面的日志: – :~/work_space/rails_apps/Bidding_sys_remaining$sudo gem install ruby-debug Building native
我安装 ruby-debugger但是在那之后,当我尝试使用“–debugger”选项启动rails服务器时,我得到一个控制台错误,说没有安装ruby-debugger,请参阅下面的日志: –
:~/work_space/rails_apps/Bidding_sys_remaining$sudo gem install ruby-debug    <<<<<<<

Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
Successfully installed columnize-0.3.2
Successfully installed linecache-0.43
Successfully installed ruby-debug-base-0.10.4
Successfully installed ruby-debug-0.10.4
4 gems installed
Installing ri documentation for columnize-0.3.2...
Installing ri documentation for linecache-0.43...
Installing ri documentation for ruby-debug-base-0.10.4...
Installing ri documentation for ruby-debug-0.10.4...
Installing RDoc documentation for columnize-0.3.2...
Installing RDoc documentation for linecache-0.43...
Installing RDoc documentation for ruby-debug-base-0.10.4...
Installing RDoc documentation for ruby-debug-0.10.4...

:~/work_space/rails_apps/Bidding_sys_remaining$
:~/work_space/rails_apps/Bidding_sys_remaining$rails server --debugger
=> Booting WEBrick
=> Rails 3.0.1 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'

退出

这是我第一次尝试使用rails调试器.
还有任何建议的链接,以获得帮助开始使用rails调试器任何新手指南?

解决方法

确保在Gemfile中包含gem
gem 'ruby-debug' # for ruby 1.8.7+    
gem 'ruby-debug19' # for ruby 1.9.2+

然后运行bundle install

更新:

您也可以将它添加到您的Gemfile中,它将处理两个ruby版本.

gem 'ruby-debug19',:require => 'ruby-debug',:platforms => :mri_19
  gem 'ruby-debug',:platforms => :mri_18

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读