问题
I'm upgrading an app from rails 3.1.1 to rails 3.2. I had to update version of coffee-rails as well as rspec-rails to their latest versions to work with rails 3.2. However, they both seem to be incompatible with each other. When I run the bunder I get
In Gemfile:
coffee-rails (~> 3.2.2) ruby depends on
actionpack (= 3.2.0) ruby
rspec-rails (~> 2.8.1) ruby depends on
actionpack (3.0.0)
However, on rubygems for rspec-rails, it clearly specifies the dependency to be >= actionpack (3.0.0)
Has anybody faced this before?
回答1:
I've done this recently just pasting in the Gemifile the asset group from a fresh new Rails 3.2 application:
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
end
It's not a perfect way of doing it but you can remove your current Gemfile.lock and bundle the app as a new one. It sounds dirty in theory but it works just fine in practice. You can always see the differences with a git diff, supposing you're using it.
来源:https://stackoverflow.com/questions/9410814/gem-dependency-conflict-between-coffee-rails-and-rspec-rails