gem dependency version conflicts between a gem's spec, bundler, and gem install
I'm trying to install a gem, meta_search-1.1.0.pre2. The gem's spec, bundler, and rubygems each report/install different dependency version requirements.
I have a new rails3 project (here are my rails, ruby, rubygems and installed gem versions), with one new line in my Gemfile:
gem 'meta_search', '1.1.0.pre2'
meta_search's page on rubygems.org reports these dependencies:
actionpack ~> 3.1.0.alpha
activerecord ~> 3.1.0.alpha
activesupport ~> 3.1.0.alpha
However, installing it pulls down activesupport and activemodel-3.1.1.rc1:
m开发者_如何学JAVAuldoon@fedora14$ gem install meta_search -v 1.1.0.pre2
Fetching: activesupport-3.1.1.rc1.gem (100%)
Fetching: meta_search-1.1.0.pre2.gem (100%)
Fetching: activemodel-3.1.1.rc1.gem (100%)
Successfully installed activesupport-3.1.1.rc1
Successfully installed meta_search-1.1.0.pre2
Successfully installed activemodel-3.1.1.rc1
3 gems installed
..and bundler reports that meta_search needs activesupport-3.1.0.beta1.
muldoon@fedora14$ bundle update
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
rails (= 3.1.0) depends on
activesupport (= 3.1.0)
meta_search (= 1.1.0.pre2) depends on
activesupport (3.1.0.beta1)
Very strange! Any suggestions?
thx! Mike
If you're using rails 3.1.0
, you should be using meta_search 1.1.0
, like this:
gem 'meta_search', '1.1.0'
When you run bundle install
, do you get any errors? Bundler should solve any dependency issues for you with this command.
When you run bundle update
, it searches for the latest version of every gem.
精彩评论