Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine Location Of Ruby Gems

How do I determine the location of my ruby gems?

like image 767
Bruno Avatar asked Jun 19 '12 20:06

Bruno


People also ask

Where are my RubyGems installed?

When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/. gem/ruby/1.9. 1 . The commands provided by the gems you installed will end up in ~/.

How do you check if gem is installed or not?

Since your goal is to verify a gem is installed with the correct version, use gem list . You can limit to the specific gem by using gem list data_mapper . To verify that it's installed and working, you'll have to try to require the gem and then use it in your code.

What is GEM command?

The gem command allows you to interact with RubyGems. Ruby 1.9 and newer ships with RubyGems built-in but you may need to upgrade for bug fixes or new features. To upgrade RubyGems, visit the download page. If you want to see how to require files from a gem, skip ahead to What is a gem. Finding Gems.

What is RubyGems How does it work?

The RubyGems software allows you to easily download, install, and use ruby software packages on your system. The software package is called a “gem” which contains a packaged Ruby application or library. Gems can be used to extend or modify functionality in Ruby applications.


2 Answers

you can try

gem which rails 

to fetch location for particular gem, or

echo $GEM_HOME 

to fetch home dir of your gems

like image 169
fl00r Avatar answered Sep 20 '22 11:09

fl00r


gem environment 

...should give you all the info you need.

like image 31
Bruno Avatar answered Sep 19 '22 11:09

Bruno