# How do I use Ruby 1.9 RC?

**URL:** <https://www.ruby-forum.com/t/how-do-i-use-ruby-1-9-rc/122287>\
**Category:** Ruby\
**Created:** [December 6, 2007, 7:36am UTC](https://www.ruby-forum.com/t/how-do-i-use-ruby-1-9-rc/122287 "2007-12-06T07:36:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashutosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@ashutosh](https://www.ruby-forum.com/u/ashutosh)\
**Post date:** [December 6, 2007, 7:36am UTC](https://www.ruby-forum.com/t/how-do-i-use-ruby-1-9-rc/122287/1 "2007-12-06T07:36:20Z")

</div>

Hello all,

I downloaded Ruby 1.9 RC binaries (ruby 1.9.0 (2007-07-09 patchlevel  
0) [i386-mswin32]) and observed that there are fewer files in bin  
directory as compared to Ruby 1.8.6.

Running any ruby program gives me error

0: no such file to load – ubygems (LoadError)

I tried copying gems directory from my Ruby 1.8.6 directory to Ruby  
1.9 but did not work.

Any suggestions?

regards,  
Ashutosh

---

<div class="post-metadata">

**Author:** ![ashutosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@ashutosh](https://www.ruby-forum.com/u/ashutosh)\
**Post date:** [December 6, 2007, 9:28am UTC](https://www.ruby-forum.com/t/how-do-i-use-ruby-1-9-rc/122287/2 "2007-12-06T09:28:44Z")

</div>

> I tried copying gems directory from my Ruby 1.8.6 directory to Ruby  
> 1.9 but did not work.

I guess this should not work.

I didn’t did it myself but I would change path environment variable to  
point on my 1.9 directory and then install rubygems and all gems to new  
environment.

Where did you get 1.9 windows binaries?

by  
TheR

---

<div class="post-metadata">

**Author:** ![ashutosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@ashutosh](https://www.ruby-forum.com/u/ashutosh)\
**Post date:** [December 6, 2007, 3:30pm UTC](https://www.ruby-forum.com/t/how-do-i-use-ruby-1-9-rc/122287/3 "2007-12-06T15:30:12Z")

</div>

On Dec 6, 12:34 am, Ashutosh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I tried copying gems directory from my Ruby 1.8.6 directory to Ruby  
> 1.9 but did not work.
> 
> Any suggestions?
> 
> regards,  
> Ashutosh

This is usually caused by the environment variable RUBYOPT. Remove  
this variable from your environment (Right click My Computer →   
Properties → Advanced → Environment Variables)

---

<div class="post-metadata">

**Author:** ![ashutosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@ashutosh](https://www.ruby-forum.com/u/ashutosh)\
**Post date:** [December 6, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/how-do-i-use-ruby-1-9-rc/122287/4 "2007-12-06T17:42:52Z")

</div>

On Dec 6, 3:34 am, Ashutosh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I tried copying gems directory from my Ruby 1.8.6 directory to Ruby  
> 1.9 but did not work.
> 
> Any suggestions?

Open a console window and do:

SET RUBYOPT=

before calling your new ruby installation

This happens because you have One-Click Installer that was set to add  
rubygems by default to your ruby environment each time the VM is  
loaded.

I often do manually “require ‘rubygems’” at the top of my scripts if  
they need certain gems, but often they don’t.

You can also remove the environment variable permanently from Control  
Panel → System → Advanced → Environment Variables.

Keep in mind that if you remove it, you will need do the require thing  
each time you need to use a gem (this is for cases outside mongrel or  
rails that are gem-friendly).

HTH,

Luis

---

<div class="post-metadata">

**Author:** ![ashutosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@ashutosh](https://www.ruby-forum.com/u/ashutosh)\
**Post date:** [December 7, 2007, 7:40am UTC](https://www.ruby-forum.com/t/how-do-i-use-ruby-1-9-rc/122287/5 "2007-12-07T07:40:55Z")

</div>

On Dec 6, 9:39 pm, Luis L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 0: no such file to load – ubygems (LoadError)  
> > before calling your new ruby installation
> 
> Keep in mind that if you remove it, you will need do the require thing  
> each time you need to use a gem (this is for cases outside mongrel or  
> rails that are gem-friendly).
> 
> HTH,
> 
> Luis

Hello Reacher and Luis,

:O) this worked for me.

Thanks a lot.

regards,  
Ashutosh

---

<div class="post-metadata">

**Author:** ![ashutosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@ashutosh](https://www.ruby-forum.com/u/ashutosh)\
**Post date:** [December 7, 2007, 7:28am UTC](https://www.ruby-forum.com/t/how-do-i-use-ruby-1-9-rc/122287/6 "2007-12-07T07:28:38Z")

</div>

On Dec 6, 1:28 pm, Damjan R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > I tried copying gems directory from my Ruby 1.8.6 directory to Ruby  
> > 1.9 but did not work.
> 
> I guess this should not work.
> 
> I didn’t did it myself but I would change path environment variable to  
> point on my 1.9 directory and then install rubygems and all gems to new  
> environment.

I tried that but did not work for me.

> Where did you get 1.9 windows binaries?

I downloaded Ruby 1.9 Windows binaries from  
[Download Ruby](http://www.ruby-lang.org/en/downloads/).

> ## by TheR
> 
> Posted viahttp://www.ruby-forum.com/.

regards,  
Ashutosh
