0

Everything was working fine before I updated to High Sierra, now jekyll won't run. I uninstalled jekyll, made sure ruby was updated using brew (says ruby 2.4.2_1 is already installed) and and then tried to reinstall jekyll. this is the error I get from the command line.

Last login: Sat Dec  9 20:15:25 on ttys000
Wills-MBP:~ Will$ sudo gem uninstall jekyll
Password:
Gem 'jekyll' is not installed
Wills-MBP:~ Will$ gem install bundle
Fetching: bundle-0.0.1.gem (100%)
Successfully installed bundle-0.0.1
Parsing documentation for bundle-0.0.1
Installing ri documentation for bundle-0.0.1
Done installing documentation for bundle after 0 seconds
1 gem installed
Wills-MBP:~ Will$ gem install jekyll
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ rb_sysopen - 
/Library/Ruby/Gems/2.3.0/gems/jekyll-3.6.2/.rubocop.yml
Wills-MBP:~ Will$ sudo gem install jekyll
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/bin directory.   
Wills-MBP:~ Will$ sudo gem install jekyll bundler
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/bin directory.
Wills-MBP:~ Will$ gem update --system
Updating rubygems-update
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/bin directory.
Wills-MBP:~ Will$ 

I have located the files in question but I cannot give myself write permission with the security features of the OS.

So as of right now, jekyll is not installed, I just want to re-install it and get everything up and running again.

Does anyone know how to fix this?

**Quick note, here is what I get when I run these commands...

Wills-MBP:~ Will$ which ruby
    /usr/bin/ruby
Wills-MBP:~ Will$ which gem
    /usr/bin/gem

So I guess this means its getting pointed to my system, instead of /usr/local. How do I change this?

Wil Carter
  • 53
  • 8

2 Answers2

2

I figured it out! I found my answer here. https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/#laptop-script

While following the steps listed I ran the command brew doctor

this gave me the error "Warning: /usr/bin occurs before /usr/local/bin" so I ran the command provided by the troubleshooting guide https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/#troubleshoot-brew

echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile

make sure you quit terminal and restart it.

After that I did not follow any more steps in the guide, simply ran

gem install jekyll bundler

everything installed correctly and it's good to go!

Wil Carter
  • 53
  • 8
0

I had the same system error after updating to Mac OSX High Sierra (10.13.4; though I don't know that the update is related)

Permission denied @ rb_sysopen

and found that running:

sudo gem install jekyll

then entering your password, would finish the Jekyll install.

Credit to this solution goes to Alexander Davison at TeamTreeHouse.com

Mach
  • 1