如何解决“/usr/bin/env: ruby​​_executable_hooks: No such file or directory"? [英] How to solve "/usr/bin/env: ruby_executable_hooks: No such file or directory"?

查看:29
本文介绍了如何解决“/usr/bin/env: ruby​​_executable_hooks: No such file or directory"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是在 vps 中部署了 jekyll,并在其上配置了 git post-receive hook.当我从笔记本电脑向 vps 推送博客更新时,我遇到了这个错误:

I just deploy jekyll in a vps, and config git post-receive hook on it. When I push blog update to vps from my laptop, I run into this error:

remote: /usr/bin/env: ruby_executable_hooks: No such file or directory

我搜索了一会,尝试了这个帖子中提出的方法:bundle update: env: ruby​​_executable_hooks: No such file or directory,即执行以下命令:

I searched for a while, and tried the method proposed in this post: bundle update: env: ruby_executable_hooks: No such file or directory, i.e., executing the commands below:

rvm @global do gem regenerate_binstubs
gem regenerate_binstubs

但这无济于事,错误仍然存​​在.由于我不熟悉 rvm 或 ruby​​,有人可以给我提示吗?

But it doesn't help, the error remains. Since I'm not familiar with rvm or ruby, could anyone give me a hint?

推荐答案

使用包装器,例如:

$ which jekyll
# /path/to/rvm/gems/ruby-version/bin/jekyll

在返回的路径中用 wrappers 替换 bin 这样你得到:

in the returned path replace bin with wrappers so you get:

/path/to/rvm/gems/ruby-version/wrappers/jekyll

这是一个脚本,可以加载适当的环境并解决您的问题,包装器是使用 RVM 自动生成的.

this is a script that will load proper environment and fix your problem, wrappers are generated automatically withing RVM.

这篇关于如何解决“/usr/bin/env: ruby​​_executable_hooks: No such file or directory"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆