Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Programming»Ruby»How To Install Ruby on Fedora 33/32 with RVM

    How To Install Ruby on Fedora 33/32 with RVM

    RahulBy RahulFebruary 1, 20173 Mins ReadUpdated:December 17, 2020

    How to Install Ruby on Fedora 33/32/31/30 with RVM. Ruby is a dynamic, object-oriented programming language. We are using RVM, which stands for Ruby Version Manager, which makes easier to install Ruby on Linux platform. RVM is also helpful for managing multiple version of Ruby without conflicting, and we can switch the system to any version of Ruby using a single command.

    This tutorial will help you to install Ruby stable release on your Fedora systems using RVM.

    Step 1 – Prerequisites

    First of all, we need to install all required packages for ruby installation on our system using the following command. Login to your Fedora system and open terminal.

    sudo dnf install gcc-c++ patch readline readline-devel zlib zlib-devel \
        libyaml-devel libffi-devel openssl-devel make \
        bzip2 autoconf automake libtool bison sqlite-devel 
    

    Step 2 – Install RVM

    Then, install the latest stable version of RVM on your system using the following command. This command will automatically download all required files and install on your system.

    curl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import - 
    curl -sSL https://rvm.io/pkuczynski.asc | sudo gpg2 --import - 
    curl -L get.rvm.io | sudo bash -s stable  
    

    Also, run below command to load RVM environment.

    source /etc/profile.d/rvm.sh 
    rvm reload 
    

    Step 3 – Verify Dependencies

    Now use the following command to verify all dependencies are properly installed.

    rvm requirements run 
    
    Checking requirements for fedora.
    Requirements installation successful.
    

    Step 4 – Install Ruby on Fedora

    Now, your system is ready for the Ruby installation. You can find the available Ruby version for installation using below command.

    rvm list known 
    

    Then install the required Ruby version on your system. Here, I am installing Ruby 2.6 on my Fedora 30 system. You can simply replace the version to below command of your choice and install.

    sudo rvm install 2.7 
    

    Step 5 – Setup Default Ruby Version

    First of all, check currently installed ruby versions on your system.

    rvm list 
    
       ruby-2.4.4 [ x86_64 ]
     * ruby-2.5.1 [ x86_64 ]
    => ruby-2.7.0 [ x86_64 ]
    
    # => - current
    # =* - current && default
    #  * - default
    

    After that use rvm command to set up the default ruby version to be used by applications.

    sudo rvm use 2.7 --default 
    
    Using /usr/local/rvm/gems/ruby-2.7.0
    

    Step 6 – Check Current Ruby Version.

    Using following command you can check the current ruby version is used.

    ruby --version 
    
    ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
    

    Congratulation’s, Finally you have successfully installed Ruby on your system. Read our next article to integrate Ruby with Apache web server with easy steps.

    References:
    1. http://rvm.io/rubies/installing

    install ruby ruby ruby on fedora ruby stable install ruby-lang rvm
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install Node.js on Debian 11/10/9
    Next Article Features & Differences in Ext2, Ext3 and Ext4 Linux Filesystem

    Related Posts

    How to Install Ruby on Ubuntu 20.04

    Updated:July 27, 20204 Mins Read

    How to Install Ruby on CentOS/RHEL 8 and Scientific Linux

    Updated:April 3, 20203 Mins Read

    How to Install Ruby on Debian with RVM

    Updated:November 10, 20204 Mins Read

    How to Deploy Ruby App with Nginx and Passenger on Ubuntu and Debian

    Updated:November 1, 20173 Mins Read

    How to Deploy Ruby App with Apache and Passenger on Ubuntu and Debian

    Updated:October 31, 20173 Mins Read

    How to Deploy Ruby Application with Passenger and Apache on CentOS 7/6, Fedora 27

    Updated:October 31, 20172 Mins Read

    7 Comments

    1. Sebastian on December 13, 2020 7:24 pm

      Doing “sudo -i” at the begginig is a terrible idea. In worst case scenario it may render using some of the tools absolutly impossible (it will be impossible to use “gem install” for example), and the mess it creates is very difficult to fix.

      So this will install rvm and ruby on your system all right. But it will be useless for most of the part, and it will create a major mess on your system.

      Don’t use sudo -i, instead use sudo where you actually need it.

      Reply
      • Rahul on December 17, 2020 3:12 am

        Thanks Sebastian, You are write, tutorial has been updated accordingly

        Reply
      • Koq on March 31, 2021 11:08 pm

        Fedora 33

        $ sudo rvm install 2.7
        sudo: rvm: command not found

        Reply
    2. bumbaa on July 24, 2019 6:48 pm

      is it gpg2 instead of gpg3?

      Reply
      • Rahul on July 25, 2019 5:54 am

        Thanks Bumbaa, Article has been updated.

        Reply
    3. Krunal on March 1, 2019 4:54 am

      Thanks dear for help really helpful .

      Reply
    4. Arian Johnson on March 2, 2018 6:52 pm

      Good tutorial. Just a quick correction; you have “rvm install 2.3.3,” but I’m sure you meant “rvm install 2.3.5.” Keep up the good work!

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.