'Rails 5.2.3 to 6.0.0 upgrade dependency hell

I ran bundle update rails to update my app to 6.0, and got this very confusing output. Updating these gems in the gemfile does not have any impact. I can't make heads or tails of this error, and it feels like a catch 22. This is the output:

Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
activerecord-session_store (~> 1.1, >= 1.1.3) was resolved to 1.1.3, which depends on
  actionpack (>= 4.0)

activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  formtastic (~> 3.1) was resolved to 3.1.5, which depends on
    actionpack (>= 3.2.13)

activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  inherited_resources (>= 1.9.0) was resolved to 1.11.0, which depends on
    has_scope (~> 0.6) was resolved to 0.7.2, which depends on
      actionpack (>= 4.1)

activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  inherited_resources (>= 1.9.0) was resolved to 1.11.0, which depends on
    actionpack (>= 5.0, < 6.1)

rails (= 6.0.0) was resolved to 6.0.0, which depends on
  actionpack (= 6.0.0)

devise (~> 4.2) was resolved to 4.7.1, which depends on
  responders was resolved to 3.0.0, which depends on
    actionpack (>= 5.0)

Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
carrierwave (~> 2.0, >= 2.0.2) was resolved to 2.0.2, which depends on
  activemodel (>= 5.0.0)

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

Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activerecord-session_store (~> 1.1, >= 1.1.3) was resolved to 1.1.3, which depends on
  activerecord (>= 4.0)

activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  kaminari (>= 0.15) was resolved to 1.1.1, which depends on
    kaminari-activerecord (= 1.1.1) was resolved to 1.1.1, which depends on
      activerecord

rails (= 6.0.0) was resolved to 6.0.0, which depends on
  activerecord (= 6.0.0)

activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  ransack (>= 1.8.7) was resolved to 2.3.0, which depends on
    activerecord (>= 5.0)

Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
bullet (~> 6.1) was resolved to 6.1.0, which depends on
  activesupport (>= 3.0.0)

carrierwave (~> 2.0, >= 2.0.2) was resolved to 2.0.2, which depends on
  activesupport (>= 5.0.0)

jbuilder (~> 2.0) was resolved to 2.9.1, which depends on
  activesupport (>= 4.2.0)

activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  kaminari (>= 0.15) was resolved to 1.1.1, which depends on
    activesupport (>= 4.1.0)

rails (= 6.0.0) was resolved to 6.0.0, which depends on
  activesupport (= 6.0.0)

stripe_event (~> 2.3) was resolved to 2.3.0, which depends on
  activesupport (>= 3.1)

Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 6.0.0)

invisible_captcha (~> 1.0) was resolved to 1.0.0, which depends on
  rails (>= 4.2)

mini_backtrace (= 0.1.3) was resolved to 0.1.3, which depends on
  rails (>= 2.3.3)

Bundler could not find compatible versions for gem "railties":
In Gemfile:
activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  railties (>= 4.2, < 5.3)

activerecord-session_store (~> 1.1, >= 1.1.3) was resolved to 1.1.3, which depends on
  railties (>= 4.0)

devise (~> 4.2) was resolved to 4.7.1, which depends on
  railties (>= 4.1.0)

factory_bot_rails (~> 4.8, >= 4.8.2) was resolved to 4.11.1, which depends on
  railties (>= 3.0.0)

activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  inherited_resources (>= 1.9.0) was resolved to 1.11.0, which depends on
    railties (>= 5.0, < 6.1)

activeadmin (~> 1.4.3) was resolved to 1.4.3, which depends on
  jquery-rails (>= 4.2.0) was resolved to 4.3.5, which depends on
    railties (>= 4.2.0)

rails (= 6.0.0) was resolved to 6.0.0, which depends on
  railties (= 6.0.0)

sass-rails (~> 5.0.6) was resolved to 5.0.7, which depends on
  railties (>= 4.0.0, < 6)

web-console (~> 3.0) was resolved to 3.7.0, which depends on
  railties (>= 5.0)

My Gemfile looks like this:

source 'https://rubygems.org'
ruby '2.5.0'

gem 'rails', '6.0.0'
gem 'pg', '~> 0.18.3'
gem 'iodine', '~> 0.7.38'
gem 'sass-rails', '~> 5.0.6'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails'
gem 'therubyracer', '~> 0.12.3'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'figaro', '~> 1.1', '>= 1.1.1'
gem 'less-rails', '~> 4.0.0'
gem 'autoprefixer-rails'
gem 'devise', '~> 4.2'
gem 'mini_magick', '~> 4.5', '>= 4.5.1'
gem 'carrierwave', '~> 2.0', '>= 2.0.2'
gem 'fog-aws', '~> 3.5', '>= 3.5.2'
gem 'aws-sdk', '~> 2'
gem 'activeadmin', '~> 1.4.3'
gem 'friendly_id', '~> 5.1'
gem 'pagy', '~> 3.7', '>= 3.7.2'
gem 'activerecord-session_store', '~> 1.1', '>= 1.1.3'
gem 'sprockets', '3.7.2'
gem 'aasm', '~> 5.0'
gem 'redis', '~> 4.1', '>= 4.1.3'
gem 'sidekiq', '~> 6.0', '>= 6.0.4'
gem 'local_time', '~> 2.1'
gem 'stripe', '~> 5.11'
gem 'stripe_event', '~> 2.3'
gem 'lockbox', '~> 0.2.4'
gem 'mailgunner', '~> 2.4'
gem 'rack-attack'
gem 'invisible_captcha', '~> 1.0'

group :development do
  gem 'web-console', '~> 3.0'
  gem 'letter_opener', '~> 1.7'
  gem 'bullet', '~> 6.1'
end

group :development, :test do
  gem 'byebug'
  gem 'spring'
  gem 'spring-commands-rspec'
  gem 'factory_bot_rails', '~> 4.8', '>= 4.8.2'
  gem 'faker', '~> 1.6', '>= 1.6.6'
  gem 'minitest', '~> 5.8', '>= 5.8.4'
end

group :test do
  gem 'minitest-reporters', '1.0.5'
  gem 'mini_backtrace',     '0.1.3'
  gem 'guard-minitest',     '2.3.1'
  gem 'database_cleaner', '~> 1.7'
end

group :production do
  gem 'newrelic_rpm'
end

What does the error mean? Where do I start? Do I do bundle update first, and then bundle update rails? Or vice versa? This is like battling a hydra.



Solution 1:[1]

I managed to get past this error by adding the following to my Gemfile

gem 'sassc', '~> 2.1.0'

After that, running bundle install returned this:

You have requested:
  sassc ~> 2.1.0

The bundle currently has sassc locked at 2.4.0.
Try running `bundle update sassc`

...so I ran bundle update sassc and then bundle install. Everything seems to have updated normally, so far at least.

This is apparently a known issue with sassc, mentioned here and here.

However, my bundler was getting stuck on the sassc update. Hopefully someone else can provide more insight on the other gems

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Grimhamr