Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when upgrading Ruby Version #731

Open
antarr opened this issue Nov 7, 2024 · 0 comments
Open

Error when upgrading Ruby Version #731

antarr opened this issue Nov 7, 2024 · 0 comments

Comments

@antarr
Copy link

antarr commented Nov 7, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant