Jngai1297
Jngai1297

Reputation: 2495

gem uninstall rails and it still exist , didn't installed but it said it did

I git cloned an open source software and is currently planning to contribute to it. Originally I installed ruby 1.9.3 with rvm and installed gem install rails - which fetched version 4.0 (newest version)

I installed ruby 2.0 as well with rvm and did 'gem install rails' which also fetched me version 4.0

I was planning to installed ruby 1.9.3 with rails 3.2.13 - an older version of rails to work with different software and switch between them using rvm

So since my open source software is written in 1.9.3 and rails 3.2.13, I tried
gem uninstall rails and removed all the rails version but when I do rails-v , it is still 4.0

I figured out from another question that there are folders associated with 4.0 that I need to remove to remove 4.0, another question suggest that I install rails 3.2.13 but when I make a new app I can just do rails 3.2.13 new app etc. I installed that under 1.9.3 when I switch to 2.00 which still has 4.0, I tried rails 3.2.13 new app and it ran which I don't think it should.

I am growing semi-frustrated with this, and I wish someone can help me while I browse even more questions.

Upvotes: 0

Views: 207

Answers (1)

jweaver60
jweaver60

Reputation: 53

You should create a new gemset within rvm for this. That way you can use a different version of ruby and rails than your system default. Switch to ruby version 1.9.3 in RVM and then use rvm gemset create <name-here> and then rvm gemset use <name-here> to create and use the new gemset. Switch to the directory of the project you cloned and run bundle install to install all of the necessary gems, including rails (assuming the rails version is specified in the Gemfile.)

Upvotes: 3

Related Questions