我已安装RVM enroute更新和运行不同的ruby和rails。安装后我收到消息来更新shell的加载文件。安装RVM后更新文件
1)将如下因素线在你的shell加载文件 (.bashrc中结束或如bash的.bash_profile和.zshrc为zsh中), 所有的PATH /变量的设置后:
[[ -s "/Users/eric/.rvm/scripts/rvm" ]] && source "/Users/eric/.rvm/scripts/rvm" # This loads RVM into a shell session.
You only need to add this line the first time you install rvm.
我键入[[ -s "/Users/eric/.rvm/scripts/rvm" ]] && source "/Users/eric/.rvm/scripts/rvm"
并按回车键。这是否更新我的文件?或者我必须打开某种类型的文件并剪切并粘贴代码?
由于我没有看到从安装后的第2部分看到如下所述的任何通知,所以我关闭了外壳并打开了一个新的外壳。但是RVM命令似乎不起作用。部分的说明2安装后为:
2)确保没有在〜/ .bashrc文件中“回归”, 否则RVM可以正常工作来防止。
这意味着,如果你看到这样:
'[ -z "$PS1" ] && return'
,那么你改变这一行:
如果[-n “$ PS1”]];然后
# ... original content that was below the '&& return' line ...
网络#< =一定要关闭,如果在.bashrc中结束。
#这是一个很好的地方源RVM VVV [[-s “/Users/eric/.rvm/scripts/rvm”]] & &源 “/Users/eric/.rvm/scripts/rvm” #这会将RVM加载到shell会话中。
EOF - 这标志着.bashrc文件的末尾
Be absolutely *sure* to REMOVE the '&& return'.
If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile.
Placing all non-interactive (non login) items in the .bashrc,
including the 'source' line above and any environment settings.
感谢您的帮助,我很新,并努力学习回报率,但到目前为止还没有能够闯过设置许多我尝试过的教程。看来很多[ 12已经过时了新的软件,或者在我甚至可以尝试学习代码之前得到错误消息。如果有人知道一个很好的初学者教程。再次感谢!