I have a Gemfile that looks like this:
gem 'google-api-client', :require => 'google/api_client'
gem 'my_baseimage', '0.0.3', :git => 'https://github.com/xxx/BaseImage.git'
I have a base gem that requires a bunch of common gems across projects.
However, when I run bundle install
, I see errors like this:
In Gemfile:
activerecord (>= 0) ruby depends on
activemodel (= 4.1.11) ruby depends on
activesupport (= 4.1.11) ruby
activerecord (>= 0) ruby depends on
activemodel (= 4.1.11) ruby depends on
activesupport (= 4.1.11) ruby
google-api-client (>= 0) ruby depends on
activesupport (~> 3.2) ruby
Bundler could not find compatible versions for gem "rack":
In Gemfile:
rack-contrib (= 1.1.0) ruby depends on
rack (>= 0.9.1) ruby
sinatra (>= 0) ruby depends on
rack (~> 1.4) ruby
google-api-client (>= 0) ruby depends on
rack (= 1.2.0) ruby
rack (>= 0) ruby
google-api-client
hasn't required rack 1.2 since, like, version 0.1, and moreover my_baseimage
requires 0.7.1. When I run a gem dependency -R
, I see this:
google-api-client-0.7.1 (addressable (>= 2.3.2))
google-api-client-0.7.1 (autoparse (>= 0.3.3))
google-api-client-0.7.1 (extlib (>= 0.9.15))
google-api-client-0.7.1 (faraday (>= 0.9.0))
Gem google-api-client-0.7.1
google-api-client-0.7.1 (jwt (>= 0.1.5))
google-api-client-0.7.1 (launchy (>= 2.1.1))
google-api-client-0.7.1 (multi_json (>= 1.0.0))
google-api-client-0.7.1 (rake (>= 0.9.0, development))
google-api-client-0.7.1 (rake (>= 0.9.0, development))
google-api-client-0.7.1 (retriable (>= 1.4))
google-api-client-0.7.1 (rspec (>= 2.11.0, development))
google-api-client-0.7.1 (signet (>= 0.5.0))
google-api-client-0.7.1 (uuidtools (>= 2.1.0))
I was able to work around this issue by, in my Gemfile, specifying 0.7.1, as follows:
gem 'google-api-client', '0.7.1', :require => 'google/api_client'
gem 'my_baseimage', '0.0.3', :git => 'https://github.com/xxx/BaseImage.git'
However, I was hoping that in my project-specific gemfiles I would not have to specified gem versions, they'd just take them from my_baseimage
as-is.
Can anyone suggest why it would appear that bundle install
is defaulting to a very old version of google-api-client
when the dependency graph specifies the one I want (0.7.1) and my_baseimage
also specifies the one I want (0.7.1)?
Bundler uses rubygems, which, when not given a specific version, defaults to the last version marked 'stable', which, if the tag isn't maintained, can mean even terribly deprecated builds.