8 ms·
rbenv (https://github.com/sstephenson/rbenv https://github.com/sstephenson/rbenv) is better than RVM.
by tta 14y ago
rbenv (https://github.com/sstephenson/rbenv https://github.com/sstephenson/rbenv) is better than RVM.
- csarva 14y agoI used rbenv for a while but what killed it for me was the huge startup lag it adds to every invocation of ruby or any other bin installed via a gem. I was seeing delays of 4-5 sec which disappeared when I switched to RVM. The universe of tools and integration is also far better in RVM land (though this may have changed more recently).
- kingfishr 14y agoI had this problem right when I started using rbenv. Eventually with some help I realized that just starting bash was slightly slow, and that all the various bash scripts that rbenv runs were compounding this for a 2+ second startup. In my case, everything was fixed by moving the the things that only need to be run in login shells out of my ~/.bashrc (where they should have been in the first place). See the bug I filed against rbenv at the time: https://github.com/sstephenson/rbenv/issues/70 https://github.com/sstephenson/rbenv/issues/70 Since that time, I've been using rbenv exclusively (development and production) and it's been great.
- charliesome 14y agoquantify "better"
- lloeki 14y agoI won't quantify, but qualify: it works without a pile of hacks like bastardizing cd, which fails in various real-world scenarios.
- weaksauce 14y agoWhat do they need to override cd for?
- lloeki 14y agoFrom the scripts/cd source [0]: # Source a .rvmrc file in a directory after changing to it, if it exists. To # disable this feature, set rvm_project_rvmrc=0 in /etc/rvmrc or $HOME/.rvmrc IMHO rvm is completely overkill and suffers from overengineering. [0]: https://github.com/wayneeseguin/rvm/blob/master/scripts/cd https://github.com/wayneeseguin/rvm/blob/master/scripts/cd
- tesmar2 14y agoMost users don't care if rbenv is better than rvm since they do the same thing, and apparently, at least according to the other poster, rbenv is slow
- lloeki 14y ago> according to the other poster, rbenv is slow Define slow: $ time /home/lloeki/.rbenv/versions/1.9.3-p286/bin/ruby -e 'exit' real 0m0.012s user 0m0.007s sys 0m0.003s $ rbenv global 1.9.3-p286 $ time /home/lloeki/.rbenv/shims/ruby -e 'exit' real 0m0.055s user 0m0.027s sys 0m0.007s Hardly something to cry foul for. Your first significant require will blow that time by an order of magnitude. And hardly surprising either since rbenv the alias calls rbenv the command, which sets a few env vars then calls rbenv-$1 (probably $1==exec), which calls rbenv-hooks $1 (probably a noop by default) then $1 + args. rbenv is seriously thin. > huge startup lag it adds to every invocation of ruby or any other bin installed via a gem Sounds more like bundler (maybe automatically started by ohmyzsh when just typing 'ruby' where you have a Gemfile): $ time bundle exec ruby -e 'exit' real 0m0.570s user 0m0.480s sys 0m0.057s or as mentioned, someone put too much stuff in his bashrc or something.