我刚刚更新到Ruby 1.9.3p0和Rails 3.1.1.现在,当我try 启动服务器时,它抱怨我应该安装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

我的档案里有

# 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日)

try 使用新的debuggergem替代ruby调试.

(credit to @ryanb)


更新(2012年3月2日)

linecache19和ruby-debug-base19的安装可以通过以下方式轻松完成:

bash < <(curl -L https://raw.github.com/gist/1333785)

(credit to @fredostarr)


原始答案

你看过ruby-debug19 on ruby-1.9.3-preview1了吗?

这里有一个临时解决方案:

网站摘录:

首先下载linecache19-0.5.13.Ruby 和

$ 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

Ruby-on-rails相关问答推荐

如何判断是否定义了Rails模型?

使用RubyZip处理大型压缩文件:65535个文件的限制

Gemfile需要较新版本的依赖项

URL 中的 Rails slugs - 使用 Active Record Model Post 的 Title 属性而不是 ID

您将如何在 Ruby on Rails 应用程序中使用 rSpec 测试观察者?

有没有办法在 Rails 3.1 中检测用户代理

是否可以在 Rails 中否定范围?

如何在 Windows 上为 Ruby 安装 sqlite3?

在 rake 任务期间关闭观察者的简单方法?

关于在不适合任何地方的 Rails 应用程序中放置类的指南

如何在rails中异步加载部分页面

批量查找 mongoDB 记录(使用 mongoid ruby​​ 适配器)

如何让 ActiveAdmin 使用强参数?

如何在 ROR (Ruby) 中显示 PDF?

Groovy/Grails :: Ruby/Rails :: 2011 框架状态

Rails,设计认证,CSRF 问题

counter_cache 实现的问题

Rspec - Rails - 如何遵循重定向

Heroku Postgres 错误:PGError:错误:关系组织不存在(ActiveRecord::StatementInvalid)

如何设置 MiniTest?