We will use Ruby 2.7.2 in Module 2 & 3. You can check your Ruby version by running
Using rbenv, you can install Ruby 2.7.2 (if you don’t have it already) with:
rbenv install 2.7.2
rbenv you can set your Ruby version for a directory and all subdirectories within it. If you have a
3module directory on your machine, you can set your Ruby version for this directory (and all subdirectories) by first changing into that directory and then running
rbenv local 2.7.2
Always double check that your Ruby version is correct after changing it with
We will use Rails version 5.2.5 in Module 2 & 3.
Rails is a Gem, and if you are using
rbenv, gems are specific to your current Ruby version, so you need to make sure you are on Ruby 2.7.2 before proceeding by following the instructions above.
Once you have verified your Ruby version is 2.7.2, check if you have Rails. From the command line:
$ rails -v
If you get a message saying rails is not installed or you do not have version 5.2.5, run
$ gem install rails --version 5.2.5
You may need to quit and restart your terminal session to see these changes show up when you check your rails version with:
$ rails -v
Be careful not to install the latest version of Rails by only doing
gem install rails – our curriculum is not up to date with the latest version and you will need to uninstall it.
If you instead get a version of Rails besides
5.2.5, follow these instructions.