[英]Can not downgrade bundler for heroku
我試圖將我的項目推送到heroku,但出現此錯誤。
Your Ruby version is 2.3.0, but your Gemfile specified 2.3.0
remote: Bundler Output: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
我也在使用rvm。
似乎heroku捆綁軟件使用1.11.2,因此我正嘗試將我的版本從1.12.5降級。
我做了寶石卸載捆綁器,然后做了寶石安裝捆綁器-版本'1.11.2'
但是,當我使用bundler -v時,它仍顯示1.12.5
但是當我執行gem uninstall bundler時,它顯示成功卸載bundler-1.11.2
我仍然無法推送,並且遇到了該錯誤。 請幫忙。
請按照以下步驟操作;
http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html
另外,我認為您的捆綁軟件已安裝在rvm默認gemset(即系統gemset)中。
嘗試檢查一下;
在終端中執行rvm list
,這將為您提供如下輸出;
rvm rubies
ruby-2.0.0-p643 [ x86_64 ]
=* ruby-2.1.4 [ x86_64 ]
ruby-2.2.1 [ x86_64 ]
ruby-2.2.4 [ x86_64 ]
現在執行rvm gemset列表; 這會給你這樣的結果;
(default)
global
some-gemset
檢查系統中使用了哪個gemset,只要您執行rvm gemset list
,就可以將其標識為=> global
。
現在,當您確定當前所在的gemset時,請rvm use 1.9.2@global
類似rvm use 1.9.2@global
然后;
gem uninstall bundler
或者,您可以像這樣一步完成;
rvm @global do gem uninstall bundler
然后安裝所需的捆綁程序版本,如下所示:
gem install bundler --version '1.11.2'
希望這對您有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.