Why does my Ubuntu still claim that the version of Ruby on Rails is 4.0.0 after the explicit uninstall and installation of the previous one?

advertisements
[email protected]:~$ sudo gem uninstall rails
[sudo] password for test:
Successfully uninstalled rails-4.0.0
[email protected]:~$ rails -v
Rails 4.0.0

[email protected]:~$ sudo gem install rails -v 3.2.11
[sudo] password for test:
Successfully installed rails-3.2.11
[email protected]:/home$ rails -v
Rails 4.0.0

[email protected]:~$ sudo gem uninstall rails -v 4.0.0
INFO:  gem "rails" is not installed

[email protected]:~$ sudo gem uninstall rails -v 3.2.11
You have requested to uninstall the gem:
rails-3.2.11
gmaps4rails-1.5.6 depends on [rails (~> 3.2.1)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]

why?

for what it's worth, below is supplementary info.

[email protected]:~$ gem list rails
*** LOCAL GEMS ***
rails (4.0.0)
[email protected]:~$
[email protected]:~$ sudo rails -v
Rails 4.0.0
[email protected]:~$ rails -v
Rails 4.0.0

gemfile

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'


Try using this:

gem install rails # No sudo

Most folks I know are using rvm (or rbenv) though: https://rvm.io/