208 Changing your deployment's ruby version

Updated . Posted . Visible to the public.

Please contact ops@makandra.de if you want to change how your Ruby version is managed.

Selfmanaged Ruby Version

This is the default for new deployments.

These things will get configured:

  • We are installing and configuring rbenv Show archive.org snapshot with the ruby-build Show archive.org snapshot plugin for your deploy user.
  • Passenger-Ruby will get set to ${HOME}/.rbenv/shims/ruby
  • There will be a cronjob which gets executed every 5 minutes. This cronjobs checks if the ruby version specified in your .ruby-version is currently installed. If there is a problem you will get an email.

If you manage the Ruby version yourself you have to take care of the installation and configuration of the ruby versions yourself. Our capistrano-opscomplete Show archive.org snapshot gem can install the ruby version automatically on deploy for you. You can learn how to setup this in our Capistrano documentation.

Ruby YJIT

The Ruby versions 3.1+ we install include YJIT Show archive.org snapshot . If your application requires the RUBY_YJIT_ENABLE=1 environment variable, see setting environment variables.

Legacy configuration with OpsComplete

With the legacy opscomplete configuration it's not possible to change the ruby version of your deployment on your own.
That is due to the fact that we have to make sure you have the same and correct ruby version on all your servers and that the passenger is using the correct ruby version.

If you need to change the Ruby version please contact ops@makandra.de.

The process will then be:

  1. We will prepare the new ruby for your deployment
  2. You deploy your changes
  3. Immediately after that we will restart the webserver with the new ruby configured
Last edit
Matthias Bruhse
License
Source code in this card is licensed under the MIT License.
Posted by Kim Klotz to opscomplete (2018-03-14 10:12)