2012-03-19 94 views
0

我想跑,我之前運行多少次的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

回答

0

也許你需要在你的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

0

檢查的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