RVM (Ruby Version Manager) 1.0.0
wayneeseguin.beginrescueend.com
wayneeseguin.beginrescueend.com
+ Rubinius will remove the GIL ("the work has already begun" -- Yehuda Katz http://yehudakatz.com/2010/08/14/threads-in-ruby-enough-alre...)
+ MacRuby will be even faster, more stable and more documented
It will be an awesome end of 2010/2011 for Ruby programmers.
The goal of Bundler is portability between deployments. It answers the question: "How do I package up everything required to run this app so I can deploy it anywhere."
What Bundler does is establish a container for all gems (and ONLY those gems) that your application needs to run. This is much like an automatic, application-specific gemset.
It also solves the difficult problem of resolving your applications dependencies, locking your gems to a particular set of dependencies to assure consistency across environments and deployments. This is a very critical feature and really showed its ugly head when Rails 2.3.8 was released. Users suddenly found their projects breaking because one gem would load the latest version of activesupport installed on their system (e.g. activesupport-2.3.8) while Rails would require exactly version 2.3.5. Bundler solves this problem by determining that 2.3.5 is the correct dependency and locks the application to only load that version.
It is exactly because of this feature that gemsets are now rarely needed. A large repository of gems will no longer cause you pain and hassle, as Bundler will pick and choose (or install) whichever gems you need to run the project. No more manual management of gemsets. Hooray!
rvm gemsets are still a great way to have a general purpose Rails 2 setup and Rails 3 setup on the same machine. Granted, if you only work with applications that use Bundler, it's totally unnecessary. But often you will have legacy apps, or you just want to hack around quickly on some code without set up a Gemfile.
On OS X, the entire process of installing was painless, straightforward, and took very little time. The process of learning it took even less time.
Highly recommended.
And yes... I know that exact same feeling :) http://news.ycombinator.com/item?id=1151932
For those developing Ruby libraries, RVM makes multi-version testing a breeze.
Holy shit. I got the world's greatest crash course on, not just RVM, but bash scripting as well.
Wayne is not only a really nice guy and fun to hang with, but freakin' smart.
Super congrats on reaching 1.0.0.
http://rvm.beginrescueend.com/gemsets/basics/ http://rvm.beginrescueend.com/workflow/rvmrc/
Please donate http://pledgie.com/campaigns/9822.
Recommended fix: $ echo rvm_project_rvmrc=0 >> ~/.rvmrc
# Source a .rvmrc file in a directory after changing to it, if it exists.
# To disable this fature, set rvm_project_rvmrc=0 in $HOME/.rvmrc
Also, the new security features that Wayne mentions in this post suggest that a cd automatically leads to a check on the directory you cd into. Doesn't that imply that rvm still has to plug itself into cd? (I may be confused here.)I have to admit the cd thing ended up throwing me for an interesting loop at one point. I was scripting and no matter what happened, cd was returning 0 (success) - even when the cd command was actually failing. I could not figure out for the life of me why the right exit status wasn't being reported. It turns out that rvm wasn't saving and then returning the exit status of cd itself. (So the exit status I was capturing wasn't actually that of cd.)
Long story short, two minutes in #rvm and Wayne had it fixed [2].
Edit: I think I see the confusion. Cldwalker is saying that he doesn't like rvm tinkering with cd. Bgentry is saying that rvm no longer automatically switches Ruby if it finds a .rvmrc in a folder (after you cd into it). That's right, but it doesn't change what is bothering Cldwalker: rvm does in fact still get in front of cd. (I think 'hijacking' is too strong, but I know what Cldwalker means by it.) If you use rvm, then by default every time you issue cd, rvm runs the code in [1] (part of which obviously punts to the built-in cd). You can disable this behavior, as Cldwalker says, by setting the environment variable rvm_project_rvmrc to 0. Unless I'm wrong, the default is still on.
[1] http://github.com/wayneeseguin/rvm/blob/master/scripts/cd
[2] http://github.com/wayneeseguin/rvm/commit/f9aa3adebcca547924...
So, setting rvm_project_rvmrc=0 will still execute RVM's cd script, but it will skip the part that loads an rvmrc
Not exactly: setting 'rvm_project_rvmrc=0' causes rvm's cd script to immediately bail out. From .rvm/scripts/cd:
if [[ "$rvm_project_rvmrc" -ne 0 ]] ; then
Everything else in the cd script hangs off that if. So by setting the environment variable, that whole branch (which is the whole script) is skipped and rvm won't get in front of cd.It generally feels more 'complete' to me.
I didn't do any serious work with virtualenv in quite some time, so this may have changed.