I have been trying to understand RVM and decided to do so by not using it and seeing the consequences. I am trying to see how I can manage different versions of ruby and their gemsets without RVM.
I compiled Ruby 1.9.1 from source on my Ubuntu machine and found it in the path usr/local/bin/ruby. On saying ruby -v, I got the recently installed version.
I did the same with Ruby 1.8.7 and upon doing a whereis ruby, got the following output :
usr/local/bin/ruby usr/local/lib/ruby
When I say which ruby, I get the usr/local/bin/ruby path.
The contents of usr/local/bin/ruby were the same as before but usr/local/lib/ruby upon doing an ls showed the following output :
1.8 1.9.1 gems site_ruby vendor_ruby
On saying ruby -v I got the recently installed version.
I did the same with Ruby 1.9.3 and upon doing a whereis ruby, got the same output as before with the same contents. When I say which ruby, I get the usr/local/bin/ruby path.
On saying ruby -v, I got the recently installed version.
I fail to understand what is happening at this point of time. How are the different ruby versions being installed ? Is there some way, I can manage multiple versions without rvm (for learning purpose) ? Can I force all ruby versions to reside in the same directory in different folders and change the version to be used by setting the path perhaps ?
Also, if I look at local gems on the system, is there some way I can have a different set for each ruby version ?
If I wanted to, at this point, how can I get rid of all ruby versions and gems from my system ?