0

It looks like I have installed multiple version of rails :

rails (6.0.0, 5.1.7, 5.1.6.2)

I would like to remove the most recent one, 6.0.0 which I installed in order to use action text, but I realise that it requires me to do quite a few changes.

How can I simply do that please ?

When I do:

$ gem uninstall rails -v 6.0.0

I get :

ERROR:  While executing gem ... (Gem::InstallError)
    rails is not installed in GEM_HOME, try:
    gem uninstall -i /Users/elandron/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0 rails

When i do : / -type d -name rails-6.0.0 , i get

/Users/elandron/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/doc/rails-6.0.0
/Users/elandron/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rails-6.0.0
/Users/elandron/.rvm/gems/ruby-2.6.3/doc/rails-6.0.0
Rene Chan
  • 864
  • 1
  • 11
  • 25
  • 1
    gem uninstall rails -v 6.0.0 – Sebastián Palma Nov 29 '19 at 23:11
  • Also you don't need to uninstall it. With bundler, the exact version you specified in your Gemfile will be loaded. And for `rails new` you can use `rails _5.1.7_ new myapp` – Sergio Tulentsev Nov 29 '19 at 23:13
  • Thing is, since i installed it, I have heroku slug issue. I therefore suspect it is related. @SergioTulentsev, I amended the question to include your solution and the related result. – Rene Chan Nov 29 '19 at 23:15
  • Does this answer your question? [RoR - How to remove Rails 4.1.1 version?](https://stackoverflow.com/questions/23748388/ror-how-to-remove-rails-4-1-1-version) – Kick Buttowski Nov 29 '19 at 23:22

1 Answers1

0

The following worked for me at the end:

sudo gem uninstall rails -v 4.1.1

Then when running gem list, I only see the version that I wanted.

Rene Chan
  • 864
  • 1
  • 11
  • 25
  • This sounds like your RVM setup is messed up. https://unix.stackexchange.com/questions/203376/how-to-set-ruby-gem-home-and-gem-path – max Nov 30 '19 at 23:28