# Rubygems install in HOME for Ruby 1.9?

**URL:** <https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977>\
**Category:** ruby-talk\
**Created:** [23 January 2008 10:34 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977 "2008-01-23T10:34:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![unbewusst](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@unbewusst](https://rubytalk.org/u/unbewusst)\
**Post date:** [23 January 2008 10:34 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/1 "2008-01-23T10:34:56Z")

</div>

i've installed rubygems 0.9.5 with ruby 1.9 lying in my HOME but i get  
only a gems/1.8/ directory.

then i think i didn't use to correct version of rubygems ? is that  
right ?

what is the best way to get rubygems working with ruby 1.9 installed  
in HOME ???

i'm running over Mac OS X 10.4.11

apart from apple's ruby i do have also a ruby "MacPort" under /opt...

Yvon

---

<div class="post-metadata">

**Author:** ![Thomas\_Wieczorek](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@Thomas\_Wieczorek](https://rubytalk.org/u/Thomas_Wieczorek)\
**Post date:** [23 January 2008 10:53 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/2 "2008-01-23T10:53:31Z")

</div>

> i've installed rubygems 0.9.5 with ruby 1.9 lying in my HOME but i get  
> only a gems/1.8/ directory.
> 
> then i think i didn't use to correct version of rubygems ? is that  
> right ?
> 
> what is the best way to get rubygems working with ruby 1.9 installed  
> in HOME ???
> 
> i'm running over Mac OS X 10.4.11

I have no idea about OSX, but I think you can update your rubygems  
easily if you go in the ~/ruby/bin directory(gem is located there) and  
use

> sudo gem update --system

to update your Rubygems. I hope that helps.

> **···**
>
> On Jan 23, 2008 11:34 AM, unbewusst \<yvon.thoraval@gmail.com\> wrote:

---

<div class="post-metadata">

**Author:** ![Stefano\_Crocco](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Stefano\_Crocco](https://rubytalk.org/u/Stefano_Crocco)\
**Post date:** [23 January 2008 12:50 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/3 "2008-01-23T12:50:49Z")

</div>

Alle Wednesday 23 January 2008, unbewusst ha scritto:

> i've installed rubygems 0.9.5 with ruby 1.9 lying in my HOME but i get  
> only a gems/1.8/ directory.
> 
> then i think i didn't use to correct version of rubygems ? is that  
> right ?
> 
> what is the best way to get rubygems working with ruby 1.9 installed  
> in HOME ???
> 
> i'm running over Mac OS X 10.4.11
> 
> apart from apple's ruby i do have also a ruby "MacPort" under /opt...
> 
> Yvon

I installed ruby 1.9 alongside ruby 1.8 on my linux system without any  
trouble. I don't know Mac OS X, but I heard is Unix based, so I think you can  
use the steps I took, at least as a starting point.

Ruby 1.8 and rubygems were installed using my OS package manager, under the  
/usr directory. So I had:

/usr/bin/ruby18  
/usr/bin/ruby (a symlink to /usr/bin/ruby18)  
/usr/bin/gem18  
/usr/bin/gem (a symlink to /usr/bin/gem18)  
/usr/lib/ruby/1.8  
/usr/lib/ruby/gems/1.8

I decided to install ruby 1.9 in the /usr/local directory. You can choose any  
other directory, of course, but you should make sure that it has a bin  
subdirectory which is in you PATH. Moreover, I decided to install it using  
appending the '19' suffix to the name of the programs, so that I could call  
ruby 1.8 (which should remain the default one) with ruby and the new one with  
ruby19.

After downloading and extracting the ruby-1.9 tarball, I issued the following  
commands:

cd ruby-1.9.0-0  
./configure --prefix=/usr/local --program-suffix=19  
make  
sudo make install

With this, the following files and directories (among others) were created:

/usr/local/bin/ruby19  
/usr/local/bin/irb19  
...  
/usr/local/lib/ruby/1.9

I then downloaded the tgz package (version 1.0.1) from the rubygems rubyforge  
page ([http://rubyforge.org/frs/?group\_id=126&release\_id=17305\](http://rubyforge.org/frs/?group_id=126&release_id=17305%5C)), extracted it  
and did:

cd rubygems-1.0.1  
sudo ruby19 setup.rb

It's important to notice I had to use ruby19 to install rubygems, not ruby.  
This installed the rubygems .rb files in /usr/local/lib/ruby/site\_ruby/1.9.0  
and created the file /usr/local/bin/gem19.

To check that everything worked, I tried installing the rake gem:

sudo gem19 install rake

(again note, I called the 1.9 version of gem)

This created the directory /usr/local/lib/ruby/gems/1.9.0 and installed rake  
under it.

I hope this helps

Stefano

---

<div class="post-metadata">

**Author:** ![unbewusst](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@unbewusst](https://rubytalk.org/u/unbewusst)\
**Post date:** [23 January 2008 10:59 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/4 "2008-01-23T10:59:58Z")

</div>

OK, fine, thanks, i'll try that asap...

> **···**
>
> On 23 jan, 11:53, Thomas Wieczorek \<wieczo...@googlemail.com\> wrote:
> 
> > On Jan 23, 2008 11:34 AM, unbewusst \<yvon.thora...@gmail.com\> wrote:
> > 
> > \> i've installed rubygems 0.9.5 with ruby 1.9 lying in my HOME but i get  
> > \> only a gems/1.8/ directory.
> > 
> > \> then i think i didn't use to correct version of rubygems ? is that  
> > \> right ?
> > 
> > \> what is the best way to get rubygems working with ruby 1.9 installed  
> > \> in HOME ???
> > 
> > \> i'm running over Mac OS X 10.4.11
> > 
> > I have no idea about OSX, but I think you can update your rubygems  
> > easily if you go in the ~/ruby/bin directory(gem is located there) and  
> > \> sudo gem update --system
> > 
> > to update your Rubygems. I hope that helps.

---

<div class="post-metadata">

**Author:** ![Joel\_VanderWerf1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Joel\_VanderWerf1](https://rubytalk.org/u/Joel_VanderWerf1)\
**Post date:** [23 January 2008 18:02 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/5 "2008-01-23T18:02:56Z")

</div>

Stefano Crocco wrote:

> After downloading and extracting the ruby-1.9 tarball, I issued the following commands:
> 
> cd ruby-1.9.0-0  
> ./configure --prefix=/usr/local --program-suffix=19  
> make  
> sudo make install
> 
> With this, the following files and directories (among others) were created:
> 
> /usr/local/bin/ruby19  
> /usr/local/bin/irb19  
> ...  
> /usr/local/lib/ruby/1.9

Didn't this install /usr/local/bin/gem19, as well?

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

---

<div class="post-metadata">

**Author:** ![Unbewusst\_Sein2](https://avatars.discourse-cdn.com/v4/letter/u/91b2a8/32.png) [@Unbewusst\_Sein2](https://rubytalk.org/u/Unbewusst_Sein2)\
**Post date:** [25 January 2008 14:00 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/6 "2008-01-25T14:00:07Z")

</div>

OK, fine, thanks, i needed the magick of "--program-suffix=19" )))

> **···**
>
> Stefano Crocco \<stefano.crocco@alice.it\> wrote:
> 
> > /configure --prefix=/usr/local --program-suffix=19
> 
> --  
> Une Bévue

---

<div class="post-metadata">

**Author:** ![Stefano\_Crocco](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Stefano\_Crocco](https://rubytalk.org/u/Stefano_Crocco)\
**Post date:** [23 January 2008 19:17 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/7 "2008-01-23T19:17:27Z")

</div>

Alle Wednesday 23 January 2008, Joel VanderWerf ha scritto:

> Stefano Crocco wrote:  
> \> After downloading and extracting the ruby-1.9 tarball, I issued the  
> \> following commands:  
> \>  
> \> cd ruby-1.9.0-0  
> \> ./configure --prefix=/usr/local --program-suffix=19  
> \> make  
> \> sudo make install  
> \>  
> \> With this, the following files and directories (among others) were  
> \> created:  
> \>  
> \> /usr/local/bin/ruby19  
> \> /usr/local/bin/irb19  
> \> ...  
> \> /usr/local/lib/ruby/1.9
> 
> Didn't this install /usr/local/bin/gem19, as well?

You're right! When I installed ruby 1.9, I didn't even think to check whether  
gems were included with it, and assumed I had to install it manually, just as  
with 1.8.

Stefano

---

<div class="post-metadata">

**Author:** ![Unbewusst\_Sein2](https://avatars.discourse-cdn.com/v4/letter/u/91b2a8/32.png) [@Unbewusst\_Sein2](https://rubytalk.org/u/Unbewusst_Sein2)\
**Post date:** [25 January 2008 18:34 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/8 "2008-01-25T18:34:56Z")

</div>

both ways updating rubygems failed with :

~%\> sudo gem19 update --system  
Updating RubyGems...  
Updating metadata for 489 gems from [http://gems.rubyforge.org](http://gems.rubyforge.org)  
......  
[...]  
......  
complete  
Attempting remote update of rubygems-update  
Successfully installed rubygems-update-1.0.1  
1 gem installed  
Updating version of RubyGems to 1.0.1  
Installing RubyGems 1.0.1  
setup.rb:12:in `\<main\>': uninitialized constant Config (NameError)

> **···**
>
> Stefano Crocco \<stefano.crocco@alice.it\> wrote:
> 
> > \> Didn't this install /usr/local/bin/gem19, as well?
> > 
> > You're right! When I installed ruby 1.9, I didn't even think to check whether  
> > gems were included with it, and assumed I had to install it manually, just as  
> > with 1.8.
> 
> --  
> Une Bévue

---

<div class="post-metadata">

**Author:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [25 January 2008 19:51 UTC](https://rubytalk.org/t/rubygems-install-in-home-for-ruby-1-9/43977/9 "2008-01-25T19:51:11Z")

</div>

There is no need to do this. Ruby 1.9.0 has the latest RubyGems.

> **···**
>
> On Jan 25, 2008, at 10:34 AM, Une Bévue wrote:
> 
> > Stefano Crocco \<stefano.crocco@alice.it\> wrote:
> > 
> > > > Didn't this install /usr/local/bin/gem19, as well?
> > > 
> > > You're right! When I installed ruby 1.9, I didn't even think to check whether  
> > > gems were included with it, and assumed I had to install it manually, just as  
> > > with 1.8.
> > 
> > both ways updating rubygems failed with :
> > 
> > ~%\> sudo gem19 update --system
