2014-02-14 107 views
0

試圖安裝一個新的寶石到rails應用程序,無論我是否從Gemfile中添加或刪除寶石,當我運行bundle install時,出現以下錯誤:Bundler無法找到兼容版本的寶石「捆綁」

 
Bundler could not find compatible versions for gem "bundler": 
    In Gemfile: 
    rails (= 3.0.0) ruby depends on 
     bundler (~> 1.0.0) ruby 

    Current Bundler version: 
    bundler (1.3.5) 

This Gemfile requires a different version of Bundler. 
Perhaps you need to update Bundler by running `gem install bundler`? 

我很困惑,因爲~> 1.0.0意味着,我必須有一個版本的bundler等於或大於1.0.0但小於2.xx的我正在滿足這個要求,那麼它爲什麼會失敗呢?

只需要添加,如果我離開Gemfile,bundle install工作得很好。

UPDATE

顯然,我誤解〜>符號。你可以看一下檢查的回答下面的解釋,或者在Meaning of tilde-greater-than (~>) in version requirement?

回答

0

一個更深入的一個事實上~> 1.0.0等於>= 1.0.0 & & < 1.1,所以1.3.5不匹配。您需要另一個捆綁器版本。

相關問題