Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.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 即使我更改了版本,Bundler也找不到gem的兼容版本_Ruby - Fatal编程技术网

Ruby 即使我更改了版本,Bundler也找不到gem的兼容版本

Ruby 即使我更改了版本,Bundler也找不到gem的兼容版本,ruby,Ruby,我正在尝试更新到最新的google vision,因此我添加了以下文件: gem 'google-cloud-vision', '~> 0.28.0' 但是,当我运行bundle安装时,会出现以下错误: Bundler在中找不到gem“faraday”的兼容版本 档案: 谷歌云视觉(~>0.28.0)ruby依赖于 谷歌云核心(~>1.2)ruby依赖于 谷歌云环境(~>1.0)ruby依赖于 法拉第(~>0.11)红宝石 我也尝试过使用最新版本的forecast: gem 'forec

我正在尝试更新到最新的google vision,因此我添加了以下文件:

gem 'google-cloud-vision', '~> 0.28.0'
但是,当我运行bundle安装时,会出现以下错误:

Bundler在中找不到gem“faraday”的兼容版本 档案: 谷歌云视觉(~>0.28.0)ruby依赖于 谷歌云核心(~>1.2)ruby依赖于 谷歌云环境(~>1.0)ruby依赖于 法拉第(~>0.11)红宝石

我也尝试过使用最新版本的forecast:

gem 'forecast_io', '~> 2.0', '>= 2.0.2'
我知道两种不同的宝石需要两种不同版本的法拉第。但bundler不应该解决这个问题吗?

根据

更新指定的gems(如果未指定,则更新所有gems),忽略Gemfile.lock中指定的先前安装的gems。通常,您应该使用bundle install(1)跨机器安装相同的gems和版本

您可以使用bundle update显式更新gem的版本


因此,使用
bundle update google cloud vision
将gem更新为新版本。

不,这不是一个好主意,因为bundle更新也必须在生产机器中进行,这意味着运行的命令将只是“bundle update”
bundle update google cloud vision
不更新Gemfile,但要更新gem版本并解决依赖关系。
gem 'forecast_io', '~> 2.0', '>= 2.0.2'