Skip to content

Instantly share code, notes, and snippets.

@imajes
Created September 7, 2010 18:12
Show Gist options
  • Save imajes/568762 to your computer and use it in GitHub Desktop.
Save imajes/568762 to your computer and use it in GitHub Desktop.
Hey,
here's some shell action:
% rvm list
rvm rubies
jruby-1.4.0 [ x86_64-java ]
rbx-1.0.0-rc4 [ x86_64 ]
ree-1.8.7-2010.01 [ x86_64 ]
=> ree-1.8.7-2010.02 [ x86_64 ]
ruby-1.8.7-p299 [ x86_64 ]
ruby-1.9.1-p378 [ x86_64 ]
ruby-1.9.2-preview1 [ x86_64 ]
% rvm 1.8.7
warn: ruby ruby-1.8.7-p302 is not installed.
This behavior is wrong, and i'll explain why. It violates the
principle of least surprise. I want to get to 1.8.7, i have an
installed version, but you don't believe that i do. This behavior
sucks because now i'm scared to switch rubies; as well as being scared
to upgrade my ruby. I'm also obviously concerned about losing gemsets
when i try and upgrade- and so i have no faith in rvm anymore.
Now, I know that's not all realistic - in fact, rvm still permits me
to select older rubies, and i can save my gemsets. But the violation
of least surprise principle is uncomfortable and unnerving. I've heard
others say the same about rvm too.
Now, i'm not all a doomsayer, i have a proposal as to how it could work:
% rvm list
rvm rubies
jruby-1.4.0 [ x86_64-java ]
rbx-1.0.0-rc4 [ x86_64 ]
ree-1.8.7-2010.01 [ x86_64 ]
=> ree-1.8.7-2010.02 [ x86_64 ]
ruby-1.8.7-p299 [ x86_64 ]
ruby-1.9.1-p378 [ x86_64 ]
ruby-1.9.2-preview1 [ x86_64 ]
% rvm 1.8.7
warn: Updated Ruby ruby-1.8.7-p302 is not installed.
info: Selected Ruby ruby-1.8.7-p299
and continue to let me use whichever latest ruby i have that satisfies
the instruction for use that i give it. That way, i can know there's a
newer ruby- but not at the expense of quickly getting work done,
versus having to copy the exact version string and hope that it
matches right (do i want ruby-1.8.7-p299 [ x86_64 ] or do i want
ruby-1.8.7-p299?? perhaps another incantation?)
Why else this is important? I've i'm flipping between rubies and i'm
out of wifi - how annoying is it going to be to have the correct
specificity?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment