Can not deploy Ruby on Rails app which was deployable till Dec 2023

83 Views Asked by At

I have a Ruby application that has been used for years and since December 2023 I can no longer deploy it. I use capistrano for deploy. Ruby should be version 2.6.1. When deploying, it gives me an error:

ERROR:  Error installing bundler:
    The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
    bundler requires Ruby version >= 3.0.0. The current ruby version is 2.6.1.33.

Installing Ruby 3.0 is not an option. How can I manage this situation?

1

There are 1 best solutions below

1
Jacob Miller On

The last line in your Gemfile.lock will tell you which version of bundler was used to create it, e.g.:

BUNDLED WITH
   2.3.22

If that is incompatible with your expected Ruby version, try removing your Gemfile.lock file and recreating it by running bundle install locally prior to deploying with Capistrano.