I have a post-merge
hook in my git repository that just runs the jekyll
command.
When I run git pull
, the post-merge
runs with no problems.
However, I have setup a PHP file which will act as a WebHook for the remote:
$pull = `cd .. && git pull`;
echo $pull;
When I access this file, the git pull runs (after some initial problems) and is successful. However, for some reason the post-merge
fails. If I look inside of my Apache error_log
, I find the following error:
.git/hooks/post-merge: line 5: jekyll: command not found
This is odd, considering the post-merge
successfully runs jekyll when I do a manual git pull
via SSH.
If I run use the full path to the executable as suggested here, I get this error in my error_log
:
/usr/bin/env: ruby_noexec_wrapper: No such file or directory
I installed Ruby through RVM.
How is it possible to have the apache
user run jekyll
with no problems?
Edit: Here is my current post-merge
:
#!/bin/sh
unset GIT_DIR
source /usr/local/rvm/environments/ruby-1.9.3-p194
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/jekyll
echo "Deployed!"
When I run this as the apache
user, I now get this error:
Node.js is installed.