Ruby-on-rails 找不到 rvm 命令

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19595974/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 22:56:51  来源:igfitidea点击:

rvm command not found

ruby-on-railsrubyruby-on-rails-3ruby-on-rails-4

提问by Hell0

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.3and the console returns this message: rvm: command not found

我用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 来练习我目前正在做的课程。“Rails for Zombies 2”我尝试执行指令rvm install 1.9.3,控制台返回此消息: rvm: command not found

回答by MrYoshiji

Possible duplicate of: Ubuntu rvm setup issue

可能重复:Ubuntu rvm 设置问题



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

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

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

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

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

Or this (if using non-login shell):

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

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

This will add the path to RVM to load at each Terminal instanciation (close & re-open a terminal after you did this).

这将添加到 RVM 的路径以在每个终端实例化时加载(在您执行此操作后关闭并重新打开终端)。