我如何才能找出为什么一个gem包已经锁定了一个特定版本的宝石? [英] How can I find out why a gem bundle has locked a gem at a specific version?
问题描述
我试图在我的gem文件中指定一个节俭宝石版本。
I'm trying to specify a version of the thrift gem in my gem file.
gem 'thrift', "~> 0.6.0"
当我尝试运行 bundle install
时,出现此错误:
When I trying to run bundle install
, I get this error:
You have requested:
thrift ~> 0.6.0
The bundle currently has thrift locked at 0.5.0.
Try running `bundle update thrift`
如何找出导致它的原因被锁定在早期版本?它会在我在gem文件中列出的另一个gem的要求中吗?
How can I find out what is causing it to be locked at the earlier version? Would it be in the requirements of another gem I have listed in the gem file?
或者它仅仅是由于安装的版本是0.5.0,并在gem文件中指定版本不会更新已安装的gem?
Or is it just being caused by the fact that the installed version is 0.5.0, and specifying a version in the gem file won't update an installed gem?
推荐答案
原来只运行 bundle update thrift
会告诉你什么是锁定版本:
Turns out just running bundle update thrift
will show you what is locking the version:
$ bundle update thrift
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "thrift":
In Gemfile:
evernote depends on
thrift (~> 0.5.0)
thrift (0.6.0)
这篇关于我如何才能找出为什么一个gem包已经锁定了一个特定版本的宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!