# Updating gems for ruby 1.9

**URL:** <https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135>\
**Category:** ruby-talk\
**Created:** [29 August 2009 14:54 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135 "2009-08-29T14:54:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel\_Williams](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Samuel\_Williams](https://rubytalk.org/u/Samuel_Williams)\
**Post date:** [29 August 2009 14:54 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135/1 "2009-08-29T14:54:51Z")

</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:

&nbsp;&nbsp;/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:** ![Thomas\_P](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@Thomas\_P](https://rubytalk.org/u/Thomas_P)\
**Post date:** [29 August 2009 18:02 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135/2 "2009-08-29T18:02:40Z")

</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?

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:
> 
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/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

> **···**
>
> 2009/8/29 Space Ship Traveller \<space.ship.traveller@gmail.com\>
> 
> --  
> Thomas Preymesser  
> thopre@gmail.com
> 
> > **[Google Sites: Sign-in](https://accounts.google.com/v3/signin/identifier?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=ASKXGp00xKzvSKtBU6j_9DAzYvUV4ow3hQgqNyg87df0PKMI-EJz0njOhwetboPoG--MYJ46SdBd&passive=1209600&service=jotspot&flowName=WebLiteSignIn&flowEntry=ServiceLogin&dsh=S-1257387901%3A1707023865178726)**
> >
> > 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&gt](http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html&gt);  
> - "Computers are useless. They can only give you answers."

---

<div class="post-metadata">

**Author:** ![Samuel\_Williams](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Samuel\_Williams](https://rubytalk.org/u/Samuel_Williams)\
**Post date:** [29 August 2009 18:10 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135/3 "2009-08-29T18:10:11Z")

</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:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [31 August 2009 23:06 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135/4 "2009-08-31T23:06:05Z")

</div>

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).

> **···**
>
> On Aug 29, 2009, at 11:02, Thomas Preymesser wrote:
> 
> > > Is there a different gem command for 1.8 and for 1.9?
> > 
> > no.

---

<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:** [31 August 2009 23:06 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135/5 "2009-08-31T23:06:40Z")

</div>

Not by default.

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

> **···**
>
> On Aug 29, 2009, at 11:10, Space Ship Traveller wrote:
> 
> > Is it possible to install a gem for all versions of ruby?

---

<div class="post-metadata">

**Author:** ![Samuel\_Williams](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Samuel\_Williams](https://rubytalk.org/u/Samuel_Williams)\
**Post date:** [3 September 2009 03:32 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135/6 "2009-09-03T03:32:55Z")

</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

> **···**
>
> On 1/09/2009, at 11:06 AM, Eric Hodel wrote:
> 
> > On Aug 29, 2009, at 11:10, Space Ship Traveller 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:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [3 September 2009 04:56 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135/7 "2009-09-03T04:56:12Z")

</div>

C extensions can only be linked against one version.

> **···**
>
> On Sep 2, 2009, at 20:32, Space Ship Traveller wrote:
> 
> > On 1/09/2009, at 11:06 AM, Eric Hodel wrote:  
> > On Aug 29, 2009, at 11:10, Space Ship Traveller 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.
> > 
> > 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?

---

<div class="post-metadata">

**Author:** ![Samuel\_Williams](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Samuel\_Williams](https://rubytalk.org/u/Samuel_Williams)\
**Post date:** [3 September 2009 05:34 UTC](https://rubytalk.org/t/updating-gems-for-ruby-1-9/55135/8 "2009-09-03T05:34:00Z")

</div>

Thats a good reason 🙂 maybe?

I can understand why it is that way.

Thanks for the clarification I appreciate your knowledge.  
Samuel

> **···**
>
> On 3/09/2009, at 4:56 PM, Eric Hodel wrote:
> 
> > On Sep 2, 2009, at 20:32, Space Ship Traveller wrote:
> > 
> > > On 1/09/2009, at 11:06 AM, Eric Hodel wrote:  
> > > On Aug 29, 2009, at 11:10, Space Ship Traveller 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.
> > > 
> > > 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?
> > 
> > C extensions can only be linked against one version.
