# Gem install

**URL:** <https://www.ruby-forum.com/t/gem-install/173291>\
**Category:** Rails\
**Created:** [August 6, 2009, 11:03am UTC](https://www.ruby-forum.com/t/gem-install/173291 "2009-08-06T11:03:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![srinathbtech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Post date:** [August 6, 2009, 11:03am UTC](https://www.ruby-forum.com/t/gem-install/173291/1 "2009-08-06T11:03:53Z")

</div>

Hi,  
I dont understand these lines . I was getting these warnings  
whenever i intall or uninstall a new gem .

WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and  
/usr/bin aren’t both writable.  
WARNING: You don’t have /home/srinath/.gem/ruby/1.8/bin in your PATH,  
gem executables will not run.

could any one please explain me !!

i had gem version 1.3.1 installed

thanks,  
sri…

---

<div class="post-metadata">

**Author:** ![srinathbtech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Post date:** [August 6, 2009, 12:00pm UTC](https://www.ruby-forum.com/t/gem-install/173291/2 "2009-08-06T12:00:55Z")

</div>

It looks like you don’t have rights to install the gems. Become root  
and  
then install the gems.If you are installing them to your home directory  
make  
sure you have full write privileges on your .gem directory

chmod -R 775 .gem

would do the trick

Trausti

On Thu, Aug 6, 2009 at 11:03 AM, Srinath A. \<

---

<div class="post-metadata">

**Author:** ![srinathbtech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Post date:** [August 6, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/gem-install/173291/3 "2009-08-06T17:35:46Z")

</div>

When you install a gem it will try to install the gem in the ruby  
directory like /usr/local/… if you do not have write permissions to  
do this it will install the gem in your home dirctory under .gem. If  
you want to install the gem correctly you will have to use sudo  
first.

BTW installing the gems in your home directory will also work but like  
the error message says you will have to add this to your path.

On Aug 6, 2:10 am, Trausti Thor J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
