【发布时间】:2018-05-08 09:39:14
【问题描述】:
我有一个使用 Ruby 1.9.3p327 和 Rails 3.2.11 的 Ruby on Rails 应用程序。我正在尝试为 Sublime Text 使用 Ruby 调试器插件。我安装了“调试器”gem。我的项目中没有“ruby-debug19”gem。这是我的 Gemfile 中的一个 sn-p。
group :development do
gem 'debugger'
end
我的 Gemfile.lock 有:
debugger (1.6.1)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.3)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.3)
当我尝试启动 Webrick 时,
rails s -e development --debugger
打印错误:
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
我读到这个问题是由“ruby-debug”gem引起的,解决方案是改用“debugger”gem,但这正是我正在做的。
【问题讨论】:
-
愚蠢的问题 - 你安装了 gem 还是将它添加到你的 gemfile 中?
-
如果没有,则运行“gem install ruby-debug”或“bundle install”来安装 gemfile 中的所有 gem
-
你有什么问题?
-
@Mark 调试器 gem 已安装。如果我运行“gem list -l”,我可以在列表中看到它:
-
@sawa 我的问题是:即使我根据 Ruby 和 Rails 版本安装了“调试器 gem”,为什么 Ruby 还要我提供“ruby-debug”gem?
标签: ruby-on-rails ruby rubygems ruby-debug