Skip to content

Error when upgrading Ruby Version #731

@antarr

Description

@antarr

I'm getting this error when attempting to deploy with a new version of Ruby.

       Fetching gem metadata from https://rubygems.org/........
       nokogiri-1.16.7-x86_64-linux requires ruby version < 3.4.dev, >= 3.0, which is
       incompatible with the current version, 2.7.7

old config/deploy.rb

task :remote_environment do
  # If you're using rbenv, use this to load the rbenv environment.
  # Be sure to commit your .ruby-version or .rbenv-version to your repository.
  # invoke :'rbenv:load'

  # For those using RVM, use this to load an RVM version@gemset.
  invoke :'rvm:use', 'ruby-2.7.7@eeg'
end

# Put any custom commands you need to run at setup
# All paths in `shared_dirs` and `shared_paths` will be created on their own.
task :setup do
  # command %{rbenv install 2.7.7 --skip-existing}
  command %{rvm install ruby-2.7.7}
  command %{gem install bundler -v 2.4.22}
end

updated config/deploy.rb

task :remote_environment do
  # If you're using rbenv, use this to load the rbenv environment.
  # Be sure to commit your .ruby-version or .rbenv-version to your repository.
  # invoke :'rbenv:load'

  # For those using RVM, use this to load an RVM version@gemset.
  command 'source "/usr/local/rvm/scripts/rvm"'
  invoke :'rvm:use', 'ruby-3.1@eeg'
end

# Put any custom commands you need to run at setup
# All paths in `shared_dirs` and `shared_paths` will be created on their own.
task :setup do
  # command %{rbenv install 2.7.7 --skip-existing}
  command %{rvm install ruby-3.1.6}
  command %{gem install bundler -v 2.4.22}
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions