Solving Jekyll issue with Mac OS X El Capitan 10.11
I recently updated my Mac OS X Yosemite (10.10) to El Capitan (10.11). Everything seems good for couple of days but as soon as I tried to run my Jekyll site, I’d a great surprise waiting for me.
jekyll serve –config=_config.yml,_config_dev.yml
-bash: jekyll: command not found
OOPs, where is my Jekyll? Expecting some of the installed programs are reverted after upgrade, I decided to install Jekyll again and found second surprise was waiting for me, instructions given on jekyllrb.com are not working any more. I followed same instructions on Yosemite in install Jekyll so I knew problem is with El Capitan, not jekyll.
After spending some time on google, visiting few sites, I finally find that Apple is now using System Integrity Protection (SIP) to restrict write access to some of system folders. This contains folder /Library/Ruby which is version of Ruby shipped with Mac. With SIP, ‘sudo gem install jekyll’ is no longer possible.
- Install XCode command line utilities (If not already installed).
- xcode-select –install
- Install homebrew (If not already installed)
- ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
- Update PATH to use homebrew before system default path (/usr/bin)
- Open (or create) ~/.bash_profile file and add following line
- export PATH=”/usr/local/bin:$PATH”
- Install ruby
- brew install ruby
- Install Jekyll
- gem install Jekyll
And we are done. Run your Jekyll site again. Happy blogging.
This entry was posted by Kapil Sharma on October 20, 2015 at 12:26 am, and is filed under Guidelines, Mac, OS. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site.
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Leave a Reply