本文介绍了OS X小牛安装rvm警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在终端中运行时:

$ curl -L https://get.rvm.io | bash -s

它似乎工作正常,但在升级说明最后, p>

It seems to work fine, but in the Upgrade Notes at the end it says

 * WARNING: You have '~/.profile' file, you might want to load it,
    to do that add the following line to '/Users/steven/.bash_profile':

      source ~/.profile

我无法使用RVM,得到错误

And I can't use RVM, getting the error

-bash: rvm: command not found'

我对terminal和Ruby很新鲜,所以任何帮助将非常感激。

I am pretty new to terminal and Ruby, so any help would be greatly appreciated.

推荐答案

安装rvm时,其路径将添加到〜/ .bash_profile 。 RVM会在您注意到安装过程中警告您。每次加载终端时,您可以运行源〜/ .profile ,但这是一个痛苦的脖子。

When you install rvm its paths get added to ~/.bash_profile. RVM will warn you about this during installation as you noticed. You could run source ~/.profile each time you load the terminal, but that's a pain in the neck.

从bash文档:

这意味着 /。bash_profile 正在运行, /。

What this means is that /.bash_profile is being run, and /.profile and /.bashrc are being ignored.

要解决这个问题只需打开

To resolve this just open .bash_profile and copy the rvm paths at the top and paste them at the top of your .bashrc file. Open a new terminal window and it should be working just fine. You can either delete .bash_profile, if it's empty, or copy and paste the contents of ~/.profile into it if you choose to keep it.

这篇关于OS X小牛安装rvm警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 17:52
查看更多