tags:

views:

41

answers:

4

Suppose I installed some ruby gems using gem install gemname. Where should I install them, and when what directory should I run gem install rubygems-update-1.3.1.gem from?

A: 

They are automatically installed to your GEM_HOME. In Linux, you can open a terminal and type:

echo $GEM_HOME 

To find out where that is exactly.

NullUserException
in windows how do i find and can i install gems from any directory in windows
Amit singh tomar
Did you use [Ruby Installer](http://rubyinstaller.org/)?
NullUserException
A: 

Is the place where you view your all gems list for linux.

/usr/lib/ruby/gems
how do i find on windows??
Amit singh tomar
+1  A: 
 gem env

will tell you where they were installed. In general on windows it doesn't matter what directory you're in, running

 gem update --system

will work from anywhere. -r

rogerdpack
A: 

You shouldn't need to be in any specific directory; running gem install will put the gem in the directory that gem expects your gems to be.

As mentioned in other answers, if you want to see where that directory is, run gem env and take a look at the INSTALLATION DIRECTORY: line.

Daniel Vandersluis