How to update ruby on linux (ubuntu)?

前端 未结 9 545
难免孤独
难免孤独 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

    sudo apt-get install ruby1.9
    

    should do the trick.

    You can find what libraries are available to install by

    apt-cache search 
    

    So I just did apt-cache search ruby | grep 9 to find it.

    You'll probably need to invoke the new Ruby as ruby1.9, because Ubuntu will probably default to 1.8 if you just type ruby.

提交回复
热议问题