2

我正在将我的 rails 应用程序从 rails 4 升级到 rails 5.0.0 我已经修复了大多数依赖问题,除了以下问题:

Bundler 找不到 gem "actionpack" 的兼容版本:在 Gemfile 中:actionpack rails (= 5.0.0) 被解析为 5.0.0,这取决于 actionpack (= 5.0.0)

rails-controller-testing was resolved to 1.0.1, which depends on
  actionpack (~> 5.x)

responders (~> 2.0) was resolved to 2.4.1, which depends on
  actionpack (< 6.0, >= 4.2.0)

rspec-rails (~> 3.6) was resolved to 3.8.2, which depends on
  actionpack (>= 3.0)

Bundler 找不到 gem“activemodel”的兼容版本:在 Gemfile:activemodel

activeresource was resolved to 5.1.0, which depends on
  activemodel (< 7, >= 5.0)

protected_attributes was resolved to 1.0.2, which depends on
  activemodel (< 5.0, >= 4.0.0.beta)

rails (= 5.0.0) was resolved to 5.0.0, which depends on
  activemodel (= 5.0.0)

我删除了 Gemfile.lock 并再次进行了捆绑安装。我也做了 gem install actionpack 和 gem install activemodel

我的宝石文件:

source 'https://rubygems.org'
ruby "2.3.8"
gem 'rails', '5.0.0'
gem 'actionpack' #, '~> 5.0.0'
gem 'activemodel'#, '~> 5.0.0'
gem 'bootstrap-sass', '3.1.1.0'
gem 'bcrypt-ruby', '3.1.2'
gem 'faker', '1.0.1'
gem 'will_paginate', '~> 3.0.5'
gem 'bootstrap-will_paginate', '0.0.10'
# gem 'will_paginate-bootstrap'
gem 'aws-sdk', '~> 2'
gem 'aws-sdk-v1'
gem "jquery-fileupload-rails"
gem 'textacular', '~> 3.0'
# gem 'lazy_high_charts'
gem "highcharts-rails", "~> 3.0.0"
gem 'pivot_table'
gem 'bootstrap-table-rails'
gem 'newrelic_rpm'
gem 'resque', "~> 1.22.0", require: "resque/server"
gem 'resque_mailer'
gem 'holidays'
gem 'wicked_pdf'
gem 'puma'
gem 'rest-client'
gem 'mocha'
gem 'turbolinks', '~> 5.2.0'
#
# for api
gem 'jwt'
gem 'responders', '~> 2.0'
gem 'phantomjs', :require => 'phantomjs/poltergeist'

# for text notifications
gem 'twilio-ruby'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development do
  gem 'pg','~> 0.18'
  gem 'annotate'
  gem 'letter_opener'
  gem 'wkhtmltopdf-binary'
  gem 'spring-commands-rspec'
end

group :test do
  # gem 'pg'
  gem 'sqlite3', '1.3.10'
  gem 'rspec-rails', '~> 3.6'
  gem 'rspec-its'
  gem 'capybara', '~> 2.4.0'
  gem 'poltergeist'
  gem 'factory_bot_rails'
  gem 'minitest'
  gem 'test-unit'
  gem 'shoulda-matchers'
  gem 'rails-controller-testing'
  gem 'shoulda-callback-matchers'
  gem 'database_cleaner'
  gem 'selenium-webdriver', '~>3.6.0'

end

gem 'sass-rails',   '~> 4.0.2'
gem 'coffee-rails', '4.0.0'
gem 'uglifier', '1.3.0'
gem 'chosen-rails'

gem 'jquery-rails'
gem 'jquery-ui-rails'

group :production do
  gem 'pg','~> 0.18'
  gem 'wkhtmltopdf-heroku'

end

gem 'rack-mini-profiler'
gem "bullet", :group => "development"

# Rails 4 Transition
gem 'protected_attributes'
gem 'activeresource'
4

0 回答 0