Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.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版本_Ruby_Rvm_Pre Commit - Fatal编程技术网

在预提交钩子中更改Ruby版本

在预提交钩子中更改Ruby版本,ruby,rvm,pre-commit,Ruby,Rvm,Pre Commit,我在2.6.3中安装了RVM,但预提交挂钩正在将我的版本改回“system”,即2.3.7。我不确定这是如何发生的/为什么发生的,因为当我在预提交之外运行bundle check时,它工作得很好。这是我得到的日志,以及我的.bash_配置文件和.bashrc。我尝试在my.bashrc中使用“[-s”$HOME/.rvm/scripts/rvm”]&&source“$HOME/.rvm/scripts/rvm”,但没有成功。非常感谢任何对这个问题有更多信息的人 git提交-m“尝试” 使用/Us

我在2.6.3中安装了RVM,但预提交挂钩正在将我的版本改回“system”,即2.3.7。我不确定这是如何发生的/为什么发生的,因为当我在预提交之外运行bundle check时,它工作得很好。这是我得到的日志,以及我的.bash_配置文件和.bashrc。我尝试在my.bashrc中使用“[-s”$HOME/.rvm/scripts/rvm”]&&source“$HOME/.rvm/scripts/rvm”,但没有成功。非常感谢任何对这个问题有更多信息的人

git提交-m“尝试”
使用/Users/matt/.rvm/gems/ruby-2.6.3
husky>预提交(节点v8.12.0)
您的Ruby版本是2.3.7,但您的Gemfile指定了2.6.3
husky>预提交挂钩失败(添加--无需验证即可绕过)

.bash_简介

export PATH=/usr/local/bin:$PATH
[[-s“$HOME/.rvm/scripts/rvm”]&&source“$HOME/.rvm/scripts/rvm”
巴什尔先生

export PATH=“$PATH:$HOME/.rvm/bin”

您已经安装了它,但您正在使用它吗? 类型:


要使用上述版本的ruby

很抱歉,我可能没有指定。我正在使用那个版本。如果您查看日志,它会说我使用的是2.6.3,但随后它会返回到2.3.7,project root中的.ruby版本文件会说什么?2.6.3,这就更奇怪了。
rvm use 2.6.3