Read more

Rbenv: How to remove a gem installed from a Github source

Emanuel
September 14, 2018Software engineer at makandra GmbH

Normally you can list all gems of the current ruby version with gem list, which also includes the gems of you Gemfile. These can be uninstalled with gem uninstall gemname.

List and uninstall a gem installed via Bundler from Github

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

This does not work for gems installed directly from Github. They do not appear in gem list.

Show all gems installed via Github by bundler:

ls ~/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/

Remove a gem installed via Github by Bundler:

rm -rf ~/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/gemname-xyz
rm -rf ~/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/cache/bundler/gemname-1.2.3

This might also be true for any other gem installed via self defined Git source and not standard Rubygems.

Posted by Emanuel to makandra dev (2018-09-14 09:53)