Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.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 macosx,变量路径的顺序,RVM和GIT_Ruby On Rails_Macos_Git_Command Line_Path - Fatal编程技术网

Ruby on rails macosx,变量路径的顺序,RVM和GIT

Ruby on rails macosx,变量路径的顺序,RVM和GIT,ruby-on-rails,macos,git,command-line,path,Ruby On Rails,Macos,Git,Command Line,Path,我提出一个问题,在这个问题之前: 我有一个大致的想法,就是在路径的.profile文件中将新版本的git放在旧版本之前 然而,问题是我以前在mac上安装过RubyonRails,并且rvm已经设置了路径,这意味着我无法在.profile文件中编辑它 当我运行echo$PATH时,“/usr/bin/bin”(带xcode的git)总是在“/usr/local/bin”(git的最新版本)之前,这不是我想要的。但是在.profile文件中,路径中只有/usr/local/bin 我不知道如何改变路

我提出一个问题,在这个问题之前:

我有一个大致的想法,就是在路径的.profile文件中将新版本的git放在旧版本之前

然而,问题是我以前在mac上安装过RubyonRails,并且rvm已经设置了路径,这意味着我无法在.profile文件中编辑它

当我运行echo$PATH时,“/usr/bin/bin”(带xcode的git)总是在“/usr/local/bin”(git的最新版本)之前,这不是我想要的。但是在.profile文件中,路径中只有/usr/local/bin

我不知道如何改变路径的顺序


有人知道吗?感谢

投票关闭-复制当我安装ruby on rails时,它将为我设置路径…因此我无法更改.profile文件中的路径继续讨论你的复制问题。@tt你的问题不是很清楚,你能粘贴“echo$path”和“cat~/.profile”的输出吗?