Gem dependency conflict between coffee-rails and rspec-rails

随声附和 提交于 2020-01-06 04:12:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!