dennis
dennis

Reputation: 2020

Rails version stuck at 2.3.5 how to update to 3.x

Hi there thanks for looking into this.

after a clean install of Linux ubuntu 10.10 i tried to re-install rails.

after doing sudo gem install rails, I can see I am returned version 3.2.3 of rails

But after generating a new project i couldn't find my gemfile so i tried ruby -v which returns 2.3.4 wich is odd since I know I got the latest.

Also when trying sudo gem update --system I get an error because I might override system files. any solution here?

Upvotes: 1

Views: 116

Answers (1)

Kevin Bedell
Kevin Bedell

Reputation: 13424

I'd recommend using rvm to manage your ruby sets -- as well as defining gemsets for each project that will allow you to make sure each project has just the gems it needs.

Here's a link to the rvm installation instructions (they should work with ubuntu):

https://rvm.io/rvm/install/

Here's some info on basic use of gemsets with rvm:

https://rvm.io/gemsets/basics/

Also, when using rails 3+, you should make a practice of typing bundle exec rails -v -- that way you'll use the gems defined for the project you're in.

Can you try typing bundle exec rails -v and letting us know what you see?

Upvotes: 2

Related Questions