Jekyll: Cannot install jekyll on MacOS

Created on 2 Apr 2018  ·  3Comments  ·  Source: jekyll/jekyll

The Output I Wanted

Establish a GitHub Pages website using jekyll.

  • [x ] I updated to the latest Jekyll (or) if on GitHub Pages to the latest github-pages
  • [ x] I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
  • [x ] I am on macOS 10+
  • [x ] I was trying to install.

My Reproduction Steps

My approach is _trial and error._ Originally, I received the following error several times: __(Gem::FilePermissionError)__ For example,

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

Next, I tried several different approaches, including _rubyonrails_, without success. Now, I am using Xcode version 9.3, ruby 2.5.1, and gem 2.7.6.
This approach looks promising. Now, my error is: __(Errno::EACCES)__ . This error appears to be associated with _rubyonrails_. I searched the web and found people had difficulty removing _rubyonrails_.

_Note that t successfully performed several installations where above I did not._

Fetching: public_suffix-3.0.2.gem (100%)
Successfully installed public_suffix-3.0.2
Fetching: addressable-2.5.2.gem (100%)
Successfully installed addressable-2.5.2
Fetching: colorator-1.1.0.gem (100%)
Successfully installed colorator-1.1.0
Fetching: http_parser.rb-0.6.0.gem (100%)
Building native extensions. This could take a while...
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ dir_s_mkdir - /usr/local/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17

Building native extensions. This could take a while...
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ dir_s_mkdir - /usr/local/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17

__It appears that I close to a solution:__ Remove _rubyonrails_.

I would appreciate help.
Thanks
Paul

frozen-due-to-age

Most helpful comment

Try running with sudo permissions:
$ sudo gem install jekyll bundler

All 3 comments

Try running with sudo permissions:
$ sudo gem install jekyll bundler

Thanks @posadaj

It works! After resolving a few dependency issues, http://localhost:4000 was displayed.

Now, I will take the next baby step in setting up a GitHub Page site.

Thanks to all,
Paul

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MertcanGokgoz picture MertcanGokgoz  ·  3Comments

nasht00 picture nasht00  ·  3Comments

bzerangue picture bzerangue  ·  4Comments

JohnStarich picture JohnStarich  ·  4Comments

muromtsev picture muromtsev  ·  3Comments