如何使Ruby 1.9成为Ubuntu上的默认Ruby? [英] How do I make Ruby 1.9 the default Ruby on Ubuntu?
本文介绍了如何使Ruby 1.9成为Ubuntu上的默认Ruby?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Ubuntu 9.04上,有什么方法可以将Ruby 1.8安装为ruby1.8
(或完全摆脱它)并让Ruby 1.9成为默认的ruby
?
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
?
推荐答案
我不确定,但这也许可以帮助您
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
您可以通过执行以下操作找到可用的替代方法和相应的/usr/bin/...
路径:
You may find out about available alternatives and respective /usr/bin/...
paths by doing:
update-alternatives --query ruby
这篇关于如何使Ruby 1.9成为Ubuntu上的默认Ruby?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文