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?
The last line in your Gemfile.lock will tell you which version of bundler was used to create it, e.g.:
If that is incompatible with your expected Ruby version, try removing your Gemfile.lock file and recreating it by running
bundle installlocally prior to deploying with Capistrano.