Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why won't Rails 4 uninstall?

After uninstalling Rails 4(RC1) I still get Rails 4 apps generated with rails new.

➲ rails -v
Rails 4.0.0.rc1
➲ which rails
/Users/brandon/.rvm/gems/ruby-1.9.3-p392/bin/rails
➲ gem uninstall rails

Select gem to uninstall:
 1. rails-3.2.13
 2. rails-3.2.3
 3. All versions
> 

What's the cleanest way to fix this?

like image 732
iconoclast Avatar asked Jun 04 '13 04:06

iconoclast


2 Answers

It is quite easy.

gem uninstall rails -v=4.0.0.rc1
gem uninstall railties
gem install rails -v 3.2.13
gem update --system
rails -v

By using commands above I was able to install older version of rails as needed :)

like image 57
D.A.H Avatar answered Sep 28 '22 07:09

D.A.H


Rails does not come as an all-in-one package. You have a base Rails gem, plus it's many dependencies:

  • Action Mailer
  • Action Pack
  • Active Record
  • Active Resource
  • Active Support
  • Bundler
  • Railties <---- (contains generators)
  • Sprockets adapter for Rails

To get rid of your Rails 4 installation as a whole, you must remove all of these gems.

The easiest way to do this is to delete your entire gem folder, then reinstall whatever you need.

like image 40
Substantial Avatar answered Sep 28 '22 07:09

Substantial