无法为ruby-debug-base找到有效的gem

时间:2017-08-24 22:10:32

标签: ruby-on-rails ruby rubygems

我正在尝试安装ruby-debug gem,要求ruby-debug-base作为依赖项。

gem install ruby-debug错误:

ERROR:  Could not find a valid gem 'ruby-debug-base' (~> 0.10.6.0) in any repository
ERROR:  Possible alternatives: ruby-debug-base

Ruby版本:2.3.1,which ruby打印:

/Users/my-name/.rvm/rubies/ruby-2.3.1/bin/ruby

尝试添加

source :rubyforge     
source 'http://gems.rubyforge.org' 

到我的Gemfile,as seen in a similar question, here

当我尝试使用gem install ruby-debug -v 0.10.5.rc9安装旧版本的gem时,我收到错误:

Ruby version 2.3.1 is too new

我已尝试安装ruby-debug-base,但遇到错误:

    current directory: /Users/my-name/.rvm/gems/ruby-2.3.1/gems/linecache-1.3.1/ext/linecache
/Users/my-name/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170824-39487-dus4av.rb extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***

1 个答案:

答案 0 :(得分:1)

gem 'debugger'放在Gemfile中或安装它仅用于开发。

group :development do
  gem 'debugger'
end
  

仅支持1.9.2和1.9.3。对于2.X红宝石,请考虑使用   byebug

即使是调试器gem的维护者也提出了这个建议。看here