问题
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.5)
I have got that error message while trying to "bundle install" and here is my gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development do
gem 'sqlite3', '1.3.5'
end
gem 'json'
# 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.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.2.3'
end
gem 'jquery-rails', '2.0.0'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
and here is ruby version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Before all of that my "bundle check" results in the following missing gems
The following gems are missing
* tilt (1.3.3)
* mime-types (1.18)
* mail (2.4.4)
* sass-rails (3.2.5)
Someone could help me resolve this little problem please. Thank you
回答1:
With the current combination bundler can't find a matching version of railties for both rails and jquery-rails at the same time.
Solution
Either:
gem 'jquery-rails', '2.0.1'
Or:
gem 'jquery-rails', '~> 2.0.1'
来源:https://stackoverflow.com/questions/10907248/missing-gems-can