如何使 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屋!
查看全文