Hacker News new | past | comments | ask | show | jobs | submit login

Is it production ready? RVM is.



I don't see a pressing need to use RVM in production; when I deploy, I pick a Ruby version and stick with it unless there's a security issue, at which point I pull the updated REE package from Phusion/let Heroku figure it out.

Considering the many times I've seen RVM installs fail due to checked-in broken code, I'd hardly call it "production ready" either.


The complete lack of a changelog doesn't help either. I never know whether something's going to break in a new release and almost every new release has some little semantic change that borks my system.


> I don't see a pressing need to use RVM in production

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)


Debian allows you to install ruby MRI and jruby simultaneously.


Recommending RVM for production use is hilarious.

Recommending debian-ruby for production use is bordering on physical injury.


> Recommending RVM for production use is hilarious.

That's a pretty inflammatory, unsubstantiated opinion. Any reason?


Likely the reason was "to make the joke work."

And also that RVM is a development tool, and the overhead it adds to production is silly.


I have to use rvm in production because debian/ubuntu install ruby 1.8 and I need 1.9.2 for rails 3. Ruby isn't in the alternatives system (yet - coming soon) so I don't see a better way.


Installing 1.9.2 from source if it is in fact not in the repos is far better then using RVM.

Using RVM anywhere is suboptimal, but using it in production is lunacy.


apt-get install ruby1.9. It's in there.


1.9.1 is there, 1.9.2 is not. But I still the the better solution is to build from source on each machine, or create a custom 1.9.2 package for the machines you will be using. As other comments have pointed out, RVM is held together with string and duct tape and breaks frequently. I haven't dug into the code from this project, but being more testable and maintainable would be one of the biggest wins they could achieve from my point of view.


I have to contradict you (unless I'm misunderstanding you): the debian package named ruby1.9.1 is actually 1.9.2. The 1.9.1 refers to the ruby ABI. Blame the ruby devs for breaking the ABI in a minor version update (1.9.0 -> 1.9.[12]).


That's the goal, and that's why rbenv does not perform compilation/installation at all (there's a separate ruby-build project for that: https://github.com/sstephenson/ruby-build).


RVM belongs nowhere near production. It exists so that the guys with the macbooks can sync up versions with what is happening in the Linux distro, not the reverse.


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.


I'm not familiar with the technique you're referring to, is there a reference you could point me to that discusses "apt-pinning" packages from testing? We recently had a "there must be a better way" moment trying to get a standardized Ruby 1.9.2 installation set up - I think what you're describing is that better way.




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 people.

http://qa.debian.org/popcon.php?package=ruby1.8


I'd tend to agree, with one exception: it's sometimes even more desirable to construct own /usr/local version of some critical packages (database, languages, crucial libs) instead of distro versions; then recreate this on your all production nodes and never upgrade it without a carefully thought reason and pre-prod test.

Two main reasons for this:

- sometimes the version provided by the distro doesn't have set of features which you need and careful admin can provide it for you,

- sometimes distro packagers or upstream folks violate semantic versioning (incidentally or not) and upon upgrade from distro, some of your sub-features ("sub-" doesn't have to mean "not critical") break.

Of course you lose the google-fu you've mentioned, but to be honest, many production environments are so distinct that there's no sane way to compare one to "typical Debian X.Y server".

I personally find FreeBSD approach very convenient wrt to the issues above, because ports evolve independently from the base system; but YMMV.


I'll take your word for it. For me, it mostly saves me a bunch of time.

Edit: Just in case I'm coming off as snarky here, I don't mean to. My projects tend to be on the simpler end, and rvm saves me a lot of time. I'm sure it's a little cowboyish for bigger projects - I was just wondering if there was something about rvm that made it universally inappropriate for production use.

Double Edit: "a bunch" is probably an overstatement. rvm was a great help transitioning to 1.9.2. I'm not sure if it will provide much utility going forward.


This is kind of a classic "fast, correct - choose one" debate. If saving time is more important, perhaps you should use RVM in production, if correctness is more important, you probably shouldn't. It comes down to how expensive your mistakes are.


If you only have one server and can script most of the install process it's not a problem. When you have more than one server, rvm is not going to save you time.


I have my gripes with RVM, but this isn't one of them. I work on a project for provisioning and deploying EC2 servers. It's a capistrano plugin called rubber.

In any event, the immediate benefit is we can provide a tool that lets our users set up whatever Ruby they want to use, as we shouldn't be forcing that on them. Moreover, it makes it dead simple to deploy different Rubies out to different parts of the cluster, since everything is role-based. That's far from the common use case -- most people use the same Ruby everywhere. But if you have more complex needs, RVM affords a lot.


Your arguments sound nice in theory.

Yet I don't know a single ruby shop who runs with a distro-packaged ruby, even though REE is available as a .deb.


We do - nothing wrong with Debian stable's 1.8.7 and/or 1.9.2.


I do this for a living, and I've used Debian-packaged Ruby wherever I've gone. I haven't experienced issues.


I use the Phusion-provided .debs for REE on Ubuntu.


Count us in. We only use packaged ruby, be that MRI or JRuby.


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


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!


Please provide us with some of the problems/confusions you ran into.


In 1v1 anecdotal contrast, I've never had any real issues with RVM.


In most cases you shouldn't have RVM in "production" any way.


To be fair, Wayne has always said that RVM was made for production first and development second. Not sure if it is fair to say it is not production ready since it has always been geared toward just that.


It doesn't matter what Wayne has always said. He's designed a collection of fragile shell script hacks that want to be run as root that fundamentally change the behavior of key system commands.


Root? I don't think I've ever run RVM as root. Why does it need to? Not saying you're wrong, I just don't know what you're referring to.


You don't have to run them as root. You can run them as a regular user. I'm pretty sure Wayne recommends against RVM system-wide and the preferred method is just installing it for individual users.


login as regular user, download some version of ruby, compile for use as logged in user, install rvm, shazzam install any version of ruby you want - all of this only applies to the logged in user and has zero impact on the rest of the system. RVM rules :)

I no longer install ruby at a system level, not needed, only users running ruby stuff need ruby installed and never use distro ruby, creates all sorts of issues...


The project is only 10 days old (so, no).

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.


I'm guessing rbenv isn't meant for production. As to some of the comments about how you should never use RVM in production, it's complete crap. I've used RVM in production on multiple servers for well over a year. RVM fits perfectly in corporate environments where you have no access to the sudo command.


Where can one by some "production ready"? ;-)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: