我只是在 vps 中部署 jekyll,并在其上配置 git post-receive hook。当我从我的笔记本电脑将博客更新推送到 vps 时,我遇到了这个错误:
remote: /usr/bin/env: ruby_executable_hooks: No such file or directory
我搜索了一下,尝试了这篇帖子中提出的方法:bundle update: env: ruby_executable_hooks: No such file or directory ,即执行以下命令:
rvm @global do gem regenerate_binstubs
gem regenerate_binstubs
但是没有用,错误依旧。由于我不熟悉 rvm 或 ruby,有人可以给我提示吗?
最佳答案
使用包装器,例如:
$ which jekyll
# /path/to/rvm/gems/ruby-version/bin/jekyll
在返回的路径中用 wrappers
替换 bin
这样你就可以得到:
/path/to/rvm/gems/ruby-version/wrappers/jekyll
这是一个脚本,它将加载适当的环境并解决您的问题,包装器是使用 RVM 自动生成的。
关于ruby - "/usr/bin/env: ruby_executable_hooks: No such file or directory"怎么解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26247926/