升级到Rails 5.2.2时的铁路兼容性问题

问题描述 投票:0回答:1

我试图将Rails 5.2.0.rc2中的Rails应用程序更新为Rails 5.2.2

到目前为止,我:

  • 删除了gemfile.lock
  • 从gem文件中的大多数gem中删除了版本号
  • gem文件中rails gem的升级版本为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)

如果我尝试捆绑更新rails,我得到:

This Bundle hasn't been installed yet. Run `bundle install` to update and install the bundled gems.

这是我的Gemfile:

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]

请帮忙,谢谢。

ruby-on-rails ruby-on-rails-5.2
1个回答
0
投票

我解决了我刚刚将轨道宝石添加到Gemfile中,就在rails gem下面,即:

gem 'rails',                   '5.2.2'
gem 'railties',                '5.2.2'  # added this line

我不知道为什么它不存在。希望这可以帮助。

© www.soinside.com 2019 - 2024. All rights reserved.