Currently, my rvm based projects specify rvm 1.8.7@gemset in .rvmrc. This means that when I am installing the gemset of a new project, it will default to the latest patch level of 1.8.7, eg. ruby-1.8.7-p352 . Now I don't want to hard code '1.8.7-p352' in the rvmrc as other developers(or other projects) might have some other patch levels installed on their machine(from other projects) and also I don't want to install different patch levels of ruby on my machine.
目前,基于rvm的项目在.rvmrc中指定rvm 1.8.7@gemset。这意味着当我安装一个新项目的gemset时,它将默认为1.8.7的最新补丁级别,例如。ruby-1.8.7-p352。现在我不想在rvmrc中硬编码“1.8.7-p352”,因为其他开发人员(或其他项目)可能在他们的机器上安装了其他的补丁级别(来自其他项目),而且我也不想在我的机器上安装不同级别的ruby补丁。
Is there a way to make rvm ignore the patch level and just make it use any version of 1.8.7 installed - so that I can use one patchlevel of Ruby 1.8.7 across all projects.
有没有一种方法可以让rvm忽略补丁级别,只让它使用任何版本的1.8.7安装——这样我就可以在所有项目中使用一个patchlevel的Ruby 1.8.7了。
1 个解决方案
#1
15
The thing you want to set up is called an rvm alias
. See: http://rvm.io/rubies/alias
您希望设置的东西称为rvm别名。参见:http://rvm.io/rubies/alias
For your example the commands would be:
对于你的例子,命令是:
rvm alias create 1.8.7 ruby-1.8.7-p352
#1
15
The thing you want to set up is called an rvm alias
. See: http://rvm.io/rubies/alias
您希望设置的东西称为rvm别名。参见:http://rvm.io/rubies/alias
For your example the commands would be:
对于你的例子,命令是:
rvm alias create 1.8.7 ruby-1.8.7-p352