[英]How to specify version of bundler for bundle install
當我嘗試捆綁新項目的 gemfile 時,我得到:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler-audit was resolved to 0.6.0, which depends on
bundler (~> 1.2)
rails (~> 5.2) was resolved to 5.2.1, which depends on
bundler (>= 1.3.0)
Current Bundler version:
bundler (2.0.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.2)', which is required by gem 'rails (~>
5.2)', in any of the sources.
結果我運行gem install bundler '~> 1.2'
。 現在,當我運行gem list bundler
,我有這兩個版本 2.0.2, 1.17.3 我知道想將我的 gemfile 與版本 1.17.3 bundle _1.17.3_ install
但是當我運行bundle _1.17.3_ install
,我得到: Could not find command "_1.17.3_"
。 我在這里做錯了什么? 我該如何解決? 有沒有辦法直接在我的 rails 項目中指定它應該下載和解決依賴項的捆綁程序版本?
是的,我在第二個問題上也遇到了同樣的問題,我試圖從github檢索舊的工作以進行升華,而當我嘗試運行服務器時也收到了相同的消息。
嘗試gem install bundler -v 1.17.3
然后bundle _1.17.3_ install
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.