We're happy to announce that Ruby 3.2 is now available on all Opalstack servers!
We've deployed the new Ruby package as a software collection. Software collections are alternate packages of system software that you can activate in your shell environment or use to run single commands single commands.
Using Ruby 3.2 in the shell
To activate the new Node.js package in your shell environment, add the following line to the end of your ~/.bashrc
(or equivalent configuration file if you use an alternate shell):
source scl_source enable ruby32
Save the file, then log out and log back in. The newer Ruby will be the default for your shell session. For example:
[shelluser@opalN ~]$ ruby --version
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
To activate it for a single command, prefix the command with scl enable ruby32 --
, for example:
[shelluser@opalN ~]$ scl enable ruby32 -- ruby --version
v20.9.0
Updated Rails installer
We've also updated our Rails installer to use the new Ruby version.
You can create a new Rails app by clicking "Add Application" at https://my.opalstack.com/apps/ and selecting "Ruby on Rails" as the application type.
If you have an existing Rails app that you want to update to use the new Ruby:
- Create a new Rails app at https://my.opalstack.com/apps/.
- Deploy your project files to the new Rails app. Instructions are available in our user guide: Serving your own Rails project.
- Create a test subdomain and site at https://my.opalstack.com/domains/ to serve the new app.
- Test the site to ensure it works correctly.
- Finally, edit the live site at https://my.opalstack.com/domains/ to change it over to the new app.