How to update ruby on linux (ubuntu)?

前端 未结 9 544
难免孤独
难免孤独 2021-01-30 03:13

I\'m newbie on both ruby and linux, so I\'m sure this is trivial but I don\'t know yet. I currently have ruby 1.8.7 installed and I want to update it to ruby 1.9. How can I do t

9条回答
  •  盖世英雄少女心
    2021-01-30 03:46

    There's really no reason to remove ruby1-8, unless someone else knows better. Execute the commands below to install 1.9 and then link ruby to point to the new version.

    sudo apt-get install ruby1-9 rubygems1-9
    sudo ln -sf /usr/bin/ruby1-9 /usr/bin/ruby
    

提交回复
热议问题