rvm 安装 ruby 之后,必须执行 /bin/bash --login 才能执行 ruby 命令
2016-09-07 13:13
357 查看
安装ruby以后执行
错误信息:
解决办法:
<code class="language-ruby hljs has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">rvm use <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.3</span>.<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">0</span> --default</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>
错误信息:
<code class="language-ruby hljs has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-constant" style="box-sizing: border-box;">RVM</span> is <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> a function, selecting rubies with <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'rvm use ...'</span> will <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> work. <span class="hljs-constant" style="box-sizing: border-box;">You</span> need to change your terminal emulator preferences to allow login shell. <span class="hljs-constant" style="box-sizing: border-box;">Sometimes</span> it is required to use `/bin/bash --login` as the command. <span class="hljs-constant" style="box-sizing: border-box;">Please</span> visit <span class="hljs-symbol" style="color: rgb(0, 102, 102); box-sizing: border-box;">https:</span>/<span class="hljs-regexp" style="color: rgb(0, 136, 0); box-sizing: border-box;">/rvm.io/integration</span><span class="hljs-regexp" style="color: rgb(0, 136, 0); box-sizing: border-box;">/gnome-terminal/</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">for</span> an example.</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li></ul>
解决办法:
<code class="language-ruby hljs has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">echo <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"'</span> >>~<span class="hljs-regexp" style="color: rgb(0, 136, 0); box-sizing: border-box;">/.bashrc source ~/</span>.bashrc ruby -v</code>
相关文章推荐
- rvm 安装 ruby 之后,必须执行 /bin/bash --login 才能执行 ruby 命令
- 【转】rvm安装ruby,gem,rails,之后仍然无法找到rails命令
- oracle安装完成之后,执行sqlplus命令,提示:bash: sqlplus: command not found...
- linux下执行 ls,cat等一些命令报出 -bash: /bin/cat: Cannot allocate memory 有没解决的方法
- mysql安装目录bin下面可执行程序命令详解
- 如果使用没有提供选项值的 SqlDependency,必须先调用 SqlDependency.Start(),然后才能执行添加到 SqlDependency 实例中的命令
- Centos7 Minni 安装 执行ifconfig命令出现 -bash ifconfig command not found 的解决方法
- 解决:必须安装“System.Workflow.ComponentModel.Design.IIdentifierCreationService”服务,才能成功执行此操作。
- ubuntu gcc g++ 未找到命令 安装 gcc-4.4 /bin/bash: cc: 未找到命令
- CM安装好集群之后在shell命令下执行hive 或者hbase操作遇到权限问题的解决方法
- mysql安装目录bin下面可执行程序命令详解
- linux 中安装JDK后执行java报错 :-bash: bin/java: cannot execute binary file
- 在Linux中#!/usr/bin/python之后把后面的代码当成程序来执行。 但是在windows中用IDLE编程的话#后面的都是注释,之后的代码都被当成文本了。 该怎么样才能解决这个问题呢?
- 安装java之后,找不到tools.jar和dt.jar(dos下javac命令无法执行)
- ubuntu安装ruby+rails,sources ~/.bash_profile,重新启动电脑该命令不生效
- 安装了Mathtype之后出现“打开对话框命令无法执行”解决方法!
- ubuntu gcc 版本 过高 安装 gcc 4.4 /bin/bash: cc: 未找到命令
- [iOS ruby升级=>才能安装cocoaPods]使用rvm升级Ruby
- 安装oracle11g时 su: /bin/bash: Too many open files in system