Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terminal still shows older version of rails even after updating

I am a beginner in web development and following the book, Ruby on Rails tutorial by Michael Hartl. I updated my rails using command gem install rails -v 3.2.3 and it seemed to work. But when I checked the rails version using command rails -v, it still shows some different version: Rails 4.2.5.2. I restarted my terminal but no luck. Could you please help me.

Thanks in advance

like image 572
dasfdsa Avatar asked Feb 07 '23 13:02

dasfdsa


1 Answers

This is because there are now two versions of rails in your railties. Try to run this first:

gem uninstall railties

By running this command your screen will show rails gems list like the following:

Select gem to uninstall:
1. railties-3.2.18
2. railties-4.2.6
3. All versions
> 

Type 3 to remove all. now your gem list has no rails gem. Now you can install rails -v 3.2.3. After installation, rails -v will show: Rails 3.2.3

like image 73
Ahsan Ellahi Avatar answered Feb 13 '23 15:02

Ahsan Ellahi