I am trying to upgrade to Rails 4.0.0, and I changed the gem versions of sass-rails
and coffee-rails
. I need to resolve this gem conflict between rails
and coffee-rails
before I can upgrade to Rails 4.
我正在尝试升级到Rails 4.0.0,并更改了sassrails和咖啡Rails的gem版本。在升级到rails 4之前,我需要解决rails和咖啡rails之间的这个gem冲突。
When I ran bundle update
this is the output I got:
当我运行bundle update时,这是我得到的输出:
$ bundle update
Updating git://github.com/pilu/web-app-theme.git
Fetching source index from https://rubygems.org/
Resolving dependencies..............
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 4.0.0) ruby depends on
railties (= 4.0.0) ruby
coffee-rails (= 4.0.0) ruby depends on
railties (4.0.0.rc2)
My Gemfile
:
我的Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'cancan'
gem 'client_side_validations'
gem 'devise', '~> 1.5.3'
gem 'dynamic_form'
gem 'execjs'
gem 'haml'
gem 'httparty'
gem 'jquery-rails'
gem 'mysql2'
gem 'paperclip', '~> 2.4'
gem 'prawn'
gem 'rails3-jquery-autocomplete'
gem 'rake', '0.9.2'
gem 'remotipart', '~> 1.0'
gem 'simple_datatables'
gem 'therubyracer'
gem 'validates_timeliness', '~> 3.0.2'
gem 'will_paginate', '~> 3.0'
gem 'turbolinks'
gem 'jquery-turbolinks'
gem 'noty-rails'
gem 'font-awesome-rails'
gem 'socket.io-rails'
gem 'attr_encrypted'
gem 'bullet', :group => 'development'
#temp for demo.managetherapy.com
#gem 'faker'
group :test do
gem 'capybara'
gem 'cucumber-rails', :require => false
gem 'database_cleaner'
gem 'factory_girl_rails'
# gem 'faker'
gem 'guard-rspec'
gem 'selenium-webdriver', '2.7.0'
gem 'webrat'
end
group :development, :test do
gem 'faker'
gem 'haml-rails'
gem 'hpricot'
gem 'rspec-rails'
gem 'ruby_parser'
#gem 'web-app-theme', '~> 0.8.0'
gem 'web-app-theme', :git =>'git://github.com/pilu/web-app-theme.git'
end
gem 'sass-rails', '4.0.0'
gem 'compass-rails', '1.0.3'
gem 'coffee-rails', '4.0.0'
gem 'uglifier', '>= 2.1.1'
gem 'bootstrap-sass-rails'
# Use unicorn as the web server
#gem 'unicorn'
# Deploy with Capistrano
gem 'capistrano'
gem 'rvm-capistrano'
gem 'passenger'
6 个解决方案
#1
63
Also bundle update
only allows you to update one gem at a time, which is hard if you are updating to Rails 4
and a whole lot of gems have to be updated at the same time.
另外,捆绑更新只允许您一次更新一个gem,如果您要更新到Rails 4,那么您将很难同时更新所有的gem。
I solved this by deleting the Gemfile.lock
and doing bundle install
.
我通过删除Gemfile解决了这个问题。锁定并执行bundle安装。
This is of course assuming you have no conflicting explicit gem version in your Gemfile
to start with. So if this fails, remove version numbers from the Gemfile.
这当然是假设您的Gemfile中没有明确的gem版本。因此,如果失败,请从Gemfile中删除版本号。
#2
20
Just remove gem versions (coffee-rails and sass-rails) from Gemfile and run bundle update
只需从Gemfile中移除gem版本(咖啡-rails和sassrails),并运行bundle update。
#3
8
You have an outdated version of Devise, use Rails 4 compatible
您有一个过时的设计版本,使用Rails 4兼容。
gem 'devise', '~> 3.0.0.rc'
Also change coffee-rails
to
也改变coffee-rails
gem 'coffee-rails', '~> 4.0.0'
and try doing
试着做
bundle update coffee-rails
#4
7
Run gem update rails
first, then bundle update
先运行gem更新rails,然后捆绑更新。
#5
4
You have gems that aren't supported by Rails 4. Comment out all the gems except for Rails 4 and uncomment them one at a time after running bundle install to find the culprits. You might need to undo some of your version locks.
您有不受Rails 4支持的gem。注释掉除了Rails 4之外的所有gems,并在运行bundle安装之后对它们取消注释,以查找原因。您可能需要撤销一些版本锁。
#6
1
- Delete the
Gemfile.lock
file - 删除Gemfile。锁文件
- refer here for basic gemfile changes
- 请参考这里的基本gemfile更改。
- run
bundle install
- 运行包安装
Everything will work fine. :)
一切都会正常工作。:)
#1
63
Also bundle update
only allows you to update one gem at a time, which is hard if you are updating to Rails 4
and a whole lot of gems have to be updated at the same time.
另外,捆绑更新只允许您一次更新一个gem,如果您要更新到Rails 4,那么您将很难同时更新所有的gem。
I solved this by deleting the Gemfile.lock
and doing bundle install
.
我通过删除Gemfile解决了这个问题。锁定并执行bundle安装。
This is of course assuming you have no conflicting explicit gem version in your Gemfile
to start with. So if this fails, remove version numbers from the Gemfile.
这当然是假设您的Gemfile中没有明确的gem版本。因此,如果失败,请从Gemfile中删除版本号。
#2
20
Just remove gem versions (coffee-rails and sass-rails) from Gemfile and run bundle update
只需从Gemfile中移除gem版本(咖啡-rails和sassrails),并运行bundle update。
#3
8
You have an outdated version of Devise, use Rails 4 compatible
您有一个过时的设计版本,使用Rails 4兼容。
gem 'devise', '~> 3.0.0.rc'
Also change coffee-rails
to
也改变coffee-rails
gem 'coffee-rails', '~> 4.0.0'
and try doing
试着做
bundle update coffee-rails
#4
7
Run gem update rails
first, then bundle update
先运行gem更新rails,然后捆绑更新。
#5
4
You have gems that aren't supported by Rails 4. Comment out all the gems except for Rails 4 and uncomment them one at a time after running bundle install to find the culprits. You might need to undo some of your version locks.
您有不受Rails 4支持的gem。注释掉除了Rails 4之外的所有gems,并在运行bundle安装之后对它们取消注释,以查找原因。您可能需要撤销一些版本锁。
#6
1
- Delete the
Gemfile.lock
file - 删除Gemfile。锁文件
- refer here for basic gemfile changes
- 请参考这里的基本gemfile更改。
- run
bundle install
- 运行包安装
Everything will work fine. :)
一切都会正常工作。:)