我正在通过示例教程系列来了解 Rails.在提出问题之前,我会尽力找到解决方案,因此,如果我错过了任何内容,我深表歉意.
I'm going through the rails by example tutorial series. I'm trying my best to find solutions prior to asking questions, so if I have missed anything I apologise.
每次我需要从终端的命令行启动 RVM 时,我都需要敲一个命令,以便 RVM 初始化:source ~/.rvm/scripts/rvm
Every time I need to boot up RVM from the command line in terminal I need to punch a command so that RVM initialises: source ~/.rvm/scripts/rvm
这正常吗?除非我事先输入此代码,否则我似乎无法使 RVM 命令工作.注意我只需要输入一次命令,而不是每次需要输入 RVM 命令时.
Is this normal? It seems that I cant get the RVM commands to work unless I punch in this code prior. Note I only have to enter the command once, not every time I need to enter an RVM command.
非常感谢您的帮助.
推荐答案把它放在你的 ~/.profile 或 ~/.bashrc 中:
Put this in your ~/.profile or ~/.bashrc:
# This loads RVM into a shell session. [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"因此您不必为每个会话手动输入它.
So you don't have to manually type it for every session.
更多推荐
RVM 命令:source ~/.rvm/scripts/rvm
发布评论