Ruby on rails RVM未设置路径变量
我正在我的计算机上运行以下命令: rvm使用ruby-v2.1.1之后我得到了以下错误:Ruby on rails RVM未设置路径变量,ruby-on-rails,ruby,path,rvm,ubuntu-12.04,Ruby On Rails,Ruby,Path,Rvm,Ubuntu 12.04,我正在我的计算机上运行以下命令: rvm使用ruby-v2.1.1之后我得到了以下错误: Using /home/sfawebuser/.rvm/gems/ruby-2.1.2 Command 'sort' is available in '/usr/bin/sort'Command 'head' is available in '/usr/bin/head' The command could not be located because '/usr/bin' is not include
Using /home/sfawebuser/.rvm/gems/ruby-2.1.2 Command 'sort' is available in '/usr/bin/sort'Command 'head' is available in '/usr/bin/head' The command could not be located because '/usr/bin' is not included in the PATH environment variable.The command could not be located because '/usr/bin' is not included in the PATH environment variable. head: command not foundsort: command not found
看起来它正在覆盖路径值并删除/usr/bin。然后我找到了.profile文件的源文件,其中包含/usr/bin。当我再次运行上面的命令时,我得到了完全相同的错误。因此,在RVM中的某个地方,它正在执行一个导出路径=“…”,该路径覆盖了原始路径,并且不知何故忘记了包含原始路径,该路径包含/usr/bin。在执行任何rvm命令后,都必须手动查找.profile文件,这是一个恼人的问题。我看了一下代码,但有点混乱。有没有人见过这个问题以及它是如何解决的
rvm列表的输出:
Command 'awk' is available in '/usr/bin/awk'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
awk: command not found
Command 'dpkg' is available in '/usr/bin/dpkg'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
dpkg: command not found
Command 'tr' is available in '/usr/bin/tr'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
tr: command not found
/somepath/.rvm/scripts/functions/utility_system: line 21: awk: command not found
/somepath/.rvm/scripts/functions/utility_system: line 22: dpkg: command not found
/somepath/.rvm/scripts/functions/utility_system: line 191: tr: command not found
rvm rubies
/somepath/.rvm/scripts/list: line 245: sort: command not found
No rvm rubies installed yet. Try 'rvm help install'.
试试看:
rvm-reload
和rvm-install 2.1.1
和rvm-use 2.1.1
这么简单真是不可思议!谢谢Maringan!节省了我很多时间。。。我喜欢先自己想办法解决问题,但经过8个多小时的徒劳之后,我决定是时候寻求帮助了:-)感谢您的及时回复。