How do I use Ruby 1.9 RC ?

A

Ashutosh

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
 
D

Damjan Rems

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
 
R

Reacher

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

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

Luis Lavena

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?

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
 
A

Ashutosh

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?

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

Hello Reacher and Luis,

:O) this worked for me.

Thanks a lot.

regards,
Ashutosh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top