# Having trouble updating Gems; need to change write permissions on directory

**URL:** <https://www.ruby-forum.com/t/having-trouble-updating-gems-need-to-change-write-permissions-on-directory/177396>\
**Category:** Rails\
**Created:** [October 16, 2009, 9:28am UTC](https://www.ruby-forum.com/t/having-trouble-updating-gems-need-to-change-write-permissions-on-directory/177396 "2009-10-16T09:28:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dangermoose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Post date:** [October 16, 2009, 9:28am UTC](https://www.ruby-forum.com/t/having-trouble-updating-gems-need-to-change-write-permissions-on-directory/177396/1 "2009-10-16T09:28:00Z")

</div>

Hi–

I just updated to Rails 2.2.3 last night. Wanted to develop a new app  
today but got message that I needed to update Gems from 1.3.1 to 1.3.2

So, I ran Terminal and entered the gems update --system command. I got  
message returned saying " While executing gem …  
(Gem::FilePermissionError) You don’t have write permissions into the /  
Library/Ruby/Gems/1.8 directory"

So I went into all those directories and changed write permissions,  
including all the parent directories, and then rebooted the computer  
(MBP running Leopard). When I ran the same command, I was returned the  
same message.

What am I doing wrong?

TIA

---

<div class="post-metadata">

**Author:** ![dangermoose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Post date:** [October 16, 2009, 9:40am UTC](https://www.ruby-forum.com/t/having-trouble-updating-gems-need-to-change-write-permissions-on-directory/177396/2 "2009-10-16T09:40:53Z")

</div>

2009/10/16 pauld [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> So I went into all those directories and changed write permissions,  
> including all the parent directories, and then rebooted the computer  
> (MBP running Leopard). When I ran the same command, I was returned the  
> same message.

If this were Ubuntu I would say that you need to use sudo, and it is  
gem not gems, so  
sudo gem update --system

If your OS does not use sudo then maybe you need to be root or  
something.

Colin

---

<div class="post-metadata">

**Author:** ![dangermoose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Post date:** [October 16, 2009, 9:43pm UTC](https://www.ruby-forum.com/t/having-trouble-updating-gems-need-to-change-write-permissions-on-directory/177396/3 "2009-10-16T21:43:15Z")

</div>

Colin L. wrote:

> 2009/10/16 pauld [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > So I went into all those directories and changed write permissions,  
> > including all the parent directories, and then rebooted the computer  
> > (MBP running Leopard). When I ran the same command, I was returned the  
> > same message.
> 
> If this were Ubuntu I would say that you need to use sudo, and it is  
> gem not gems, so  
> sudo gem update --system
> 
> If your OS does not use sudo then maybe you need to be root or  
> something.

Mac OS X uses sudo in the same way that Ubuntu does. The OP should have  
done this instead of changing directory permissions.

> Colin

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
