Believe me I have tried to solve this on my own before coming here. But I am at a loss at what to try next. I am getting the error remote: /usr/bin/env: ruby_executable_hooks: No such file or directory
I get this when running a post-receive hook in git on Ubuntu 14.04 server. I went through past issues here as well as a bunch of Stack Overflow posts and tried the following:
rvm @global do gem install executable-hooks
rvm @global do gem regenerate_binstubs
and also
rvm @global do gem install rubygems-bundler
Neither helped. Any advice you have would be greatly appreciated.
Here is the script I am running:
#!/bin/sh
GIT_REPO=/path/to/git/repo
TMP_GIT_CLONE=/tmp/blog
PUBLIC_WWW=/path/to/site
STAGING_WWW=/path/to/staging/version
JEK=/home/[username]/.rvm/gems/ruby-2.1.3/bin/jekyll
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ "$branch" = "master" ]; then
git clone -b master $GIT_REPO $TMP_GIT_CLONE
$JEK build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
elif [ "$branch" = "staging" ]; then
git clone -b staging $GIT_REPO $TMP_GIT_CLONE
$JEK build -s $TMP_GIT_CLONE -d $STAGING_WWW
fi
rm -rf $TMP_GIT_CLONE
done
Just to be clear, I dropped my actual username from the JEK variable just for the purposes of our discussion here. The username is as it should be on the server version.
Believe me I have tried to solve this on my own before coming here. But I am at a loss at what to try next. I am getting the error
remote: /usr/bin/env: ruby_executable_hooks: No such file or directory
I get this when running a post-receive hook in git on Ubuntu 14.04 server. I went through past issues here as well as a bunch of Stack Overflow posts and tried the following:
and also
Neither helped. Any advice you have would be greatly appreciated.
Here is the script I am running:
Just to be clear, I dropped my actual username from the
JEK
variable just for the purposes of our discussion here. The username is as it should be on the server version.