I want to start off by saying… I really don't need to be using 1.9.2. I understand that you don't ever, ever use Python 3.2, so if the common advice is that I should use 1.8, I'll do that. But don't tell me to do that because it's easier.
Whatever version I should be using, though, the question is still relevant: What's a good way to make one command do another command?
(I suppose I could write a c program to launch ruby1.9.1, call the executable ruby, and put it in my bin, but this seems like less than a good idea)
Best Answer
Well to start with, you wouldn't need to write a C application - a simple bash ditty would do you fine.
I think the cleanest possible solution would involve the
update-alternatives
system. This is how, for example, Ubuntu manages to keep various Java virtual machines separated while installed alongside each other. The problem is you need to set it up yourself.I just came across a mailing-list post that does seem to do most of the heavy lifting for you. You might need to change the version numbers slightly but other than that, you should get the idea.
For posterity (in case Google nixes the URL or the thread), I'll copy in the business end now but I take no credit for writing it.