Take the 2-minute tour ×

I am trying to get Jekyll running but I have no experience with Ruby.
As far as I can tell the installation of Jekyll has succeeded.

$ jekyll

Gives an error:

-bash: jekyll: command not found

This is the gem env result:

  - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
    - ruby
    - universal-darwin-10
     - /Volumes/HDD/DADU/gems
     - /Volumes/HDD/DADU/.gem/ruby/1.8
     - /Library/Ruby/Gems/1.8
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - http://gems.rubyforge.org/

And I found the following paths leading to "something" Jekyll:

  • ~.gem/ruby/1.8/gems/jekyll-0.11.0/lib/jekyll.rb
  • ~.gem/ruby/1.8/gems/bin/jekyll (exec file)
share|improve this question
I would highly recommend to use RVM. Otherwise you will have to modify paths, find were stuff is located, etc. A tedious job. How to install rvm : pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac –  Kassym Dorsel Nov 16 '11 at 3:46
I did that and now it works magically. The link you posted offers very clear instructions. Thanks a lot! You might want to make it into an answer so I can accept it. –  DADU Nov 16 '11 at 13:00

6 Answers 6

up vote 5 down vote accepted

The easiest method of doing this is to use RVM. It manages Ruby and all its gems for you and it's easy to use. See this link for using it.

If you did not want to use that you will need to modify your PATH variables so it can find your gems. I have found this to be tedious and reverted to RVM, but here are the general steps.

You will need to find out where your gems are getting installed. If you did gem install ... the gems will be in ~/.gem/ruby/1.8/gems/bin, if you used sudo gem install ... the gems will be somewhere in /System/Library/Frameworks/Ruby.framework/Versions/1.8/Resources

You have to add this path to your PATH variable. Easiest way to do this is by running : echo 'PATH=$PATH:above/path/to/gems' >> ~/.bash_profile

share|improve this answer

One solution would be editing your ~/.bashrc file and add this line:


This will add ~/.gem/ruby/1.8/gems/bin in Bash's lookup path.

Reopen the terminal and it should work. Or you can use the following command:

. ~/.bashrc

share|improve this answer
Somehow it doesn't work yet. I've made the bashrc file myself because it wasn't in the ~ directory yet, is that correct? –  DADU Nov 16 '11 at 12:38
@DADU: Are you sure that you don't have a ~/.bashrc file in your system? Most linux distribution will have one. If no such file exists, you can create one by yourself. –  Santa Zhang Nov 16 '11 at 18:40
Thanks. I've decided to go with RVM since it works. I've upvoted your answer. –  DADU Nov 16 '11 at 20:15
Mac's use a different convention => .bash_profile –  Kassym Dorsel Nov 16 '11 at 23:23
Then it makes sense. Thanks! –  DADU Nov 18 '11 at 13:33


I'm running into the same issue with a Jekyll blog. I've installed the gem via RVM in a 'Blog directory and the _config.yml file says that it should generate into Blog/_site. Is it as simple as adding Blog to the PATH or is there something else I'm missing?

Update: My bad, I didn't really have the gem installed. Lesson learned: rvm requirements and brew doctor are there for a reason - before you install stuff USE THEM

share|improve this answer

For others coming here with the following set up:

OS X + brewed install of ruby + (possibly) zsh

I figured the problem is that after installing jekyll as per their instructions, gem installs the jekyll gem in the brew cellar, not where the OS usually expects it (somehwere in a gem directory for ruby).

So, all that was needed here was to find out where the brew install of ruby installs gems, locate the jekyll binary, and create a symbolic link to it in /usr/bin.

Here is are the steps I took to fix it:

  1. Type gem env and look for GEM PATHS. For me it was:


  2. Make sure you can see the jekyll binary in the directory from 1 above and copy its path (if you can't, search any other paths listed in GEM PATHS for it). For me it was:


  3. Use the path from step 2 above to create a symlink to /usr/bin/jekyll. I did it by typing this (you might need sudo to create the symlink):

    cd /usr/bin && ln -s /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/bin/jekyll jekyll

Now all should be merry if you type jekyll.

share|improve this answer

Jekyll is a ruby gem : Ruby gems in linux, for example, are in /var/lib/gems/1.8, as can be seen in the "ruby env" output.

Thus, you need to add the executables in this directory to your path.

In general, if a ruby gem is "not found" by your OS, it simply indicates that either

1) You don't have the gem installed or

2) You don't have the gem installed in a directory that is on your path.

I have found that there have been a few issues with installing ruby and ruby gems on linux (I have found that it can be tricky on Ubuntu v10, and have confirmed this with the Ruby folks on IRC). Thus, tools like RVM or rbenv might be the best approach to setting up a stable, maintainable ruby environment.

share|improve this answer

Following steps solved my problem

gem uninstall jekyll
sudo gem install jekyll

Open ~/.bash_profile and add this code in the last line,

export PATH=$PATH:/usr/local/lib/ruby/gems/1.9.1/gems/jekyll-2.5.2/bin

Save and close the .bash_profile

Close and reopen the mac terminal, try running jekyll now, it should work

share|improve this answer

Your Answer


