OS X Mavericks install rvm WARNING

后端 未结 2 1554
鱼传尺愫
鱼传尺愫 2021-02-10 21:29

When running this in terminal:

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

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

<
2条回答
  •  误落风尘
    2021-02-10 21:50

    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.

    From the bash docs:

    When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.

    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.

提交回复
热议问题