How to install Ruby 2 on Ubuntu without RVM

后端 未结 6 1134
一生所求
一生所求 2020-12-07 08:38

I want to install ruby 2.0 using

sudo apt-get install ruby2.0

But there isn\'t available package for ruby2.0

I wan

6条回答
  •  忘掉有多难
    2020-12-07 09:31

    Since this question was answered I have found a new alternative here:

    https://www.brightbox.com/docs/ruby/ubuntu/

    In short:

    # For ubuntu >= 14.04 install software-properties-common
    # instead of python-software-properties
    sudo apt-get install python-software-properties
    sudo apt-add-repository ppa:brightbox/ruby-ng
    sudo apt-get update
    
    sudo apt-get -y install ruby2.2 ruby-switch
    sudo ruby-switch --set ruby2.2
    

    I must say that according to my tests this is faster than the alternatives shown here, because the compiling step is skipped.

提交回复
热议问题