I am new to RoR and I tried to follow the Ruby on Rails Tutorial from Micheal Hartl. Before starting the tutorial I already set up everything earlier and updated the Rails version to 4.1.1 and everything worked well until the point in the tutorial where I needed to have max 4.0.5 version of Rails in order to proceed with the example. In order to do so I tried several things. First I run:
gem uninstall rails
after which I received the message that it was uninstalled but when running rails -v I still had 4.1.1. Then,following one answer on stackoverflow, to uninstall railties, I did:
gem uninstall railties 4.1.1
after which when running: rails -v I got a message that version 3.2.18 was running which was the one I installed as part of the railsinstaller. Unfortunately, after creating a new app it stopped on the bundle install and didn't continue, for several times. Then I tried to remove all the gems in order to install everything from scratch. I did it with:
ruby -e "gem list
.split(/$/).each { |line| puts gem uninstall -Iax #{line.split(' ')[0]}
unless line.strip.empty? }"
which I also found here. It did remove the gems, after which I uninstalled Ruby. Then I installed everything again with the railsinstaller which has Rails version 3.2.18. When it finished and when I opened the cmd, in the Rails Environment Configuration under Rails version I could see again version 4.1.1. When i ran:
gem uninstall rails
it uninstalled the 3.2.18 version, the correct one. I installed everything again, hoping that the correct version is installed and that showing the 4.1.1 is a minor bug, but the bundler install still didn't work normally when creating a new app. Right now, after several tries, I tried to leave it as is, not to uninstall anything but to try to install the 4.0.5 version besides. First it installed railties and rails 4.1.1 and then I got an error: could not find a valid gem '4.0.5'.
I checked for several questions and answers, trying to set it up the whole day but it didn't work out. I tried to write details so you can understand better since there were similar questions but not targeting the exact same problem I have. Whatever I did I finished up with many gems with version 4.1.1 still being in the folders. I hope somebody will know what to do and how to remove the previous version forevr. Thanks in advance!