gpt4 book ai didi

ruby-on-rails - Bundler 找不到 Rails 4.0.0 的 gem “railties” 的兼容版本

转载 作者:行者123 更新时间:2023-12-03 06:30:36 25 4
gpt4 key购买 nike

我正在尝试升级到 Rails 4.0.0,并且更改了 sass-railscoffee-rails 的 gem 版本。在升级到 Rails 4 之前,我需要解决 railscoffee-rails 之间的 gem 冲突。

当我运行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)

我的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'

最佳答案

此外,bundle update 只允许您一次更新一个 gem,如果您要更新到 Rails 4 并且必须更新大量 gem,这会很困难。同步更新。

我通过删除 Gemfile.lock 并执行 bundle install 解决了这个问题。

这当然是假设您的 Gemfile 中没有冲突的显式 gem 版本。因此,如果失败,请从 Gemfile 中删除版本号。

关于ruby-on-rails - Bundler 找不到 Rails 4.0.0 的 gem “railties” 的兼容版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17327953/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com