如何更改rvm安装位置? [英] How to change rvm install location?

查看:284
本文介绍了如何更改rvm安装位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前我在/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

  1. 将您.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屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆