Confirm where Ruby Gems are Installed

gem environment in macOS gem environment in macOS

I’m super close to this website switchover to Jekyll, am on track to migrating from WordPress setup for Unix Tutorial by May 1st 2020.

Putting some final touches in, I was investigating how RSS (Atom, actually) feeds work in Jekyll, and wanted to have a look at one of the jekyll plugins: jekyll-feed.

Since all the plugins in Jekyll are actually Ruby gems installed and managed by the bundler package, it was relatively easy to know where to look.

I couldn’t find any jekyll-feed files in my Jekyll directory for the website, and so I had to learn a bit more about working with gems.

Show RubyGems Environment There’s a really cool command called “gem environment” that shows 99% of all the Ruby gems related information on your system:

[email protected]:~ $ gem environment
 RubyGems Environment:
 RUBY VERSION: 2.6.5 (2019-10-01 patchlevel 114) [x86_64-darwin18]
 INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.6.0
 USER INSTALLATION DIRECTORY: /Users/greys/.gem/ruby/2.6.0
 RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
 GIT EXECUTABLE: /usr/local/bin/git
 EXECUTABLE DIRECTORY: /usr/local/lib/ruby/gems/2.6.0/bin
 SPEC CACHE DIRECTORY: /Users/greys/.gem/specs
 SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.6.5/etc
 GEM PATHS: /usr/local/lib/ruby/gems/2.6.0
 GEM CONFIGURATION: :update_sources => true
 :verbose => true
 :backtrace => false
 :bulk_threshold => 1000
 SHELL PATH: /usr/local/opt/[email protected]/bin

Turns out, the jekyll-feed plugin files were under one of the GEM PATHS locations /usr/local/lib/ruby/gems/2.6.0 in my case.

See Also

Keep Learning with Me

Follow me on Facebook and Twitter or jump into Telegram chat!:
Recommended Software
I use Brave browser, it's awesome: Brave Browser I'm also a fan of SetApp for macOS: SetApp for macOS
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
14 Oct 2021

Ubuntu 21.10 Impish Indri

15 Aug 2021

Python 3.10 Released

15 Aug 2021

Debian 11 Bullseye Released

Recent Tweets