# "gem update --system" breaks under a non-standard prefix

**URL:** <https://www.ruby-forum.com/t/gem-update-system-breaks-under-a-non-standard-prefix/88968>\
**Category:** Ruby\
**Created:** [March 15, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/gem-update-system-breaks-under-a-non-standard-prefix/88968 "2007-03-15T23:50:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [March 15, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/gem-update-system-breaks-under-a-non-standard-prefix/88968/1 "2007-03-15T23:50:54Z")

</div>

It appears that if you install rubygems under a non-standard prefix  
then “gem update --system” breaks.

I have rubygems installed as a non-privileged user. Everything works  
fine with GEM\_HOME and RUBYLIB set properly in the environment. But,  
when I try to upgrade rubygems from 0.9.1 -\> 0.9.2 , “gem update  
–system” fails.

[…]  
setup.rb:515:in `initialize’: Permission denied - /usr/bin/gem  
(Errno::EACCES)

Running “update\_rubygems” manually doesn’t fair any better.

$ update\_rubygems  
Error: Cannot find RubyGems Update Path!

RubyGems has already been updated.  
The rubygems-update gem may now be uninstalled.  
E.g. gem uninstall rubygems-update

Eventually I found a successful workaround…

cd $GEM\_HOME/gems/rubygems-update-\*/ &&  
ruby setup.rb all --prefix=$GEM\_PREFIX

…where $GEM\_PREFIX is the prefix I installed rubygems to. I’m glad  
that it worked, but surely it should be easier than this? It would be  
nice if “gem update --system” accepted --prefix=$GEM\_PREFIX , but as  
far as I can tell it does not.

Regards,

Jeremy H.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [March 18, 2007, 2:27am UTC](https://www.ruby-forum.com/t/gem-update-system-breaks-under-a-non-standard-prefix/88968/2 "2007-03-18T02:27:27Z")

</div>

On Mar 15, 2007, at 15:50, Jeremy H. wrote:

> It appears that if you install rubygems under a non-standard prefix  
> then “gem update --system” breaks.
> 
> [… bug report …]

Did you file a bug in the tracker? I guarantee your bug report will  
get lost if you don’t.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [March 18, 2007, 12:46pm UTC](https://www.ruby-forum.com/t/gem-update-system-breaks-under-a-non-standard-prefix/88968/3 "2007-03-18T12:46:05Z")

</div>

On 2007-03-18, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Mar 15, 2007, at 15:50, Jeremy H. wrote:
> 
> > It appears that if you install rubygems under a non-standard prefix  
> > then “gem update --system” breaks.
> > 
> > [… bug report …]
> 
> Did you file a bug in the tracker?

Would that be the tracker that is conspicuously _not_ linked to  
anywhere on the front page of the RubyGems web site, thereby  
encouraging visitors to conclude it does not exist? ☹

OK, it’s done. (And also a bug about the web site not linking to the  
tracker.)

Regards,

Jeremy H.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [March 18, 2007, 1:05pm UTC](https://www.ruby-forum.com/t/gem-update-system-breaks-under-a-non-standard-prefix/88968/4 "2007-03-18T13:05:07Z")

</div>

On Sunday 18 March 2007, Jeremy H. wrote:

> anywhere on the front page of the RubyGems web site, thereby  
> encouraging visitors to conclude it does not exist? ☹
> 
> OK, it’s done. (And also a bug about the web site not linking to the  
> tracker.)  
> It’s better to check if the problem has already been reported before …

[http://rubyforge.org/tracker/?func=detail&aid=8470&group\_id=126&atid=575](http://rubyforge.org/tracker/?func=detail&aid=8470&group_id=126&atid=575)

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [March 18, 2007, 1:40pm UTC](https://www.ruby-forum.com/t/gem-update-system-breaks-under-a-non-standard-prefix/88968/5 "2007-03-18T13:40:16Z")

</div>

On 2007-03-18, Sylvain J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> It’s better to check if the problem has already been reported before …
> 
> [http://rubyforge.org/tracker/?func=detail&aid=8470&group\_id=126&atid=575](http://rubyforge.org/tracker/?func=detail&aid=8470&group_id=126&atid=575)

D’oh! I’ve added a note to my submission pointing out that it’s a  
duplicate of yours. Thanks for catching that.

Regards,

Jeremy H.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [March 20, 2007, 1:45am UTC](https://www.ruby-forum.com/t/gem-update-system-breaks-under-a-non-standard-prefix/88968/6 "2007-03-20T01:45:31Z")

</div>

On Mar 18, 2007, at 04:45, Jeremy H. wrote:

> Would that be the tracker that is conspicuously _not_ linked to  
> anywhere on the front page of the RubyGems web site, thereby  
> encouraging visitors to conclude it does not exist? ☹

☹

> OK, it’s done. (And also a bug about the web site not linking to the  
> tracker.)

Awesome, thanks.
