[英]Bundler could not find compatible versions for gem “bundler”
Trying to install a new gem into a rails app and regardless of whether I add or remove a gem from the Gemfile, when I run bundle install
, I get the following error: 尝试将新的gem安装到Rails应用程序中时,无论我是从Gemfile中添加还是删除gem,当我运行
bundle install
,都会出现以下错误:
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`?
I am confused, because ~> 1.0.0
means that I have to have a version of bundler
equal to or greater than 1.0.0 but less than 2.xx I'm fulfilling this requirement, so why is it failing? 我很困惑,因为
~> 1.0.0
意味着我必须拥有等于或大于1.0.0但小于2.xx的bundler
版本,我满足了这一要求,为什么会失败?
Just to add, if I leave the Gemfile as is, bundle install
works just fine. 只需添加一下,如果我将Gemfile保留原样,
bundle install
就可以了。
UPDATE 更新
Clearly, I misunderstood the ~> symbol. 显然,我误会了〜>符号。 You can look at the checked answer below for an explanation, or an even more in depth one at Meaning of tilde-greater-than (~>) in version requirement?
您可以查看以下已检查的答案以获得解释,或者更深入地了解版本要求中“ tilde-greater-than(〜>)”的含义?
Actually ~> 1.0.0
is equal to >= 1.0.0
&& < 1.1
, so 1.3.5 doesn't match. 实际上
~> 1.0.0
等于>= 1.0.0
&& < 1.1
,因此1.3.5不匹配。 You need another bundler version. 您需要另一个捆绑软件版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.