Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install Jekyll on OSX 10.11?

Tags:

macos

ruby

jekyll

ERROR:  While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/jekyll

I'm getting a permission error on trying to install Jekyll. I'm currently running OSX 10.11 (El Capitan). I also have Xcode 7 and have installed the developer tools. Is there a workaround or is this an OS specific issue?

like image 610
lenignes Avatar asked Jul 22 '15 15:07

lenignes


2 Answers

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.

like image 79
Blessing Lopes Avatar answered Sep 23 '22 17:09

Blessing Lopes


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
    
like image 34
thatuxguy Avatar answered Sep 24 '22 17:09

thatuxguy