251 points · by vamsee · 15y ago · 112 comments
Both rvm and rbenv allow you to specify per-application dependencies (rvm with .rvmrc files, rbenv with .rbenv-version files). The difference is that rbenv does it in a much simpler, less invasive way.
If you're wondering "why would I use this instead of rvm?" be sure to read the readme: https://github.com/sstephenson/rbenv#readme
I've never liked how RVM overrides shell commands.
I am glad to see a project that should restore some of my sanity. Good work.
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#se...
I kept getting issues with versions.
I should have specified that, I do not necessarily think it is a bad product, but it did frustrate me a lot when trying to set it up. I'm sure it has saved a lot of developers time, but I speak for myself and myself alone, and the cost-benefit for me was way off.
ruby==ruby 1.8.7 ruby9==ruby 1.9.2 jruby== jruby 1.6 jruby5==jruby 1.5
Yeah, real tough.
I got a simple solution for all you distro vs RVM people: People who prefer to use RVM - use RVM, people who prefer to use distro - use distro. Until you have proven that a server that runs distro is 2x more valuable in $ - post on HN and we could review it again. Reminding you of that we don't live in a totally symmetric universe.
I did, in two different ways. The first time, cd was returning the wrong exit status. (That is, it had become a function and was returning the exit status of its last command, rather than the exit status of the actual cd call. A common gotcha when you override shell built-ins or other commands.) The incorrect exit status caused a number of shell scripts completely unrelated to rvm to break. That made it harder to debug, obviously. The second time I had trouble, TAB autocompletion with cd was broken. At one point, rvm was doing its own autocompletion for cd, although the last time I looked, it no longer does that by default. (Yeah, just checked - that code path is still opt-in by setting rvm_cd_complete_flag=1.)
Having said that, both times when I went into #rvm on Freenode to talk to Wayne about it, he could not have been more helpful.
Having said that, I still wish that as a design decision, rvm didn't override cd.
I don't know if it was due to a weird environment variable or something, but when I installed RVM it got itself into an infinite loop sometimes when I did `cd`.
I reported a bug, but the author couldn't reproduce or fix it. So now I recommend anyone who asks me not to use rvm, because it's utterly ridiculous.
That may decrease the friction and improve the 'git checkout rbenv, add path, and get started' workflow.
:~ which bi
bi: aliased to bundle install --path vendor/bundle
---
BUNDLE_PATH: vendor/bundle
In that way, you need only run the standard "bundle" or "bundle install" instead of setting up an alias.I could definitely see myself wanting to override `gem` in order to detect binary installations and automatically rehash. At which point, it's not so unobtrusive!
Still interested enough to try it out and see if that is as much of a hassle as I think it will be.
Considering the many times I've seen RVM installs fail due to checked-in broken code, I'd hardly call it "production ready" either.
1. Gemset isolation comes in handy.
2. Sometimes you want to have multiple ruby versions (e.g. MRI for app and JRuby for memory heavy script)
Using RVM anywhere is suboptimal, but using it in production is lunacy.
In my experience, the version of Ruby shipping in most Linux distros and package systems is outdated or less than ideal for production use.
The first thing I did after you left our common former employer was ditch all of the manually-installed REE on Ubuntu and changed to Debian stable with .debs of ruby and rubygems pinned in from testing. It was an improvement.
Every week I run into problems/confusion with the environment it creates and expects.
I would never put it anywhere near production.
It looks promising though, especially as an alternative to RVM in development. I'm keen on installing something that doesn't take over my shell.
I'm not going to lose sight of how awesome RVM is though. It changed the way I develop in Ruby.
If you switch to JRuby in the first screen, then switch to the second, the changes don't propagate. e.g.:
(first screen)
$ rvm list
rvm rubies
=> jruby-1.6.3 [ darwin-i386-java ]
ree-1.8.7.2001.03 [ x86_64]
(second screen) $ rvm list
rvm rubies
jruby-1.6.3 [ darwin-i386-java ]
=> ree-1.8.7.2001.03 [ x86_64]
It's not a big deal -- you just have to make sure you do the right thing -- but it is unexpected and has burned me a couple of times. It looks like rbenv won't suffer from this problem.