From: Xeno Campanoli / Eskimo North and Gmail on
I tried installing a bunch of ruby 1.9 stuff on my Ubuntu laptop last night, but
my default ruby is still 1.8.7. Anybody know a regular method for setting to
1.9 on Ubuntu? Perhaps this is an Ubuntu question, but presumably the best way
is not always the Ubuntu way...???
--
"It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member

From: Walton Hoops on
On 4/30/2010 1:36 PM, Xeno Campanoli / Eskimo North and Gmail wrote:
> I tried installing a bunch of ruby 1.9 stuff on my Ubuntu laptop last
> night, but my default ruby is still 1.8.7. Anybody know a regular
> method for setting to 1.9 on Ubuntu? Perhaps this is an Ubuntu
> question, but presumably the best way is not always the Ubuntu way...???
The Ubuntu way is to run 'sudo update-alternatives --config ruby' and
'sudo update-alternatives --config rubygems', or instead of calling Ruby
scripts with 'ruby', call them with 'ruby1.9' when you want them run in 1.9.

Another solution that is available is Ruby Version Manager (RVM). I've
never used RVM, so I can't say anything for or against it.
http://rvm.beginrescueend.com/

From: Jason Roelofs on

On Apr 30, 2010, at 3:57 PM, Walton Hoops wrote:

> On 4/30/2010 1:36 PM, Xeno Campanoli / Eskimo North and Gmail wrote:
>> I tried installing a bunch of ruby 1.9 stuff on my Ubuntu laptop last
>> night, but my default ruby is still 1.8.7. Anybody know a regular
>> method for setting to 1.9 on Ubuntu? Perhaps this is an Ubuntu
>> question, but presumably the best way is not always the Ubuntu way...???
> The Ubuntu way is to run 'sudo update-alternatives --config ruby' and
> 'sudo update-alternatives --config rubygems', or instead of calling Ruby
> scripts with 'ruby', call them with 'ruby1.9' when you want them run in 1.9.
>
> Another solution that is available is Ruby Version Manager (RVM). I've
> never used RVM, so I can't say anything for or against it.
> http://rvm.beginrescueend.com/
>

Forget Ubuntu's ruby completely. Use RVM, you will save yourself TONS of headache. It's really easy:

sudo gem install rvm
rvm-install (and follow instructions for .bashrc settings)

rvm install 1.9.1
rvm use 1.9.1 --default

Now you're completely in the RVM system (which is maintained in ~/.rvm by default) and can trivially switch between a myriad of Ruby implementation.

Jason



From: James Britt on
Walton Hoops wrote:
> On 4/30/2010 1:36 PM, Xeno Campanoli / Eskimo North and Gmail wrote:
>> I tried installing a bunch of ruby 1.9 stuff on my Ubuntu laptop last
>> night, but my default ruby is still 1.8.7. Anybody know a regular
>> method for setting to 1.9 on Ubuntu? Perhaps this is an Ubuntu
>> question, but presumably the best way is not always the Ubuntu way...???
> The Ubuntu way is to run 'sudo update-alternatives --config ruby' and
> 'sudo update-alternatives --config rubygems', or instead of calling Ruby
> scripts with 'ruby', call them with 'ruby1.9' when you want them run in 1.9.
>
> Another solution that is available is Ruby Version Manager (RVM). I've
> never used RVM, so I can't say anything for or against it.
> http://rvm.beginrescueend.com/

Or install from source code.

I'm not a fan of Ubuntu's packaging of Ruby, though for some apps (such
as Amarok) you seem to have to have it. (nice that they have it
scriptable by Ruby, stupid that you can't specify *which* ruby you want
it to use.)


rvm is quite slick and I've been using it on some recent machine builds.


--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development

From: Xeno Campanoli / Eskimo North and Gmail on
Walton Hoops wrote:
> On 4/30/2010 1:36 PM, Xeno Campanoli / Eskimo North and Gmail wrote:
>> I tried installing a bunch of ruby 1.9 stuff on my Ubuntu laptop last
>> night, but my default ruby is still 1.8.7. Anybody know a regular
>> method for setting to 1.9 on Ubuntu? Perhaps this is an Ubuntu
>> question, but presumably the best way is not always the Ubuntu way...???
> The Ubuntu way is to run 'sudo update-alternatives --config ruby' and
> 'sudo update-alternatives --config rubygems', or instead of calling Ruby
> scripts with 'ruby', call them with 'ruby1.9' when you want them run in 1.9.
>
> Another solution that is available is Ruby Version Manager (RVM). I've
> never used RVM, so I can't say anything for or against it.
> http://rvm.beginrescueend.com/
>
>

Thank you. That didn't get me there, but I really appreciate the quick
response, and that actually helps me in some other areas.

I got this:

root(a)rockhopper:~# update-alternatives --config ruby
update-alternatives: error: no alternatives for ruby.
root(a)rockhopper:~# update-alternatives --config rubygems
update-alternatives: error: no alternatives for rubygems.
root(a)rockhopper:~#

rvm in that guise is not on my apt purvey. I appreciate the suggestions.
Perhaps if it's this hard it's better to wait for the OSs to upgrade themselves
anyway. I just noticed the CentOS we use is way back to ruby 1.8.5. I sure
hope we stop using CentOS soon. It is a dog, and wastes a lot of our time.
Debian family stuff has it's problems, but for my work it seems to always come
out as superior.

--
"It's the preponderance, stupid!" - Professor Stephen Schneider, IPCC member