user2131710
user2131710

Reputation: 265

RVM::IncompatibleRubyError

I am trying to run a sample rails application on a server but am unable to do so and just keep getting this message.

Error message: The given ruby environment requires ruby-1.9.3-p392 (versus ruby-1.9.3-p374) (RVM::IncompatibleRubyError)

I think it means I have to change my version of ruby? Is it possible to do it in command line?

Upvotes: 0

Views: 331

Answers (2)

Kocur4d
Kocur4d

Reputation: 6921

To find out what ruby versions you have installed type:

rvm list

If version you need is not listed type:

rvm get head

this will upgrade to the most stable version of rvm(optional step).

To list all version available to install type:

rvm list known

To install version you need type:

rvm install ruby-1.9.3-p392

Now you can double check it with:

rvm list

and type:

rvm use ruby-1.9.3-p392 

to use it.

if you would like your new version to be default version add --default flag to rvm use command

rvm --default use ruby-1.9.3-p392

There is few more other flags like --system for example, check rvm home page for more info.

UPDATE

Some how I just assume that you are using rvm, but after rereading your answer I didn't find any information about it(my brain lag).

RVM is a Ruby Version Manager(there is few others out there) and it helps you with installing new versions of ruby and managing installed ones. I recommend you to use some sort of ruby version manager and RVM is a good choice.

If you need info about how to install it let me know or check the link i gave you for installation process.

Upvotes: 1

abhijit
abhijit

Reputation: 1968

Yes you are correct, and you can do it using command line,

if you have the corresponding ruby version installed

this would switch to the below ruby version

rvm ruby-1.9.3-p392

If you want to install using the command

rvm install ruby-1.9.3-p392

and use it using rvm ruby-1.9.3-p392

Upvotes: 1

Related Questions