如何更改rvm安装位置? [英] How to change rvm install location?
问题描述
当前我在/home/john/.rvm
如何将rvm移动到/opt/local/rvm
位置?
How do move rvm to the location /opt/local/rvm
?
我尝试使用rvmrc文件来解决此问题(根据此处的rvm文档: https://rvm.io/工作流程/rvmrc/),但是没有运气,我在/etc/
I tried to use the rvmrc file to take care of this (according to the rvm document here: https://rvm.io/workflow/rvmrc/ ) but no luck, I found a rvmrc
file under /etc/
我可以遵循任何分步说明吗?
Is there any step by step instruction I could follow?
推荐答案
通过在线研究来弄清楚自己,希望这可以帮助某人:
Figure out myself by doing some research online, hope this can help someone out:
假设您要从home/username/.rvm
移到/opt/local/rvm
-
将您
.bash_profile
或.bashrc
更新为:
if [ -s "$HOME/.rvmrc" ]; then
source "$HOME/.rvmrc"
fi # to have $rvm_path defined if set
if [ -s "${rvm_path-$HOME/.rvm}/scripts/rvm" ]; then
source "${rvm_path-$HOME/.rvm}/scripts/rvm"
fi
在$HOME/.rvmrc
下找到您的.rvmrc
,如果找不到,请创建一个并在其中添加以下行:
find your .rvmrc
under $HOME/.rvmrc
, if not found, create one and put this line in it:
export rvm_path=/opt/local/rvm
你很好!
这篇关于如何更改rvm安装位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!