Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jekyll: command not found #1155

Closed
klick opened this issue May 26, 2013 · 17 comments

Comments

@klick
Copy link

commented May 26, 2013

Hi.

I am having this problem with building the site after git push to remote repository and then let the post-receive hook take care of the building (as suggested in the official documentation).

Error message is:

remote: hooks/post-receive: line 6: jekyll: command not found

jekyll is version: 1.0.2 (no issues during installation)
ruby is version 1.9.3

Any hints? I can not seem to solve this problem on my own.
thanks.

@parkr

This comment has been minimized.

Copy link
Member

commented May 26, 2013

What Ruby Version Manager are you using? RVM/rbenv/chruby? You'll need to specify the full path to the jekyll executable if it is not in your post-receive hook's $PATH variable. Hope that helps!

@parkr parkr closed this May 26, 2013

@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

thank you.
i’ll have a look into this.

@parkr

This comment has been minimized.

Copy link
Member

commented May 27, 2013

Let us know if you need any more help!

@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

To be honest -- i have no idea what you’re talking about since that’s pretty much low-level stuff to me but i’ll try to figure it out. :)

@parkr

This comment has been minimized.

Copy link
Member

commented May 27, 2013

This is what I would try (with my system's output):

$ which jekyll
/Users/parker/.rbenv/shims/jekyll
$ # copy the full path "/Users/parker/.rbenv/shims/jekyll" to the post-receive hook
$ git push <remote> master

And see what happens! Try the full path to the jekyll executable.

@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

thanks.
where does the path go?

my hook:

GIT_REPO=$HOME/git_root/blog.git
TMP_GIT_CLONE=$HOME/tmp/blog
PUBLIC_WWW=/var/www/virtual/***/html

git clone $GIT_REPO $TMP_GIT_CLONE
jekyll build $TMP_GIT_CLONE $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit

edit:
that’s my path (remote):
~/.gem/ruby/1.9.1/bin/jekyll

@parkr

This comment has been minimized.

Copy link
Member

commented May 27, 2013

It'll replace the jekyll call there. You'll also have to add the -s and -d options. (Ref: #1157) Also, replace ~ with the absolute path to your home.

GIT_REPO=$HOME/git_root/blog.git
TMP_GIT_CLONE=$HOME/tmp/blog
PUBLIC_WWW=/var/www/virtual/***/html
JEKYLL="/home/klick/.gem/ruby/1.9.1/bin/jekyll"

git clone $GIT_REPO $TMP_GIT_CLONE
$JEKYLL build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

ah, i see. that makes sense. still doesn’t work though.
i did run prevoius versions of jekyll with no issues.

guess i have to talk to my hoster.
parkr, thanks a lot for your help!

@parkr

This comment has been minimized.

Copy link
Member

commented May 27, 2013

Hm, that should work! What error were you getting?

@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

jekyll: command not found , still.

I’ll talk to my hoster (uberspace.de, btw.).
Maybe they can sort it out. Will post here, if so.

@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

have it working now!
had a typo in my last attempt.

your method did the trick.
thanks the heavens 👍 :D

@parkr

This comment has been minimized.

Copy link
Member

commented May 27, 2013

Great! Glad it's all working :)

@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

Yes, same here. :)

@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

question though: what’s the meaning of this? is ruby or something else misconfigured?

@parkr

This comment has been minimized.

Copy link
Member

commented May 27, 2013

It means that your post-receive hook doesn't have the same environment as you when you have logged in. Specifically, your $PATH does not include the directory where your gem executables are housed.

@klick

This comment has been minimized.

Copy link
Author

commented May 27, 2013

cool, thanks.
i am investigating further.

you’ve been very helpful.

@parkr

This comment has been minimized.

Copy link
Member

commented May 28, 2013

Happy to help!

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.