nerdiplayboy
nerdiplayboy

Reputation: 556

Rails command working , rails -v shows Rails 4.0.0 , gem list rails shows 3.2.13

Rails command is working . rails -v shows 4.0.0 . gem list rails shows 3.2.13 . I want to work on rails 3.2.13 , when i tried to uninstall rails 4.0.0 it says gem "rails" is not installed .What should i do so that rails -v shows 3.2.13 and rails 4 get uninstalled ?

Upvotes: 0

Views: 379

Answers (3)

Jacob Brown
Jacob Brown

Reputation: 7561

It's because the Rails binary actually loads itself via the railties gem. The last two lines of /usr/local/bin/rails looks something like:

gem 'railties', version
load Gem.bin_path('railties', 'rails', version)

You need to run:

gem uninstall railties -v 4.0.0

Assuming you have Rails & Railties 3.2.13 installed, rails -v should now return Rails 3.2.13.

Upvotes: 1

Marc Böhle
Marc Böhle

Reputation: 57

It's probably the best way to use rvm https://rvm.io/rvm/install I had the same problem a week ago.

try gem uninstall rails -v=4.0.0. or

gem uninstall rails

then install rvm using:

\curl -L https://get.rvm.io | bash

and then

\curl -L https://get.rvm.io | bash -s stable --rails

and

gem install rails --version '~> 3.2.0'

Upvotes: 0

medBouzid
medBouzid

Reputation: 8442

I don't know why you want remove rails 4, if you are already using rvm you should easily switch between ruby/rails versions without any problem, if you don't know rvm i recommend you to read why-you-should-use-rvm

if you should remove obligatory rails 4.0.0 try this command :

gem uninstall rails --version 4.0.0

if this can't solve your problem please add more details in your question

Upvotes: 0

Related Questions