To install the command line tools to compile native extensions, open a terminal and run:
Mac OS Catalina (10.15.4) What runtime / compiler are you using (e.g. Python version or version of gcc) Ruby: TruffleRuby (git head, dev for 20.2) GCC: Sulong (dev for 20.2) What did you do? As part of our work on TruffleRuby, we are trying to get the grpc gem to build and run on TruffleRuby (cf. To install GEM-Selektor on Mac OS X: 2.1. Click on the installer.dmg file (e.g. “Gems3.3.5-xxxxxx.yyyyyy-OSX-x86-64.dmg”) to mount it. A window appears with the application gems3.app. Drag the gems3.app from that window to the /Applications folder.
Gem install -no-document List installed gems gem list To check if any installed gems are outdated: gem outdated Update installed gems. To update all gems or a particular gem: gem update Remove old gem versions. RubyGems keeps old versions of gems, so feel free to do some cleaning after updating: gem cleanup. 3 July 2014 GEMS Reference Guide Version 2.3 Platform Browser Mac OS X v10.6 Safari 4.0, Mozilla Firefox 3.0 Mac OS X v10.4 (PowerPC)2 Safari 3.0, Mozilla Firefox 2.0, Opera 9.5, AOL for Mac OS X. There’s a good reason why Mac owners always argue the case that a Mac is one of the best pieces of equipment, that it never suffers from viruses or cyber-attacks. And while that’s not necessarily 100% true, it actually has some top, built-in security gems that you might not be aware of.
Jekyll requires Ruby v2.4.0 or higher.macOS Big Sur 11.x ships with Ruby 2.6.3. Check your Ruby version using ruby -v
.
If you’re running a previous version of macOS, you’ll have to install a newer version of Ruby.
To run the latest Ruby version you need to install it through Homebrew.
Add the brew ruby and gems path to your shell configuration:
Relaunch your terminal and check your Ruby setup:
You’re now running the current stable version of Ruby!
People often use rbenv to manage multipleRuby versions. This is very useful when you need to be able to run a given Ruby version on a project.
Restart your terminal to apply your changes.Next, you can install the Ruby version you want. Let’s install the latest stable version:
That’s it! Head over to rbenv command references to learn how to use different versions of Ruby in your projects.
After installing Ruby, install Jekyll and Bundler.
Install the bundler and jekyll gems:
Get your Ruby version:
Append your path file with the following, replacing the X.X
with the first two digits of your Ruby version:
Check that GEM PATHS:
points to your home directory:
Every time you update Ruby to a version in which the first two digits change, update your path to match.
We recommend not installing Ruby gems globally to avoid file permissions problems and using sudo
.
Because of SIP Protections in Mojave, run:
Run:
See Troubleshooting or ask for help on our forum.
I am trying to install Sass on macOS Sierra but get the error below. I’ve tried looking on stack overflow and there are similar questions, but no solutions that help me.
Thank you in advance.
Jermaine
Jermaines-MBP:~ jermainesmith$ gem install sass
Fetching: ffi-1.9.18.gem (100%)
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Jermaines-MBP:~ jermainesmith$ sudo gem install sass
Password:
Building native extensions. This could take a while…
ERROR: Error installing sass:
ERROR: Failed to build gem native extension.
mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.18 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.18/ext/ffi_c/gem_make.out
Jermaines-MBP:~ jermainesmith$