I have a post-merge hook in my git repository that just runs the jekyll command.
When I run git pull , post-merge works without problems.
However, I have a PHP file that will act as a WebHook for the remote:
$pull = `cd .. && git pull`; echo $pull;
When I access this file, git pulls works ( after some initial problems ) and succeeds. However, for some reason post-merge fails. If I look inside my Apache error_log , I find the following error:
.git/hooks/post-merge: line 5: jekyll: command not found
This is odd, given that post-merge runs jekyll successfully when I do the git pull manual via SSH.
If I 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 can I run jekyll apache without 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 an apache user, now I get this error:

Node.js.
user1082754
source share