Subal Charla
Subal Charla

Reputation: 159

Bundler could not find compatible version of the gems

My Local Gems are:

actionmailer (3.2.4.rc1, 3.2.3)
actionpack (3.2.4.rc1, 3.2.3)
activemodel (3.2.4.rc1, 3.2.3)
activerecord (3.2.4.rc1, 3.2.3)
activeresource (3.2.3)
activesupport (3.2.4.rc1, 3.2.3)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.3)
coffee-script-source (1.3.3)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
json (1.7.3)
mail (2.4.4)
mime-types (1.18)
multi_json (1.3.6)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.4.rc1, 3.2.3)
rake (0.9.2.2)
rdoc (3.12)
rubygems-bundler (1.0.2)
rvm (1.11.3.3)
sprockets (2.1.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)

And my Gemfile looks like:

source 'https://rubygems.org'

gem 'rails', '3.2.3'

group :development, :test do
  gem 'sqlite3' ,'1.3.6'
  gem 'rspec-rails', '2.10.0'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.4'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails' ,'2.0.0'

group :test do
   gem 'capybara' , '1.1.2'
end

group :production do
  gem 'pg' , '0.12.2'
end

But on execution of bundle install --without production , I get

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    rails (= 3.2.3) ruby depends on
      railties (= 3.2.3) ruby

    jquery-rails (= 2.0.0) ruby depends on
      railties (3.2.4.rc1)

Even though I can see railties 3.2.3 and 3.2.4.rc1 in my local gems, why does bundle fail to install the jquery-rail 2.0.0. And why is it asking me for Rails 3.2.3, when I already have this version installed?

Upvotes: 3

Views: 2332

Answers (2)

trliner
trliner

Reputation: 469

I ran into a similar problem, and I was able to get around it by commenting out the gem(s) causing the dependency problem, running bundle, uncommenting the gem(s), then running bundle again.

In your case, I would try commenting and uncommenting jquery-rails.

Upvotes: 1

shime
shime

Reputation: 9008

Yeah, but bundler will not let you use the two different versions of a gem. You've got a version dependency conflict, since rails 3.2.3 depends on railties 3.2.3 and jquery-rails 2.0.0 depends on railties 3.2.4.rc1.

You should either use older jquery-rails version or newer rails version.

Upvotes: 1

Related Questions