Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

ruby - How to solve "/usr/bin/env: ruby_executable_hooks: No such file or directory"?

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

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

use wrappers, example:

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

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

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...