4

I am trying to install Jekyll following http://jekyllrb.com/docs/installation/

○ → sudo gem install jekyll
Password:
Fetching: jekyll-2.5.3.gem (100%)
Successfully installed jekyll-2.5.3
Parsing documentation for jekyll-2.5.3
Installing ri documentation for jekyll-2.5.3
1 gem installed

This seems successful... But:

○ → jekyll
-bash: jekyll: command not found

It is not even clear where to look for it...

○ → locate jekyll
/Users/dmitrizaitsev/.bash_it/plugins/available/jekyll.plugin.bash
/Users/dmitrizaitsev/.bash_it/template/jekyllconfig.template.bash
/Users/dmitrizaitsev/.gem/specs/rubygems.org%80/quick/Marshal.4.8/jekyll-1.5.1.gemspec

○ → ruby -v
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]

I am on Mac OSX 10.8.5 (Mountain Lion)

Any idea what happens here?

These two old threads do not help:

https://stackoverflow.com/questions/19276621/jekyll-installed-but-command-not-found

https://stackoverflow.com/questions/8146249/jekyll-command-not-found

2 Answers 2

2

My issue was that, for whatever reason, sudo gem install jekyll installed to /usr/local/bin, which was in my user's PATH, but not root's PATH.

Here are the commands I ran, and what they output for me:

  1. which jekyll - Find the jekyll binary being used by your user

/usr/local/bin/jekyll

  1. sudo su - Switch users to root
  2. echo $PATH - List the directories root is looking for commands.

/sbin:/bin:/usr/sbin:/usr/bin

If the path from #1 (/usr/local/bin for me) is listed here, then you're having a different issue, and #4 won't help you

  1. ln -s /usr/local/bin/jekyll /usr/bin/jekyll - Create a symbolic link to (path from 1) from (one of the paths from 3)
0

Your problem is you used sudo and now you don't have the correct permissions. This is just a guess but try installing with sudo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .