Bundler无法为Rails 4.0.0的gem“railties”找到兼容的版本 [英] Bundler could not find compatible versions for gem “railties” for Rails 4.0.0
问题描述
我试图升级到Rails 4.0.0,并且更改了 sass-rails
和 coffee-rails
。在升级到Rails 4之前,我需要解决 rails
和 coffee-rails
之间的这个gem冲突。
当我运行 bundle update
时,这是我得到的输出:
$ bundle update
更新git://github.com/pilu/web-app-theme.git
从https:// rubygems获取源索引。 org /
正在解析依赖项..............
Bundler无法找到适用于gemrailties的兼容版本:
在Gemfile中:
rails (= 4.0.0)ruby取决于
railties(= 4.0.0)ruby
coffee-rails(= 4.0.0)ruby取决于
railties(4.0.0) .rc2)
我的 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'
使用独角兽作为web服务器
#gem'独角兽'
#与Capistrano共同部署
gem'capistrano'
gem'rvm-capistrano'
gem'passenger'
$
同时 bundle update
你一次更新一个gem,如果你更新到 Rails 4
,那很难,而且很多宝石必须同时更新。
我通过删除 Gemfile.lock
并执行 bundle install
这当然假设你在 Gemfile
t中没有冲突的显式gem版本o从一开始。因此,如果失败,请从Gemfile中删除版本号。
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.
When I ran bundle update
this is the output I got:
$ 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
:
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'
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.
I solved this by deleting the Gemfile.lock
and doing bundle install
.
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.
这篇关于Bundler无法为Rails 4.0.0的gem“railties”找到兼容的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!