# Updating gems for ruby 1.9

**URL:** <https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605>\
**Category:** Ruby\
**Created:** [August 29, 2009, 4:55pm UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605 "2009-08-29T16:55:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Space\_Ship\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Post date:** [August 29, 2009, 4:55pm UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605/1 "2009-08-29T16:55:30Z")

</div>

Hi,

This might have been discussed somewhere else already, if this is the  
case, I apologize.

I publish a significant number of gems. These were all designed for  
Ruby 1.8. Apart from syntax and functional changes, how to I ensure  
that it is possible to use these gems with Ruby 1.9?

I haven’t really used Ruby 1.9 much, but when I install a gem, it  
seems like it is installed for a particular version of Ruby… on my Mac:

/Library/Ruby/Gems/1.8

Does this mean that the gem command that you use will determine where  
the gems are installed? Is there a different gem command for 1.8 and  
for 1.9?

I use the gem server to publish my gems. Do I need to use the 1.9  
version of gem server in order to provide gems for Ruby 1.9? (I’m  
assuming I probably don’t, but it would be good to clarify).

Provided everything is working okay, should I be using Ruby 1.9 gem  
server for publishing gems to both Ruby 1.8 and Ruby 1.9?

When I stand back a little bit, this seems fairly complicated - maybe  
more so than it needs to be.

Any clarification would be most welcome.

Kind regards,  
Samuel

---

<div class="post-metadata">

**Author:** ![Space\_Ship\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Post date:** [August 29, 2009, 8:03pm UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605/2 "2009-08-29T20:03:22Z")

</div>

2009/8/29 Space Ship T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> Hi,
> 
> This might have been discussed somewhere else already, if this is the case,  
> I apologize.
> 
> I publish a significant number of gems. These were all designed for Ruby  
> 1.8. Apart from syntax and functional changes, how to I ensure that it is  
> possible to use these gems with Ruby 1.9?

you don’t have to do anything special. If your gems (and all dependent  
gems)  
work with ruby 1.9 everything is fine.

> I haven’t really used Ruby 1.9 much, but when I install a gem, it seems  
> like it is installed for a particular version of Ruby… on my Mac:
> 
> ```
> /Library/Ruby/Gems/1.8
> 
> ```

> Does this mean that the gem command that you use will determine where the  
> gems are installed?

yes. rubygems use different places to store the gems - depending on your  
Ruby version.

> Is there a different gem command for 1.8 and for 1.9?

no.

-Thomas

–  
Thomas P.  
removed\_email\_address@domain.invalid

> **[Google Sites: Sign-in](https://accounts.google.com/v3/signin/identifier?dsh=S-989529929%3A1688126168331341&continue=https%3A%2F%2Fsites.google.com%2Fsite%2Fsites%2Fsystem%2Ferrors%2FWebspaceNotFound%3Fpath%3D%2Fthopre%2F&followup=https%3A%2F%2Fsites.google.com%2Fsite%2Fsites%2Fsystem%2Ferrors%2FWebspaceNotFound%3Fpath%3D%2Fthopre%2F&ifkv=AeDOFXjq2RdqxEQ__k_SWON2D7QoJGJbt49rAtoyLzQMGx7DwPMx_o00b8GFoWlO6iHQ_bTjoNWjgw&passive=1209600&service=jotspot&flowName=GlifWebSignIn&flowEntry=ServiceLogin)**
>
> Access Google Sites with a personal Google account or Google Workspace account (for business use).

> **[thopre](https://thopre.wordpress.com/)**
>
> Entwicklungen für die Bühne des Lebens

Pablo  
Picasso[http://www.brainyquote.com/quotes/authors/p/pablo\_picasso.html](http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html)

- “Computers are useless. They can only give you answers.”

---

<div class="post-metadata">

**Author:** ![Space\_Ship\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Post date:** [August 29, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605/3 "2009-08-29T20:12:43Z")

</div>

Thanks.

If the gem doesn’t need to be changed between versions of ruby, why is  
it installed into a version dependent sub-directory?

Is it possible to install a gem for all versions of ruby?

Kind regards,  
Samuel

---

<div class="post-metadata">

**Author:** ![Space\_Ship\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Post date:** [September 1, 2009, 1:13am UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605/4 "2009-09-01T01:13:50Z")

</div>

On Aug 29, 2009, at 11:02, Thomas P. wrote:

> > Is there a different gem command for 1.8 and for 1.9?
> 
> no.

yes\*

- If your ruby 1.9 installation was configured with --program-suffix,  
this suffix will be used to determine the gem command’s name. For  
example ./configure --program-suffix=19 gives you ruby19 and gem19.  
You’ll probably also want to set --format-executable in ~/.gemrc (see  
gem help env).

---

<div class="post-metadata">

**Author:** ![Space\_Ship\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Post date:** [September 3, 2009, 5:33am UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605/5 "2009-09-03T05:33:47Z")

</div>

Out of curiosity, why was this decision made? It seems like it would  
be easier to have a combined directory for 1.8 and 1.9?

Kind regards,  
Samuel

---

<div class="post-metadata">

**Author:** ![Space\_Ship\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Post date:** [September 1, 2009, 1:15am UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605/6 "2009-09-01T01:15:35Z")

</div>

On Aug 29, 2009, at 11:10, Space Ship T. wrote:

> Is it possible to install a gem for all versions of ruby?

Not by default.

You can set GEM\_HOME and GEM\_PATH to force RubyGems to use a common  
path. See gem help env.

---

<div class="post-metadata">

**Author:** ![Space\_Ship\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Post date:** [September 3, 2009, 7:36am UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605/7 "2009-09-03T07:36:45Z")

</div>

Thats a good reason 🙂 maybe?

I can understand why it is that way.

Thanks for the clarification I appreciate your knowledge.  
Samuel

---

<div class="post-metadata">

**Author:** ![Space\_Ship\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Post date:** [September 3, 2009, 6:56am UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605/8 "2009-09-03T06:56:54Z")

</div>

On Sep 2, 2009, at 20:32, Space Ship T. wrote:

> be easier to have a combined directory for 1.8 and 1.9?  
> C extensions can only be linked against one version.
