I would greatly appreciate help in building this site. I am getting so many errors and permission denied messages and have been trying all of the ways comments I find on google suggest to fix the issue to no avail.
sam$ gem install bundler jekyll
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
samuels-MacBook-Pro:~ sam$
Last login: Tue Aug 13 15:33:01 on console
samuels-MacBook-Pro% xcode-select --install
xcode-select: error: command line tools are already installed, use “Software Update” to install updates
samuels-MacBook-Pro%
Building native extensions. This could take a while…
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/nokogiri-1.10.4/ext/nokogiri
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -I /Library/Ruby/Site/2.3.0 -r ./siteconf20190814-2673-31ihj9.rb extconf.rb
mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/nokogiri-1.10.4 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.4/gem_make.out
samuels-MacBook-Pro%
Check to make sure you’re using Homebrew’s Ruby & not default Mac’s. This is helpful for configuring rbenv in order to do that: https://gorails.com/setup/osx/10.14-mojave