Jekyll install fail on OSX, and solution

Hi, sharing this here in case it might help others.

I ran into a bunch of problems trying to install jekyll on OS X

“gem install jekyll” was failing, and I traced this to a failure to install the dependency sassc. In fact “gem install sassc” was also failing.

I found the solution after re-installing Ruby with Homebrew, and noted carefully the output it was giving me about settings I may need. Following those recommendations, my .bash_profile now contains these lines:

export PATH="$HOME/.gem/ruby/2.6.0/bin:$PATH"
export PATH="/usr/local/opt/ruby/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"
export PKG_CONFIG_PATH="/usr/local/opt/ruby/lib/pkgconfig"
export PATH="/usr/local/opt/openssl@1.1/bin:PATH" export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib" export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include" export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig" export LDFLAGS="-L/usr/local/opt/readline/lib" export CPPFLAGS="-I/usr/local/opt/readline/include" export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig" export RUBY_CONFIGURE_OPTS="--with-openssl-dir=(brew --prefix openssl@1.1)"

I was then able to successfully install jekyll. Apparently, some of the flags set above were needed for sassc to compile, and this was breaking the jekyll install.

Thanks, @jonathanlilly. I just posted a request for help regarding a similar issue. Wondering if this is a fix for me as well (?).