1
votes
  1. Tried the original method of gem install jekyll and I get this error:

    ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

  2. Installed Xcode and command line tools. Then followed up with installing homebrew using this command:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  3. get this error after:

    Error: Failed to link all completions, docs and manpages: Permission denied - (../../../Homebrew/completions/zsh/_brew, /usr/local/share/zsh/site-functions/_brew) Failed during: /usr/local/bin/brew update --force

  4. These are my ruby and gem version:

    • addressable (2.5.1)
    • bigdecimal (default: 1.2.0)
    • CFPropertyList (2.2.8)
    • colorator (1.1.0)
    • ffi (1.9.18)
    • io-console (default: 0.4.2)
    • jekyll-sass-converter (1.5.0)
    • jekyll-watch (1.5.0)
    • json (default: 1.7.7)
    • kramdown (1.14.0)
    • libxml-ruby (2.6.0)
    • listen (3.0.8)
    • minitest (default: 4.3.2)
    • nokogiri (1.5.6)
    • psych (default: 2.0.0)
    • public_suffix (2.0.5)
    • rake (default: 0.9.6)
    • rb-fsevent (0.10.2)
    • rb-inotify (0.9.10)
    • rdoc (default: 4.0.0)
    • rubygems-update (2.6.12)
    • sass (3.5.1)
    • sass-listen (4.0.0)
    • sqlite3 (1.3.7)
    • test-unit (default: 2.0.0.0)

Please help!

1
What do you get if you run stat /Library/Ruby/Gems/2.0.0/?Andrew
I get 16777220 44348653 drwxr-xr-x 8 root wheel 0 272 "Aug 20 22:13:07 2017" "Aug 18 14:47:41 2017" "Aug 18 14:47:41 2017" "Jul 30 15:04:26 2016" 4096 0 0 /Library/Ruby/Gems/2.0.0/AWWU
Weird, those are the same permissions as on my system, and it was able to install for me. Also, you might want to include your ruby and gem versions in the question.Andrew
Does this have something to do with SIP? stackoverflow.com/a/33059347/2397550JoostS

1 Answers

1
votes

Did you try running the command with sudo ? for example sudo gem install jekyll bundler. This will ensure that you're running the command as an administrator.