How do I make Ruby 1.9 the default Ruby on Ubuntu?

前端 未结 5 874
天命终不由人
天命终不由人 2020-12-04 11:23

Is there any way, on Ubuntu 9.04, to install Ruby 1.8 as ruby1.8 (or get rid of it altogether) and have Ruby 1.9 be the default ruby?

5条回答
  •  时光取名叫无心
    2020-12-04 12:12

    I'm not really sure, but maybe this can help:

    update-alternatives --config ruby
    

    ... and here's the non-interactive, scriptable, way:

    update-alternatives --set ruby /usr/bin/ruby1.9.1
    

    You may find out about available alternatives and respective /usr/bin/... paths by doing:

    update-alternatives --query ruby
    

提交回复
热议问题