News for hackers. Stuff that matters.
Re:Rbenv, an unobtrusive rvm replacement by NARKOZ on Thursday August 11, 2011 @05:29PM (#2874890)
Is it production ready? RVM is.
Re:Rbenv, an unobtrusive rvm replacement by bonzoesc on Thursday August 11, 2011 @05:44PM (#2874967)
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.

Re:Rbenv, an unobtrusive rvm replacement by xentronium on Thursday August 11, 2011 @06:23PM (#2875086)
> 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)

Re:Rbenv, an unobtrusive rvm replacement by alrs on Thursday August 11, 2011 @06:59PM (#2875195)
Debian allows you to install ruby MRI and jruby simultaneously.
Re:Rbenv, an unobtrusive rvm replacement by moe on Thursday August 11, 2011 @07:27PM (#2875290)
Recommending RVM for production use is hilarious.

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

Re:Rbenv, an unobtrusive rvm replacement by burke on Thursday August 11, 2011 @11:45PM (#2875900)
> Recommending RVM for production use is hilarious.

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

Re:Rbenv, an unobtrusive rvm replacement by cdcarter on Friday August 12, 2011 @02:28AM (#2876209)
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.

Re:Rbenv, an unobtrusive rvm replacement by nirvdrum on Thursday August 11, 2011 @06:19PM (#2875078)
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.
Re:Rbenv, an unobtrusive rvm replacement by SpikeGronim on Thursday August 11, 2011 @06:24PM (#2875089)
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.
Re:Rbenv, an unobtrusive rvm replacement by boz666 on Tuesday August 16, 2011 @07:20PM (#2893313)
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.

Re:Rbenv, an unobtrusive rvm replacement by alrs on Thursday August 11, 2011 @06:57PM (#2875192)
apt-get install ruby1.9. It's in there.
Re:Rbenv, an unobtrusive rvm replacement by sanderjd on Thursday August 11, 2011 @07:18PM (#2875264)
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.
Re:Rbenv, an unobtrusive rvm replacement by nona on Thursday August 11, 2011 @07:53PM (#2875345)
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]).
Re:Rbenv, an unobtrusive rvm replacement by sstephenson on Thursday August 11, 2011 @07:31PM (#2875302)
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).
Re:Rbenv, an unobtrusive rvm replacement by alrs on Thursday August 11, 2011 @05:54PM (#2875001)
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.
Re:Rbenv, an unobtrusive rvm replacement by heimidal on Thursday August 11, 2011 @06:26PM (#2875096)
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.

Re:Rbenv, an unobtrusive rvm replacement by alrs on Thursday August 11, 2011 @06:49PM (#2875167)
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.

Re:Rbenv, an unobtrusive rvm replacement by kunley on Friday August 12, 2011 @07:58AM (#2876913)
+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 by sanderjd on Thursday August 11, 2011 @07:26PM (#2875288)
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.
Re:Rbenv, an unobtrusive rvm replacement by sciurus on Thursday August 11, 2011 @07:56PM (#2875358)
Re:Rbenv, an unobtrusive rvm replacement by alrs on Thursday August 11, 2011 @07:55PM (#2875354)
Re:Rbenv, an unobtrusive rvm replacement by damoncali on Thursday August 11, 2011 @06:23PM (#2875088)
Why not?
Re:Rbenv, an unobtrusive rvm replacement by alrs on Thursday August 11, 2011 @06:43PM (#2875144)
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

Re:Rbenv, an unobtrusive rvm replacement by kunley on Friday August 12, 2011 @11:46AM (#2877727)
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.

Re:Rbenv, an unobtrusive rvm replacement by damoncali on Thursday August 11, 2011 @07:13PM (#2875244)
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.

Re:Rbenv, an unobtrusive rvm replacement by sanderjd on Thursday August 11, 2011 @07:31PM (#2875303)
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.
Re:Rbenv, an unobtrusive rvm replacement by epochwolf on Thursday August 11, 2011 @07:44PM (#2875330)
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.
Re:Rbenv, an unobtrusive rvm replacement by nirvdrum on Friday August 12, 2011 @01:40PM (#2878280)
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.

Re:Rbenv, an unobtrusive rvm replacement by moe on Thursday August 11, 2011 @07:39PM (#2875321)
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.

Re:Rbenv, an unobtrusive rvm replacement by nona on Thursday August 11, 2011 @08:00PM (#2875368)
We do - nothing wrong with Debian stable's 1.8.7 and/or 1.9.2.
Re:Rbenv, an unobtrusive rvm replacement by alrs on Thursday August 11, 2011 @08:02PM (#2875372)
I do this for a living, and I've used Debian-packaged Ruby wherever I've gone. I haven't experienced issues.
Re:Rbenv, an unobtrusive rvm replacement by bonzoesc on Thursday August 11, 2011 @07:55PM (#2875356)
I use the Phusion-provided .debs for REE on Ubuntu.
Re:Rbenv, an unobtrusive rvm replacement by regularfry on Friday August 12, 2011 @12:22PM (#2877896)
Count us in. We only use packaged ruby, be that MRI or JRuby.
Re:Rbenv, an unobtrusive rvm replacement by PhilT on Friday August 12, 2011 @06:40AM (#2876738)
Why would you not use the same version you develop your code on every day for production?
Re:Rbenv, an unobtrusive rvm replacement by nzoschke on Thursday August 11, 2011 @06:59PM (#2875197)
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.

Re:Rbenv, an unobtrusive rvm replacement by PhilT on Friday August 12, 2011 @06:44AM (#2876750)
Just to contrast. I've never had any issues with RVM. Gemsets rock!
Re:Rbenv, an unobtrusive rvm replacement by hadis on Friday August 12, 2011 @10:16AM (#2877309)
Please provide us with some of the problems/confusions you ran into.
Re:Rbenv, an unobtrusive rvm replacement by dalyons on Tuesday August 16, 2011 @06:40PM (#2893196)
In 1v1 anecdotal contrast, I've never had any real issues with RVM.
Re:Rbenv, an unobtrusive rvm replacement by rsanheim on Thursday August 11, 2011 @06:43PM (#2875149)
In most cases you shouldn't have RVM in "production" any way.
Re:Rbenv, an unobtrusive rvm replacement by metaskills on Friday August 12, 2011 @09:54AM (#2877218)
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.
Re:Rbenv, an unobtrusive rvm replacement by Cloven on Friday August 12, 2011 @11:43AM (#2877717)
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.
Re:Rbenv, an unobtrusive rvm replacement by regularfry on Friday August 12, 2011 @12:23PM (#2877901)
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.
Re:Rbenv, an unobtrusive rvm replacement by PatrickTulskie on Friday August 12, 2011 @11:57AM (#2877775)
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.
Re:Rbenv, an unobtrusive rvm replacement by SoreGums on Saturday August 13, 2011 @10:08AM (#2880976)
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...

Re:Rbenv, an unobtrusive rvm replacement by nwjsmith on Thursday August 11, 2011 @05:40PM (#2874949)
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.

Re:Rbenv, an unobtrusive rvm replacement by stevenhaddox on Friday August 12, 2011 @10:23AM (#2877339)
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.
Re:Rbenv, an unobtrusive rvm replacement by igorgue on Thursday August 11, 2011 @08:49PM (#2875495)
Where can one by some "production ready"? ;-)