Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Bundler找不到gem的兼容版本;捆扎机“;_Ruby On Rails_Ruby - Fatal编程技术网

Ruby on rails Bundler找不到gem的兼容版本;捆扎机“;

Ruby on rails Bundler找不到gem的兼容版本;捆扎机“;,ruby-on-rails,ruby,Ruby On Rails,Ruby,尝试将新的gem安装到rails应用程序中,无论我是从gem文件中添加还是删除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: bu

尝试将新的gem安装到rails应用程序中,无论我是从gem文件中添加还是删除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`? Bundler找不到gem“Bundler”的兼容版本: 在文件中: rails(=3.0.0)ruby依赖于 绑定器(~>1.0.0)ruby 当前绑定程序版本: 捆扎机(1.3.5) 此文件需要不同版本的Bundler。 也许您需要通过运行“gem安装Bundler”来更新Bundler? 我很困惑,因为
~>1.0.0
意味着我必须有一个
bundler
版本等于或大于1.0.0但小于2.x.x。我满足了这个要求,为什么失败了呢

另外,如果我保持GEM文件的原样,
bundle install
工作正常

更新


显然,我误解了~>符号。您可以查看下面的检查答案以获得解释,或者更深入的解释,实际上
~>1.0.0
等于
=1.0.0
&
<1.1
,因此1.3.5不匹配。您需要另一个bundler版本。

现在仍然会出现同样的问题,当您无法更新应用程序以使用更新的bundler版本时,这里有一个具体的解决方案: