[英]I am getting rvm: command not found after installation of rvm
I know the above question is very common question.我知道上面的问题是很常见的问题。 I have gone through multiple posts on this topic.我已经阅读了关于这个主题的多篇文章。 But I didn't get any resolution.但我没有得到任何解决方案。
I have installed rvm locally.我已经在本地安装了 rvm。 We already have the installation files.我们已经有了安装文件。 SO went into the folder and run the install command.所以进入文件夹并运行安装命令。
$ ./install
Then I checked./rvm folder in the Users home folde然后我检查了 Users 主文件夹中的 ./rvm 文件夹
$ cd ~/.rvm
folder exists.文件夹存在。 Hence Installation is successful.至此安装成功。
Now I am typing rvm in the command line现在我在命令行中输入 rvm
$ rvm
I am getting below exception我低于异常
$ rvm
-sh: rvm: command not found
After reading the multiple articles in stackoverflow on this issue, I learned that I have to add the below lines in.bash_profile as I am using Mac OSX 10.7.3在阅读了 stackoverflow 中关于此问题的多篇文章后,我了解到我必须在 .bash_profile 中添加以下行,因为我使用的是 Mac OSX 10.7.3
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Even after I am getting same exception while typing rvm.即使我在输入 rvm 时遇到同样的异常。 Is there any thing extra I need to do?我还需要做些什么吗? or Am I missing some thing?还是我错过了什么? Please help请帮忙
Steps to try out:试用步骤:
Log out and login to your system.注销并登录到您的系统。
Open a new terminal and manually run新开一个终端,手动运行
source $HOME/.rvm/scripts/rvm来源 $HOME/.rvm/scripts/rvm
then然后
rvm rvm
Check these work-arounds.检查这些解决方法。
To avoid running为了避免跑步
source $HOME/.rvm/scripts/rvm来源 $HOME/.rvm/scripts/rvm
every time you open a terminal, include this line into ~/.MacOSX/environment
in your Mac (This is similar to ~/.bashrc
in GNU/Linux-based systems under $home
aka ~
directory).每次打开终端时,将此行包含到 Mac 的~/.MacOSX/environment
中(这类似于基于 GNU/Linux 的系统中$home
又名~
目录下的~/.bashrc
)。
In my case, i am using Ubuntu Bash in Windows 10 and to fix the problem i used:就我而言,我在 Windows 10 中使用 Ubuntu Bash 并修复我使用的问题:
source /usr/local/rvm/scripts/rvm
For those that are doing this in 2018 just add对于那些在 2018 年这样做的人,只需添加
source $HOME/.rvm/scripts/rvm
to your.bash_profile within your home directory.到您的主目录中的 your.bash_profile。
you need to enable login shell in terminal emulator preferences, sometimes it is needed to use /usr/bin/bash --login
, here is an example https://rvm.io/integration/gnome-terminal/您需要在终端模拟器首选项中启用登录 shell,有时需要使用/usr/bin/bash --login
,这是一个示例https://rvm.io/integration/gnome-terminal/
after enabling login shell you need to close terminal application and open it fresh.启用登录 shell 后,您需要关闭终端应用程序并重新打开它。
I just had to open a new Terminal session.我只需要打开一个新的终端会话。
After I installed it using:安装后使用:
curl -sSL https://get.rvm.io | bash -s stable --ruby
rvm install 2.2
For Ubuntu 18.04, I had to run the command below to solve the issue after rvm was installed using instruction from here .对于 Ubuntu 18.04,在使用此处的说明安装rvm后,我必须运行以下命令来解决问题。
source /usr/share/rvm/scripts/rvm
This is one of other options available for RVM:这是 RVM 可用的其他选项之一:
source /etc/profile.d/rvm.sh
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.