##経緯
Ruby on Rails 4.2.1から5へバージョンを上げるため、
$ bundle update $ bundle update rails
を試みたところ、エラーが発生。
gemfileに問題のgemの最新バージョンを書き込むが、
これ以上対策が思いつかず、、
どなたか解決方法をご教示いただきたいです。
環境
Ruby 2.4.1
Ruby on Rails 4.2.1
##エラー内容
ruby
1 2Bundler could not find compatible versions for gem "activemodel": 3 In Gemfile: 4 carrierwave (= 1.2.1) was resolved to 1.2.1, which depends on 5 activemodel (>= 4.0.0) 6 7 rails (= 5.0.1) was resolved to 5.0.1, which depends on 8 activemodel (= 5.0.1) 9 10Bundler could not find compatible versions for gem "json": 11 In Gemfile: 12 json (= 2.1.0) 13 14 sdoc (= 0.4.2) was resolved to 0.4.2, which depends on 15 json (>= 1.7.7, ~> 1.7) 16 17Bundler could not find compatible versions for gem "railties": 18 In Gemfile: 19 devise (= 4.3.0) was resolved to 4.3.0, which depends on 20 railties (< 5.2, >= 4.1.0) 21 22 jquery-rails (= 4.3.1) was resolved to 4.3.1, which depends on 23 railties (>= 4.2.0) 24 25 rails (= 5.0.1) was resolved to 5.0.1, which depends on 26 railties (= 5.0.1) 27 28 sass-rails (= 5.0.7) was resolved to 5.0.7, which depends on 29 railties (< 6, >= 4.0.0)
gemfile内の記述
ruby
1source 'https://rubygems.org' 2 3gem 'rails', '5.0.1' 4gem 'sass-rails', '5.0.7' 5gem 'uglifier', '3.2.0' 6gem 'coffee-rails', '4.2.2' 7gem 'jquery-rails', '4.3.1' 8gem 'turbolinks', '5.0.1' 9gem 'jbuilder', '2.7.0' 10gem 'sdoc', '0.4.2', group: :doc 11gem 'omniauth' 12gem 'omniauth-twitter','1.4.0' 13gem 'settingslogic' 14gem 'sprockets-rails', '3.2.1' 15gem 'activemodel', '5.0.1' 16gem 'activerecord', '5.0.1' 17gem 'activesupport', '5.0.1' 18gem 'actionpack' , '5.0.1' 19gem 'actionview' , '5.0.1' 20gem 'railties' , '5.0.1' 21gem 'devise', '4.3.0' 22gem 'seed-fu', '2.3.6' 23gem 'json', "2.1.0" 24gem 'rails-dom-testing', "2.0.3" 25 26gem 'bootstrap-sass' 27gem 'kaminari' 28gem 'google-analytics-rails' 29 30 31gem 'ckeditor' 32gem 'carrierwave' , '1.2.1' 33gem 'mini_magick' 34 35gem "redcarpet", "~> 2.3.0" 36 37group :development, :test do 38 gem 'sqlite3', '1.3.9' 39 gem 'byebug', '3.4.0' 40 gem 'web-console', '3.5.1' 41 gem 'spring', '1.1.3' 42end 43 44group :production do 45 gem 'pg', '0.17.1' 46 gem 'rails_12factor', '0.0.2' 47end 48
また、gem listを見た際に、重複しているバージョンがあったのですが、
gem cleanupしても修復せず、、
ruby
1$ gem list 2 3*** LOCAL GEMS *** 4 5actioncable (5.1.4) 6actionmailer (5.1.4) 7actionpack (5.1.4, 5.0.0) 8actionview (5.1.4, 5.0.0) 9activejob (5.1.4) 10activemodel (5.1.4, 5.0.0) 11activerecord (5.1.4) 12activesupport (5.1.4, 5.0.0) 13...
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。