Ruby
Install
:warning: Every time you update Ruby to a version in which the first two digits change, update your path to match.
- For Mac - Install commandline tools and set SDKROOT
xcode-select --install export SDKROOT=$(xcrun --show-sdk-path)
- Install latest version of ruby with homebrew:
brew install ruby
- Update PATH
echo 'export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"' >> ~/.zshrc
- Check ruby and gem paths
which ruby gem env
Gem
List installed gems
gem list
Remove all installed gems
for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done
Jekyll
- For compilers to find ruby you may need to set:
export LDFLAGS="-L/usr/local/opt/ruby/lib" export CPPFLAGS="-I/usr/local/opt/ruby/include"
- Install Jekyll for Ruby
gem install bundler jekyll
- Install gems from Gemfile
bundle install