How to update ruby on linux (ubuntu)?

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

    Ruby is v2.0 now. Programs like Jekyll (and I am sure many others) require it. I just ran:

    sudo apt-get install ruby2.0

    check version

    ruby --version
    

    Hope that helps

    0 讨论(0)
  • 2021-01-30 03:56

    the above is not bad, however its kinda different for 11.10

    sudo apt-get install ruby1.9 rubygems1.9
    

    that will install ruby 1.9

    when linking, you just use ls /usr/bin | grep ruby it should output ruby1.9.1

    so then you sudo ln -sf /usr/bin/ruby1.9.1 /usr/bin/ruby and your off to the races.

    0 讨论(0)
  • 2021-01-30 03:57

    First, which version of ubuntu are you using, it might be easiest to just upgrade to one that has it.

    Next, enable backports (system menue, adminstration, software sources), and search for in in synaptic.

    Last, look for a ppa for it.

    0 讨论(0)
提交回复
热议问题