Hacker News new | ask | show | jobs
by alrs 4731 days ago
Correct.

Don't use rvm or rbenv on your production Linux boxes. Use packaged Ruby there.

1 comments

Er, why not? rvm was originally made for production use!

I've used rvm in production for major sites for years with no problems whatsoever, in fact I believe it is best practise. Do you have any reasons for your preference for packaged ruby?

Best practice says production boxes shouldn't have compilers installed.
Install compilers on one machine, build Ruby, package it up as a deb/rpm/whatever, distribute to other machines.
Yep, that's the idea.
Sounds like an awful lot of work for no good reason I can think of.

You'll need a compiler, anyway, once you start trying to use any number of libraries requiring compiled C extensions.

"No compilers on production!" might be true elsewhere but I can't see any reason it applies for ruby deployments.

> Sounds like an awful lot of work for no good reason I can think of.

Perfectly reproducible deploys and shutting down attack vectors are both very good reasons.

> You'll need a compiler, anyway, once you start trying to use any number of libraries requiring compiled C extensions.

Only if you're doing `gem install` in production. Guess what? That's not a particularly good idea either.

> "No compilers on production!" might be true elsewhere but I can't see any reason it applies for ruby deployments.

Ruby isn't special, or magic. It doesn't get a free pass "just because." If you've got reasons it should be exempt from the best practices that have been learnt elsewhere, let's hear them.