Install Ruby

Please install the latest version of Ruby (currently 4.0.7) on you computer. There are many ways to do this.

For Linux and macOS, I recommend rbenv, which can manage multiple Ruby versions and make sure you’re using the one that matches the current project.

  • Open a terminal / shell window. (On macOS, this is the app called Terminal.)
  • Install Homebrew if you don’t already have it. On a Mac, you may also get a notice about having to install developer tools. Follow the prompts, and let me know if you have trouble.
  • brew install rbenv
  • rbenv init
  • Close that terminal window and open a new one, so that the changes take effect.
  • rbenv install 4.0.7
  • rbenv global 4.0.7

(On Linux, you can also use the existing package manager instead of installing Homebrew, but its rbenv version is likely out of date. You’re welcome to try that alternative if you like. More info here.)

On Windows, the best way to install Ruby seems to be the RubyInstaller app.


If your Ruby installation seemed to work, then open a terminal, type this command, and copy and paste the result into this Moodle assignment:

ruby -v

If you can’t get your Ruby installation to work, then please post a request for help in our Slack channel, including whatever specific error message you are getting.