# Can I unpack ruby like a gem?

**URL:** <https://www.ruby-forum.com/t/can-i-unpack-ruby-like-a-gem/177243>\
**Category:** Ruby\
**Created:** [October 14, 2009, 12:30am UTC](https://www.ruby-forum.com/t/can-i-unpack-ruby-like-a-gem/177243 "2009-10-14T00:30:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [October 14, 2009, 12:30am UTC](https://www.ruby-forum.com/t/can-i-unpack-ruby-like-a-gem/177243/1 "2009-10-14T00:30:59Z")

</div>

Here’s what I like about gems, I can have multiple versions installed  
parallel and on top of that I can unpack them into vendor/.

Why can’t I do that with the ruby versions. I have projects using 1.8 as  
well as some using 1.9 on my development machine as well as on my  
server. I don’t have the time to bring all 1.8s up to 1.9, besides they  
run fine as they are now. And using both versions under ubuntu is a lot  
of work.

I really like gem for breaking the staleness of package managers and  
being easy to use on all operating systems, but why isn’t ruby just a  
gem?

Any thoughts on this?

Tick

---

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [October 14, 2009, 12:35am UTC](https://www.ruby-forum.com/t/can-i-unpack-ruby-like-a-gem/177243/2 "2009-10-14T00:35:01Z")

</div>

Hi,

On Oct 13, 2009, at 3:31 PM, Ray K. wrote:

> Here’s what I like about gems, I can have multiple versions installed  
> parallel and on top of that I can unpack them into vendor/.
> 
> …  
> I really like gem for breaking the staleness of package managers and  
> being easy to use on all operating systems, but why isn’t ruby just a  
> gem?

You are creating a bit of a chicken/egg problem here. 🙂 That said,  
take a look at ZenTest’s multiruby (with a testing focus) or rvm (for  
more of a Big Global Ruby Version Switch approach).

~ j.

---

<div class="post-metadata">

**Author:** ![tick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/47e85d/32.png) [@tick](https://www.ruby-forum.com/u/tick)\
**Post date:** [October 14, 2009, 10:12am UTC](https://www.ruby-forum.com/t/can-i-unpack-ruby-like-a-gem/177243/3 "2009-10-14T10:12:53Z")

</div>

Ray K. wrote:

> And using both versions under ubuntu is a lot  
> of work.

There are ruby1.8 and ruby1.9 packages, so I’d have thought it would be  
OK, although the ruby1.9 package is likely stale.

One option is for you to install the default ruby(1.8) from apt, and  
then build 1.9 from source:

./configure --program-suffix=19

then you will get /usr/local/bin/ruby19, /usr/local/bin/irb19 etc which  
won’t conflict.

What I tend to do is just install multiple versions of ruby from source,  
in which case you’ll get exactly which versions of 1.8.x and 1.9.x that  
you want.

Admittedly, it can get messy if you want 1.8.6 and 1.8.7 side by side,  
because they share the same lib dir and gems. If you want them to be  
absolutely 100% independent, then do

./configure --prefix=/opt/ruby187p174

and then symlink /opt/ruby187/bin/ruby to wherever you want to invoke it  
from (say /usr/bin/ruby18). The advantage of this is that you can do

```
rm -rf /opt/ruby187p174

```

to get rid of that installation of ruby entirely, and a symlink update  
will allow you to switch forward and backward between different versions  
instantly.

Regards,

Brian.
