我刚刚更新到 Ruby 1.9.3p0 和 Rails 3.1.1。现在,当我尝试启动服务器时,它抱怨我应该安装ruby-debug
,即使它已经安装了。
% rails server --environment=development --debug
=> Booting WEBrick
=> Rails 3.1.0 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
在我的 Gemfile 中我有
# see: http://stackoverflow.com/questions/1083451/debugging-in-ruby-1-9
gem 'ruby-debug-base19', "0.11.24"
gem 'ruby-debug19', "0.11.6"
是否可以使用最新版本的 Ruby 运行调试?
更新(2012 年 4 月 28 日)
尝试新的debuggergem 作为 ruby-debug 的替代品。
(credit to @ryanb)
更新(2012 年 3 月 2 日)
linecache19 和 ruby-debug-base19 的安装可以轻松完成:
bash < <(curl -L https://raw.github.com/gist/1333785)
(credit to @fredostarr)
原答案
你看过吗ruby-1.9.3-preview1 上的 ruby-debug19?
这是一个临时解决方案:http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
网站摘录:
首先下载linecache19-0.5.13.gem并
ruby-debug-base19-0.11.26.gem 来自http://rubyforge.org/frs/?group_id=8883, then …
$ gem install linecache19-0.5.13.gem
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.13
1 gem installed
$ gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/Users/santiago/.rbenv/source/ruby-1.9.3-p0
Building native extensions. This could take a while...
Successfully installed ruby-debug-base19-0.11.26
1 gem installed
$ irb
irb(main):001:0> require 'ruby-debug'
=> true
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)