Francois
Francois

Reputation: 10631

ruby 1.8 to 1.9 ruby -v shows ruby 1.9.2p0

I want to upgrade from ruby 1.8.7 to 1.9.2, I installed RVM and also ruby 1.9.2 using RVM on Ubuntu. I dont think the previous version ruby 1.8.7 was installed using RVM (not quite sure how this works :) ). Anyway when I type

ruby -v

I get

ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]

wich seems right?

but when I run my rails app and click on the About your application’s environment link it shows this

Ruby version    1.8.7 (i686-linux)
RubyGems version    1.8.10
Rack version    1.3
Rails version   3.1.1
JavaScript Runtime  Node.js (V8)
Active Record version   3.1.1
Action Pack version 3.1.1
Active Resource version 3.1.1
Action Mailer version   3.1.1
Active Support version  3.1.1

How can I fix this? Thanks in advance guys!

EDIT:

I ran rvm list and it only shows 1.9.2

rvm rubies

=> ruby-1.9.2-p0 [ i386 ]

Upvotes: 0

Views: 274

Answers (2)

ryaz
ryaz

Reputation: 336

You can use .rvmrc file to specify using necessary ruby verison. All you need just type:

rvm --create --rvmrc 1.9.2@your_project_name

and then

cd .

After this your project must use ruby 1.9.2 and gemset your_project_name.

Upvotes: 1

bjhaid
bjhaid

Reputation: 9762

Install with RVM and when you are done run:

rvm list

then whichever you want to default your ruby to run the command below

rvm use default "name of the default ruby you want"

Upvotes: 0

Related Questions