找不到 rvm 命令 [英] rvm command not found

查看:102
本文介绍了找不到 rvm 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用rails安装了rvm,从RVM官网,我指定了教程建议的命令.安装时我的系统有 rails 4.0.0、rvm 01/23/12、ruby 2.0.0、bundler gem 1.3.5 和 2.0.3但是我需要安装 ruby​​ 1.9 来练习我目前正在做的课程.《僵尸铁轨 2》我尝试执行指令 rvm install 1.9.3 并且控制台返回此消息:rvm:找不到命令

I installed rvm with rails, from the official website of RVM, I specified the command suggested by the tutorial. When the installation my system has rails 4.0.0, rvm 01/23/12, ruby 2.0.0, bundler gem 1.3.5 and 2.0.3 But I need to install ruby 1.9 to practice with a course that I am currently doing. "Rails for Zombies 2" I try to execute the instruction rvm install 1.9.3 and the console returns this message: rvm: command not found

推荐答案

可能重复:Ubuntu rvm 设置问题

您的问题是当您打开新终端时未加载 RVM.

Your problem is that RVM is not loaded when you open a new terminal.

要解决此问题,请运行以下命令行:(如果使用 login-shell)

To solve this, run this command line: (if using login-shell)

echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile

或者这个(如果使用非登录shell):

echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc

或者如果您使用 zsh(和/或 oh-my-zsh):

Or if you are using zsh (and/or oh-my-zsh):

echo "source $HOME/.rvm/scripts/rvm" >> ~/.zshrc

这将添加 RVM 的路径以在每个终端实例化时加载.您必须关闭并重新打开您的终端,或者只需调用 source ~/.bashrc(或 ~/.bash_profile~/.zshrc).

This will add the path to RVM to load at each Terminal instantiation. You must either close and reopen your terminals or simply call source ~/.bashrc (or ~/.bash_profile or ~/.zshrc).

这篇关于找不到 rvm 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆