无法再运行OSX上红宝石

无法再运行OSX上红宝石

问题描述:

我想跑,我之前运行多少次的Ruby脚本,但收到以下错误:无法再运行OSX上红宝石

~/dev/ruby > ruby foo.rb 
Could not find backports-2.3.0 in any of the sources 
Run `bundle install` to install missing gems. 
~/dev/ruby > bundle install 
Could not find backports-2.3.0 in any of the sources 
Run `bundle install` to install missing gems. 
~/dev/ruby > rvm list 

rvm rubies 

    ruby-1.8.6-p399 [ i686 ] 
    ruby-1.8.7-p249 [ i686 ] 
    ruby-1.8.7-p334 [ i686 ] 
    ruby-1.9.1-p378 [ i386 ] 
=> ruby-1.9.2-p180 [ x86_64 ] 
* ruby-1.9.2-p290 [ x86_64 ] 
    ruby-1.9.2-preview1 [ i386 ] 
    ruby-1.9.3-p0 [ x86_64 ] 
    ruby-1.9.3-p125 [ x86_64 ] 

# => - current 
# =* - current && default 
# * - default 

我,因为运行此并没有改变我的任何RVM设置程序最后并没有对backports-2.3.0做任何事情。

我目前使用RVM 1.10.3运行OSX 10.6.8。尝试执行任何ruby命令时出现错误。

+0

当你运行irb时会发生什么? – Maz 2012-03-19 03:18:54

+0

当您尝试使用其他ruby版本时会发生什么? – 2012-03-19 04:21:36

+0

@Maz,运行irb会产生相同的消息在任何源中找不到backports-2.3.0 运行'bundle install'安装缺失的gem。 – 2012-03-20 02:44:58

也许你需要在你的Gemfile的顶部包含source :rubygems

+0

我确信包括在内,并仍然得到相同的错误。 – 2012-03-20 03:02:31

+0

当你尝试'gem update --system'然后'gem install backports -v'2.3.0''时会发生什么? – 2012-03-20 12:06:32

+0

Ruby现在正在重新开始工作。我不知道为什么。 – 2012-03-25 05:52:52

检查的Gemfile,确保它读取这个

gem "backports", "~> 2.3.0" 

然后再次运行包。 如果问题仍然存在尝试

sudo gem uninstall backports 

然后运行包重新安装。

+0

须藤宝石卸载backports中 密码: 错误:在执行宝石...(GEM :: InstallError) 无法卸载,检查'-d backports' 〜的/ dev /宝石>宝石列表-d backports中的宝石列表 未能进行在任何源中找到rack-1.3.5 运行'bundle install'安装缺失的gems。 – 2012-03-20 03:04:24

+0

嗯...非常pecuilar它看起来像缺少重要的东西,查看列表并尝试一次一个地安装依赖关系,宝石应该已经弄清楚了,但是其他地方可能会出现一些问题。从机架开始。 – lukecampbell 2012-03-20 14:04:32

+0

Ruby现在正在重新工作。我不知道为什么。 – 2012-03-25 05:52:38