ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/jekyll
I\'m getting a permission error on trying to install Jekyl
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.
If you cannot get it to work you can always try Cloud9.
Cloud9 offers a full development environment in the cloud (running Linux). Their IDE is also quite good and their environments are also very useful for collaboration. Setting up Git is really simple (using the 'git clone' command). With Cloud9 you will be able to work from any computer with a browser, without installing anything.
The content of your index.md file:
---
title: Home
---
Hello world!
With Cloud9 you can develop on Linux and feel like a pro. Try it! You will love it.
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
Don't install Jekyll with Homebrew, The security of Homebrew is unknown : https://security.stackexchange.com/questions/105088/osx-homebrew-security-risks
Here is how you install it without homeBrew: with a vanilla OSX el cap: http://digitalshore.io/how-to-install-jekyll-mac-os-x-el-capitan/
The only drawback is that you have to type in your password everytime you use sudo, which isnt a big deal. I rather do that than install more dependencies. You should host your Jekyll config on github anyway, that way you wont have to deal with the command line at all. Here is my article on how to set Jekyll up with github: http://stylekit.org/blog/2016/01/06/The-Jekyll-Setup/
Since then i've made a 30 second video tutorial on how you can setup a jekyll blog on github: https://vimeo.com/154566844
It seems this was an OS specific issue. I found a similar issue here, and the answer I found here helped solve the problem : Cannot install cocoa pods after uninstalling, results in error
The new El Capitan version of OS X has a new technology called SIP that won't let users (even when using sudo
) write to the /usr/bin
folder. This breaks the install process. You can disable SIP, but I'd prefer to keep it on since it provides protection against bad stuff.
SIP does allow writing in the /usr/local
folder so what I did was manually install ruby there using brew and then install jekyll. That worked fine.
sudo brew install ruby