How to Install Jekyll on Osx 10.11

How can I install Jekyll on OSX 10.11?

This is a side effect of Apple's new rootless (aka System Integrity Protection or SIP) feature in OS X El Capitan, but it does not affect /usr/local/bin.

You might try the following:

sudo gem install -n /usr/local/bin/ jekyll

This tells gem to install Jekyll into a folder that isn't protected by SIP, rather than the default protected location under /Library/Ruby/Gems.

This is the solution suggested by Jekyll's developers.

Jekyll and OSX 10.11 GM

So i worked out what the actual issue was!

Apple has added System Integrity Protection (SIP) to increase security. This means that Jekyll has been effected as it uses the default Ruby install.
More details on SIP.

To get around this other users have been installing the Homebrew version. It's also likely that Jekyll v3.0 will start to move towards using this version too.

  • Install the Xcode command line utilities:

    xcode-select --install
  • Install Homebrew (instructions at http://brew.sh)

  • Modify $PATH to use Homebrew:

    export PATH=/usr/local/bin:$PATH
  • Modify $PATH for GUI apps:

    launchctl setenv PATH "/usr/local/bin:$PATH"
  • Install the latest Ruby:

    brew install ruby
  • Install the latest Jekyll:

    gem install jekyll

Struggling installing Jekyll on El Capitan

Although I don't use rbenv, try these few steps:

  • run brew prune to fix the system's symlinks;
  • fix any other issues indicated by brew doctor;
  • use .bash_profile in your home folder instead of ~/.zshenv

If it still doesn't work, try using RVM:

  • install it with an argument to set up your PATH properly with: \curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles
  • set RVM to use Homebrew to install any necessary dependencies with rvm autolibs enable && rvm autolibs packages && rvm autolibs homebrew
  • install ruby-2.3.0: rvm install 2.3.0
  • go ahead and install any gem on your current gemset

jekyll installed but 'command not found'

Okay I had to check what exatly does the $PATH means, and for what it is.

The problem was simple, somehow my ruby installion directory wasnt in my $path variable.

Useful links: Mac OS X: Set / Change $PATH Variable

Okay so here is the thing how I solved it:

echo "$PATH"
gem uninstall jekyll
find / -name jekyll (to delete if there is any leftovers somewhere )
gem environment ( get EXECUTABLE DIRECTORY path )
nano $HOME/.bash_profile ( go to the end of document and insert a new line )
export PATH="/usr/local/Cellar/ruby/2.0.0-p247/bin:$PATH"

you can do this on a templorary way by just writing it in terminal and not saving it in your .bash_profile

Jekyll - command not found

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



Related Topics



Leave a reply



Submit