I went to the Jekyll website https://jekyllrb.com/docs/installation/ and read the pre-requisites
I ran each command line recommended to validate the correct prerequisites are installed
Installing Jekyll should be straight-forward if all requirements are met. Before you start, make sure your system has the following: GNU/Linux, Unix, or macOS Ruby version 2.2.5 or above, including all development headers (ruby installation can be checked by running ruby -v, development headers can be checked on Ubuntu by running apt list --installed ruby-dev) RubyGems (which you can check by running gem -v) GCC and Make (in case your system doesn't have them installed, which you can check by running gcc -v,g++ -v and make -v in your system's command line interface)
Then using command line I installed using Ruby Gem via the command
gem install Jekyll
When I did this I got the following error:
gem install jekyll
Fetching: public_suffix-3.0.2.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
My next step was to google "gem install jekyll you don't have write permissions" and I found an article on github recommending a different command line - "$ gem install --user-install --bindir ~/bin --no-document --pre --verbose Jekyll" which gave me a bash error of "command not found".
I then reached out to a friend @mention @davebeach with the error and we realized that out of the box Mac's come installed with Ruby but the permissions are locked down and I needed to give myself ownership of the directory so that the install could complete successfully The first thing I did was navigate to the directory giving me permission issues
cd /Library/Ruby/Gems/2.3.0
Then navigated "up" one level by typing the command
cd ..
then I typed
ls -al
the response was
drwxr-xr-x 3 root wheel 96 Jul 15 2017 .
drwxr-xr-x 4 root wheel 128 Jul 15 2017 ..
drwxr-xr-x 8 root wheel 256 Jul 15 2017 2.3.0
The result told me that I was not the owner of the "2.3.0" directory to complete the install, as well as the fact that I was in the root directory and not within my user directory so the next step was to enter the command
sudo chown christopheryork: 2.3.0
Then I entered my passowrd and then the command
ls -al
and the result was
drwxr-xr-x 3 root wheel 96 Jul 15 2017 .
drwxr-xr-x 4 root wheel 128 Jul 15 2017 ..
drwxr-xr-x 8 christopheryork wheel 256 Jul 15 2017 2.3.0
next I used the command
sudo chown christopheryork:staff 2.3.0
and then the command
ls -al
and the result was
drwxr-xr-x 3 root wheel 96 Jul 15 2017 .
drwxr-xr-x 4 root wheel 128 Jul 15 2017 ..
drwxr-xr-x 8 christopheryork staff 256 Jul 15 2017 2.3.0
Note the directory is now under my ownership
I next ran the command
gem install jekyll
and I got the error
Fetching: public_suffix-3.0.2.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /Library/Ruby/Gems/2.3.0/cache/public_suffix-3.0.2.gem
I then navigated back to the correct directory
cd /library/ruby/gems
I entered the command
sudo chown -R christopheryork:staff 2.3.0
Then I issued the command
gem install jekyll
and the result was
Done installing documentation for public_suffix, addressable, colorator, http_parser.rb, eventmachine, em-websocket, concurrent-ruby, i18n, rb-fsevent, ffi, rb-inotify, sass-listen, sass, jekyll-sass-converter, ruby_dep, listen, jekyll-watch, kramdown, liquid, mercenary, forwardable-extended, pathutil, rouge, safe_yaml, jekyll after 50 seconds 25 gems installed
This almost worked for me but I got an error at the end related to my version of rogue:
ERROR: Error installing jekyll:
The last version of rouge (>= 3.0, < 5.0) to support your Ruby & RubyGems was 3.30.0. Try installing it with
gem install rouge -v 3.30.0
and then running the current command againrouge requires Ruby version >= 2.7. The current ruby version is 2.6.10.210.
Then I tried following the instruction and it said it couldn't find a valid 'rouge'
ERROR: Could not find a valid gem 'rogue' (= 3.30.0) in any repository
ERROR: Possible alternatives: rogue
Then I tried installing rogue and got this error:
ERROR: Error installing rogue:
There are no versions of nokogiri (~> 1.14) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
nokogiri requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.6.10.210.
Finally, I find this strange since I tried and I thought successfully installed ruby 3.12 with homebrew and rbenv but my system still has ruby 2.6.0 ... I'm stuck for now. Can anyone tell me what I'm doing wrong? #newb