1 minute read

1. Install RVM:

In order, copy and paste the following commands.

  1. Add Repo (reference):
    sudo apt-add-repository -y ppa:rael-gc/rvm
    
  2. Add Key Import Utility (reference):
    sudo apt install gnupg2
    
  3. Add GPG Keys (reference):
    gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    
  4. Install RVM:
    sudo apt-get install rvm -y
    
  5. Add your user to rvm group ($USER will automatically insert your username):
    sudo usermod -a -G rvm $USER
    
  6. Now, in order to always load rvm, change the Gnome Terminal to always perform a login.
    • At terminal window, open the application menu, then Preferences. Click on Unnamed profile, select the Command tab and check Run command as login shell. Terminal Screenshot
  7. Open a new terminal window, then fix permissions and reboot:
    rvmsudo rvm cleanup all && rvm fix-permissions && sudo reboot
    

2. Installing Ruby

In order, copy and paste the following commands.

  1. Configure RVM, Download, and Set Default Ruby (reference):
    rvm get stable
    
    rvm install 3.1.2
    
    rvm --default use 3.1.2
    
  2. Check Version:
    ruby -v
    

3. Installing Rails

In order, copy and paste the following commands.

  1. Configure the .gemrc file to skip the installation of Ruby documentation
    echo "gem: --no-document" >> ~/.gemrc
    
  2. Install Rails with a specific version number:
    gem install rails -v 7.0.4
    
  3. Check Version:
    rails -v
    

Install Bundler:

  1. Installing Bundler with a specific version number:

    gem install bundler -v 2.3.14
    

Categories:

Updated: