It doesn't try to do as much, so a little less magic. The biggest thing I like is that it doesn't try to do anything with gems, which is good - I've been trying to use bundler for everything.
It doesn't try to do as much, so a little less magic. The biggest thing I like is that it doesn't try to do anything with gems, which is good - I've been trying to use bundler for everything.
RVM is no more magic than rbenv, and to listen to Ruby developers (who treasure "magic") talk about it as if RVM commits some cardial sin by overriding `cd` tops out my nerd-rage-meter. Ruby, home of the monkey patchers, has no place calling out RVM for overriding `cd`.
RVM and rbenv serve similar purposes. RVM gives you gemsets as well. You may not need them today, but they're there if you do. I use Ruby for a lot of system administrative tasks. These tasks run inside cron jobs and other places where a bundle really doesn't make sense. Despite the fact that they're no longer in vogue, gemsets are still very useful.
Should you check out rbenv? Yes. But the "little less magic" is a really poor basis by which you should evaluate it as a tool.
Ruby is my go to language for damn near everything. I use it for working with log files, parsing Excel documents & performing analysis, system administration, you name it. Many of these scripts are one-offs that reside in '~/bin'. RVM allows you to do something like this in your shebang:
#!/usr/bin/env ruby-1.9.2-p290@vqm-analysis
That's the first line in a shell script that I wrote to collect examples of bad calls in a csv file output from an AdTran 900-series VoIP gateway. The CSV file contains about 30 columns of data related to the quality of VoIP calls. I have a collection of five or six scripts that use that gemset, but they're not really an application. They just run from '~/bin', so using bundler isn't really practical. I could wrap them up in a gem and make them a proper application, but this is scripting. Simply using RVM + gemsets saves me a lot of time.
My point is that gemsets may or may not have any utility for you, but it's narrow minded to assume that they have no utility for everyone.
The monkey-patching of `cd` is the main reason I'm not using RVM. I depend on `cd` to work, every time, rock solid, especially when my system is unstable. I can't risk having a dependency or bug in their `cd` script breaking my most commonly used shell command.
rbenv has demonstrated that it's not necessary to override `cd` to manage ruby versions, so why does RVM still do it?
Yeah, there's http://beginrescueend.com/integration/fish/, but I tried that and it started printing errors every time I used cd due to some bug (this was over a year ago, there's a good chance it's been fixed, but it just left me really shy about overriding cd).
Here's the rub. No one ever has a problem with the overridden `cd` command. Community outcry resulted in a reversion of the default returning to it's original configuration.
What bugs the shit out of me is the band-wagoning from people who, frankly, haven't got a clue. They hear that "there be dragons" in RVM, and all of the sudden everyone is running around flailing their hands over their head like RVM installs a custom kernel or something. It's unwarranted, and it all stems from the original hit job pulled by Sam Stephenson when he released rbenv. Meanwhile, all the same people who are screaming about the "magic" in RVM were cluelessly using it for god knows how long before rbenv came along.
Sam has since apologized and will tell you that RVM is a fine tool, but everyone seems to have forgotten that. If you don't want to use RVM, fine, don't use it, but the "reasons" everyone cites for avoiding it are pretty weak in practice. Wayne is one of the strongest bash programmers I've ever seen. I trust him, and every time I've needed him, he's been available in #rvm for help. Go forth and use rbenv, but you don't have to kick dirt on RVM along the way.
* No need to install a second thing (ruby-build) to install rubies.
* No need to do manual things like running "rbenv rehash".
* More chatty and hand-holding (tells you dependencies you need to install for your platform, etc)
What is it about having gemsets that makes it easier for a beginner? Bundler seems to handle installing dependencies just fine.
With rvm you can create a gemset just for that project youre testing out. Imagine trying to work with different projects that have different versions of ruby, different versions of rubygems and different versions of rails, some gems from github, some gems from source, some gems from rubygems.
A beginner would not be able to sort through the dependency mess this creates. Gemsets help you avoid this nightmare.