我正在尝试将Rails应用程序从Rails 5.2.0.rc2更新到Rails 5.2.2
到目前为止,我:
当我运行捆绑更新或捆绑安装时,出现此错误:
Bundler could not find compatible versions for gem "railties": In Gemfile:
coffee-rails was resolved to 4.2.2, which depends on
railties (>= 4.0.0)
font-awesome5-rails was resolved to 1.0.1, which depends on
railties (< 5.2, >= 3.2)
jquery-rails was resolved to 4.3.3, which depends on
railties (>= 4.2.0)
rails (= 5.2.2) was resolved to 5.2.2, which depends on
railties (= 5.2.2)
rails-i18n was resolved to 5.1.3, which depends on
railties (< 6, >= 5.0)
sass-rails was resolved to 5.0.7, which depends on
railties (< 6, >= 4.0.0)
web-console was resolved to 3.7.0, which depends on
railties (>= 5.0)
如果我尝试捆绑更新导轨,则会得到:
This Bundle hasn't been installed yet. Run `bundle install` to update and install the bundled gems.
这是我的宝石文件:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rails', '5.2.2'
gem 'bcrypt', '3.1.11'
gem 'faker', '1.7.3'
gem 'mini_magick', '4.8'
gem 'nokogiri', '1.8.1'
gem 'will_paginate', '3.1.6'
gem 'will_paginate-bootstrap4'
gem 'bootstrap', '~> 4.2.1'
gem 'puma', '3.11'
gem 'sass-rails'
gem 'uglifier'
gem 'mini_racer', platforms: :ruby
gem 'coffee-rails'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '2.7.0'
gem 'rails-i18n'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'cloudinary'
gem 'font-awesome5-rails'
gem 'pg', '0.20.0'
gem 'flatpickr'
gem 'delayed_job_active_record'
gem 'openpay'
group :development, :test do
gem 'byebug', '9.0.6', platform: :mri
end
group :development do
gem 'web-console'
gem 'listen'
gem 'spring'
gem 'spring-watcher-listen'
end
group :test do
gem 'rails-controller-testing'
gem 'minitest-reporters'
gem 'guard'
gem 'guard-minitest'
end
# group :production do
# gem 'pg', '0.20.0'
# end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
请帮助,谢谢。
答案 0 :(得分:0)
我解决了。我刚刚将railties宝石添加到Gemfile中,就在rails宝石下方,即:
gem 'rails', '5.2.2'
gem 'railties', '5.2.2' # added this line
我不知道为什么它不存在。希望这会有所帮助。