2

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.

calyxofheld
  • 1,538
  • 3
  • 24
  • 62
  • 1
    `actionmailer` is part of Rails. Your version of ActiveAdmin depends on `actionpack (>= 5.0, < 6.1)` so you can start by upgrading ActiveAdmin. – mu is too short Apr 25 '20 at 23:34
  • i just updated my op. i'm confused, though. if i have my rails gem at `6.0.0` and try to update `activerecord-session_store`, i get an error that says rails is locked at `5.2.3`. if i leave the rails gem at `5.2.3` and try to update `activerecord-session_store`, i get `Bundler attempted to update activerecord-session_store but its version stayed the same`. this feels like a catch 22 or something? – calyxofheld Apr 26 '20 at 00:57
  • @muistooshort sorry to bother you again, but i'm confused by your message. this is like a catch 22. which part of this error do i start with first? i can't make heads or tails of it. – calyxofheld Apr 29 '20 at 02:30
  • 1
    This process can be a nightmare, worse than a hydra because fire doesn't help. I'd start by bumping the Ruby version to 2.6.6+. Then drop all the `~>` version requirements, the only versions you probably need to keep are the Ruby and Rails ones. That will tell bundler to use the latest versions of everything, this might break a bunch of things but it should get you past the initial `bundle` call. You'll also want to review all the upgrade guides for everything and I hope your test suite is good. – mu is too short Apr 29 '20 at 03:01
  • 1
    I’ve recently found myself in a very similar position trying rails 4 to 5. Any tips? – Matt Apr 14 '21 at 23:47

1 Answers1

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

Grimhamr
  • 41
  • 6