Live data from Hacker News

Rbenv, an unobtrusive rvm replacement

github.com

61–70 of 115 posts

Re: Rbenv, an unobtrusive rvm replacement

#61

Yes RVM is a crazy hack, but that's why I love it! Has anyone actually had problems with RVM overriding 'cd'? Has RVM changed the behavior of 'cd' in a way that was a problem for you?

Yes.

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.

Re: Rbenv, an unobtrusive rvm replacement

#63
post #17

Pretty nice, but I actually do really like having gemsets. It gets me as close to the production environment as possible, plus it makes it really easy to clean up unused gems when I'm done with a project.

For that, I use Bundler and always install gems to vendor/bundle for maximum isolation and easy cleanup. :~ which bi bi: aliased to bundle install --path vendor/bundle

You can tell Bundler to install to a relative path by default by putting the following in ~/.bundle/config:

  ---
  BUNDLE_PATH: vendor/bundle
In that way, you need only run the standard "bundle" or "bundle install" instead of setting up an alias.

Re: Rbenv, an unobtrusive rvm replacement

#64
post #15

Earlier quoted context omitted.

Why not?

Because going back to non-packaged non-vetted flavor-of-the-month code is a retrograde step back to 1993. You lose consistency, you lose the ability to reliably recreate a same environment, you lose tested and low-friction security updates, you lose dependency management, you lose the security of a crypto web-of-trust, and you lose the google-fu of being on the exact same versions of software as thousands of other pe…

Why would you not use the same version you develop your code on every day for production?

Re: Rbenv, an unobtrusive rvm replacement

#65
post #3

Is it production ready? RVM is.

RVM is hardly development ready, imho. Every week I run into problems/confusion with the environment it creates and expects. I would never put it anywhere near production.

Just to contrast. I've never had any issues with RVM. Gemsets rock!

Re: Rbenv, an unobtrusive rvm replacement

#66

Yes RVM is a crazy hack, but that's why I love it! Has anyone actually had problems with RVM overriding 'cd'? Has RVM changed the behavior of 'cd' in a way that was a problem for you?

> Has anyone actually had problems with RVM overriding 'cd'?

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.

Re: Rbenv, an unobtrusive rvm replacement

#67

Earlier quoted context omitted.

That's a good idea... ruby-build could provide an `rbenv-install` plugin command for rbenv.

ruby-build seems fairly small. Have you considered just including it inside rbenv's bin directory? That may decrease the friction and improve the 'git checkout rbenv, add path, and get started' workflow.

It is fairly small, but I think part of the idea is to decouple rbenv from how or with what tools you build Rubies. (It might make sense, though, for someone to create and maintain a fork that bundles ruby-build and rbenv.)

Re: Rbenv, an unobtrusive rvm replacement

#68
post #19

Earlier quoted context omitted.

I know very few people using the distro version of Ruby in production. Most are using either rvm (not so desirable) or a custom-compiled version (more desirable). In my experience, the version of Ruby shipping in most Linux distros and package systems is outdated or less than ideal for production use.

Apt-pinning and source packages are great ways to bring newer Ruby in to Debian stab 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.

+1. Many programmers who are not admins tend to install stuff according to their one-time desire and then announce it "production ready". In fact, there's something called "release management" and it's a rather different mindset. Please coders, respect your admins (and vice-versa), or learn to play both roles. Tools like rvm, while cool, are not substitute for this, because they can create an illusion that there's nothing to learn. There is.

Re: Rbenv, an unobtrusive rvm replacement

#69
post #55

An official release with a web site and improved installation process should be out next week. 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 looked at RVM a few weeks back while trying to set up a Rails app and was so frustrated I went outside and kicked a kitty. I am glad to see a project that should restore some of my sanity. Good work.

What was so frustrating about RVM?
Post reply on HN