从Rails 4.2.8升级到Rails 5.0.2会导致以下错误消息。我不确定如何解决依赖关系。红宝石版本是2.5.1。我已经能够在Rails 4.2.8上运行该应用程序和测试套件,尽管我看到较低版本的carrierwave导致打印过多,所以我希望能够对其进行升级,但它需要Rails 5
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
actionpack-action_caching was resolved to 1.2.0, which depends on
actionpack (< 6, >= 4.0.0)
rails (= 5.0.2) was resolved to 5.0.2, which depends on
actionpack (= 5.0.2)
simple_form was resolved to 4.1.0, which depends on
actionpack (>= 5.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
carrierwave was resolved to 2.0.0, which depends on
activemodel (>= 5.0.0)
rails (= 5.0.2) was resolved to 5.0.2, which depends on
activemodel (= 5.0.2)
simple_form was resolved to 4.1.0, which depends on
activemodel (>= 5.0)
validate_url was resolved to 1.0.8, which depends on
activemodel (>= 3.0.0)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
friendly_id (~> 5.1.0) was resolved to 5.1.0, which depends on
activerecord (>= 4.0.0)
rails (= 5.0.2) was resolved to 5.0.2, which depends on
activerecord (= 5.0.2)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
active_hash (~> 1.4.1) was resolved to 1.4.1, which depends on
activesupport (>= 2.2.2)
carrierwave was resolved to 2.0.0, which depends on
activesupport (>= 5.0.0)
rails (= 5.0.2) was resolved to 5.0.2, which depends on
activesupport (= 5.0.2)
Bundler could not find compatible versions for gem "http":
In Gemfile:
http
twitter (~> 5.15.0) was resolved to 5.15.0, which depends on
http (< 0.10, >= 0.4)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 5.0.2)
interactor-rails (~> 2.0) was resolved to 2.2.0, which depends on
rails (< 5.3, >= 4.2)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 5.0.2) was resolved to 5.0.2, which depends on
railties (= 5.0.2)
sass-rails (~> 5.0.1) was resolved to 5.0.8, which depends on
railties (>= 5.2.0)
Bundler could not find compatible versions for gem "sprockets":
In Gemfile:
sprockets
sass-rails (~> 5.0.1) was resolved to 5.0.8, which depends on
sprockets (< 4.0, >= 2.8)
source 'https://rubygems.org'
ruby '2.5.1'
gem 'actionpack-action_caching'
gem 'active_hash', '~> 1.4.1'
gem 'avatars.io'
gem 'aws-sdk-s3', '~> 1'
gem 'bootstrap-sass', '~> 3.3.6'
gem 'carrierwave'
gem 'carrierwave_direct'
gem 'coffee-rails', '~> 4.0.0'
gem 'compass-rails', '~> 2.0.2'
gem 'dalli'
gem 'devise'
gem 'diffy'
gem 'font-awesome-rails'
gem 'fog'
gem 'foundation-rails', '~> 5.5.3.2'
gem 'friendly_id', '~> 5.1.0'
gem 'haml'
gem 'html5shiv-js-rails'
gem 'http'
gem 'interactor-rails', '~> 2.0'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'pg'
gem 'puma', '~> 3.11.4'
gem 'rails', '5.0.2'
gem 'redcarpet'
gem 'rmagick'
gem 'ruby-mp3info', '>= 0.8.4'
gem 'sass-rails', '~> 5.0.1'
gem 'sidekiq'
gem 'sinatra', require: false
gem 'simple_form'
gem 'sprockets'
gem 'stamp'
gem 'twitter', '~> 5.15.0'
gem 'uglifier', '>= 1.3.0'
gem 'validate_url'
gem 'xml-simple', '~> 1.1.5'
gem 'will_paginate'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
end
group :production do
gem 'rails_12factor'
gem 'scout_apm'
gem 'sentry-raven'
# gem 'unicorn-worker-killer'
end
group :test do
gem 'factory_girl_rails'
gem 'm'
gem 'minitest-rails', '~> 2.2.0'
gem 'simplecov', '~> 0.9', require: false
gem 'timecop'
end
group :development, :test do
gem 'dotenv-rails'
gem 'pry'
gem 'awesome_print'
end
答案 0 :(得分:1)
sass-rails (~> 5.0.1) was resolved to 5.0.8, which depends on
railties (>= 5.2.0)
railties 5.2将与其余的Rails 5.0冲突-您需要将sass-rails
限制为< 5.0.8
答案 1 :(得分:0)
首先备份您的gemfile,然后尝试使用
source 'https://rubygems.org'
ruby '2.5.1'
gem 'actionpack-action_caching'
gem 'active_hash'
gem 'avatars.io'
gem 'aws-sdk-s3'
gem 'bootstrap-sass'
gem 'carrierwave'
gem 'carrierwave_direct'
gem 'coffee-rails'
gem 'compass-rails'
gem 'dalli'
gem 'devise'
gem 'diffy'
gem 'font-awesome-rails'
gem 'fog'
gem 'foundation-rails'
gem 'friendly_id'
gem 'haml'
gem 'html5shiv-js-rails'
gem 'http'
gem 'interactor-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'pg'
gem 'puma'
gem 'rails'
gem 'redcarpet'
gem 'rmagick'
gem 'ruby-mp3info'
gem 'sass-rails'
gem 'sidekiq'
gem 'sinatra', require: false
gem 'simple_form'
gem 'sprockets'
gem 'stamp'
gem 'twitter'
gem 'uglifier'
gem 'validate_url'
gem 'xml-simple'
gem 'will_paginate'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
end
group :production do
gem 'rails_12factor'
gem 'scout_apm'
gem 'sentry-raven'
# gem 'unicorn-worker-killer'
end
group :test do
gem 'factory_girl_rails'
gem 'm'
gem 'minitest-rails'
gem 'simplecov', require: false
gem 'timecop'
end
group :development, :test do
gem 'dotenv-rails'
gem 'pry'
gem 'awesome_print'
end
运行
bundle update