Question: This is what I have done:

```
gem uninstall rails

gem uninstall railties

gem install rails 3.2

```

And terminal shows this code:

```
Done installing documentation for rails, railties after 1189 seconds
ERROR:  Could not find a valid gem '3.2' (>= 0) in any repository
2 gems installed
weare138@mycomp:~$ rails -v
Rails 4.1.5

```

How to fix it?

Answer: 
You are missing the -v flag so rubygems is thinking that 3.2 is the name of a different gem and you are installing the current version (4.1.5). Instead try:

```
gem install rails -v 3.2.19

```

You should not need to remove up-to-date versions as you can specify the older rails version when starting a project with:

```
rails _3.2.19_ new myapp

```
If you are using RVM, create a new gemset

```
rvm gemset create <name>

```

Then you can switch to that gemset using

```
rvm use 1.9.3@<name> #assuming your ruby version is 1.9.3

```

That gives a clean gemset you can install Rails 3.2 to. Maintain multiple gemsets and switch between them