Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails RVM未设置路径变量_Ruby On Rails_Ruby_Path_Rvm_Ubuntu 12.04 - Fatal编程技术网

Ruby on rails RVM未设置路径变量

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

我正在我的计算机上运行以下命令:

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 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个多小时的徒劳之后,我决定是时候寻求帮助了:-)感谢您的及时回复。