News for hackers. Stuff that matters.
Re:Rails is omakase by remi on Thursday December 27, 2012 @10:10AM (#4973530)
Re:Rails is omakase by javajosh on Thursday December 27, 2012 @11:56AM (#4973935)
Thanks. I'm not really a rails person, so forgive me if I have some questions. Am I correct in interpreting that thread as DHH not wanting to support multiple ruby package managers in the rails codebase? In particular, DHH has 'blessed' rbenv and that commit wants to support rvm?

If this is the case, then I have to wonder: why is there any dependency on a package manager at all in the rails codebase? This just seems odd to me, and perhaps is the source of the conflict. E.g. people are fine with 'omakase' frameworks, but these menus typically don't include toolchain dishes. It would be like going into a restaurant and being told that you must use chopsticks, no forks allowed.

Re:Rails is omakase by steveklabnik on Thursday December 27, 2012 @11:59AM (#4973955)
> In particular, DHH has 'blessed' rbenv and that commit wants to support rvm?

No. Two things are going on:

1. 'binstubs' will now be checked into source control. If I use MRI and you use JRuby, they'll start with different things, and therefore, cause conflict.

2. Many of the Ruby version switchers work with '#!/usr/bin/env ruby', but rbenv won't in certain circumstances, so an optimization for it has been built into the framework now.

David maintains that if I use MRI and you use JRuby, or if I use rvm and you use rbenv, this is an 'organizational failure.'

Re:Rails is omakase by sstephenson on Thursday December 27, 2012 @02:48PM (#4974712)
"Many of the Ruby version switchers work with '#!/usr/bin/env ruby', but rbenv won't in certain circumstances, so an optimization for it has been built into the framework now."

Incorrect. It is support for an enhancement that rbenv provides.

You often want to invoke an application binstub from another program such as cron, and you want to use the per-project Ruby version specified in the application's root directory. Other version managers require you to spawn a subshell and load the version manager into the shell or otherwise set up the per-project Ruby version environment, then `cd` into the application directory, and finally run the binstub.

rbenv requires an environment set-up step too—set `RBENV_DIR` to the application root—but provides a wrapper that eliminates the need for such gymnastics. When you change a binstub's shebang to `#!/usr/bin/env ruby-local-exec` rbenv automatically searches up the binstub's directory tree to find the right Ruby version.

Re:Rails is omakase by steveklabnik on Thursday December 27, 2012 @02:50PM (#4974721)
Thank you for clarifying the exact circumstances, Sam. I don't use rbenv, I was going by discussions on the ticket and in Campfire. I was referring to that difference in the binstub, but maybe should have been more clear that that's a conflict with the enhancement and not the base features of rbenv.
Re:Rails is omakase by mark_story on Thursday December 27, 2012 @06:37PM (#4975666)
If a team is using different versions/runtimes of ruby I would have to agree this is an organizational feature in some cases. If you're working on a webapp you should be aiming to make as few differences between a development box & production as possible. Its unlikely that you have jruby & mri in production, wherein lies the failure.
Re:Rails is omakase by steveklabnik on Thursday December 27, 2012 @07:58PM (#4975913)
Square is one example of a company which famously develops in MRI but deploys JRuby to production.
Re:Rails is omakase by mark_story on Thursday December 27, 2012 @08:45PM (#4976038)
That sounds crazy to me, but I have very little experience with ruby. In PHP/python doing that can be unpleasant.
Re:Rails is omakase by davedx on Thursday December 27, 2012 @10:59AM (#4973688)
And also the corresponding reaction on Twitter:

https://twitter.com/jon_lemmon/status/284075141967790080

Re:Rails is omakase by killahpriest on Thursday December 27, 2012 @11:22AM (#4973775)
@dhh: @jon_lemmon Why don’t you go ahead and fork rails so you can change the default gitignore file for new apps? You can call it Rails on Drama.

ROFL, DHH has cajones.

Re:Rails is omakase by killahpriest on Thursday December 27, 2012 @11:48AM (#4973893)
Apparently somebody has bigger cajones.

@sbartholomew: @dhh the the Rails community has it relatively easy: http://article.gmane.org/gmane.linux.kernel/1414106 … :-)

Re:Rails is omakase by efuquen on Thursday December 27, 2012 @01:46PM (#4974501)
It's funny, though the comparison isn't perfect, DHH is basically doing what Linus got infuriated about here. He's making a minor change for what seems like very little gain, meanwhile breaking third party projects that rely on Rails.
Re:Rails is omakase by nateberkopec on Thursday December 27, 2012 @08:30PM (#4975989)
A very imperfect comparison, as Linus is maintaining a kernel and DHH is maintaining (the next major version of) a highly opinionated web framework.
Re:Rails is omakase by fingerprinter on Thursday December 27, 2012 @03:56PM (#4974999)
Typical Linus.

Linus was right, though.

And DHH was wrong.

Not a fan of the way Linus handled that, though he sure did set the tone and expectations for everyone else!

Re:Rails is omakase by zem on Thursday December 27, 2012 @06:46PM (#4975695)
you know, while i don't talk to people like that (and especially not in public), i have considerable sympathy for linus's position there. it is clearly a deeply held philosophical belief of his that kernel changes should not break working userspace code, and here is someone who is evidently a long-standing kernel maintainer trying to blame a user app for breaking against a technically bad kernel patch.

i'm betting he made that mail public very deliberately, as a way of telling the world at large that as kernel dictator he would not tolerate his "staff" treating users like that.

Re:Rails is omakase by dkuntz2 on Friday December 28, 2012 @02:07AM (#4976827)
The mail is always public... It's part of the Linux kernel newsgroup...
Re:Rails is omakase by zem on Friday December 28, 2012 @04:07AM (#4977061)
he could always have sent that mail to Mauro privately and a toned-down version to the list.
Re:Rails is omakase by dkuntz2 on Friday December 28, 2012 @07:14PM (#4980317)
Doesn't that defeat the purpose of having a public list?

I think a big reason it's on the public list is because it should be. Linux is Linus' baby, he has every right to yell at someone for doing pretty much anything. And in this case, it was deserved. If you're going to break the first commandment of Linux development (don't break userspace), and blame the userspace for breaking, you should be reprimanded.

Re:Rails is omakase by outside1234 on Thursday December 27, 2012 @03:29PM (#4974908)
its amazing anyone commits to the kernel after seeing that. i sure the hell wouldn't.
Re:Rails is omakase by bad_user on Thursday December 27, 2012 @04:19PM (#4975089)
The Linux kernel is one of those top open-source projects, big, old, well oiled and with lots of contributions, both from companies and individuals.

So Linus must be doing something right.

Re:Rails is omakase by CamperBob2 on Thursday December 27, 2012 @07:32PM (#4975853)
It makes me less likely to want to commit code to the Linux kernel, but more likely to want to run it.
Re:Rails is omakase by amalag on Thursday December 27, 2012 @12:07PM (#4973989)
Lol, imagine the flames if DHH had that kind of personality. People are being molly-coddled by DHH for stupid stuff like a default in .gitignore.
Re:Rails is omakase by steveklabnik on Thursday December 27, 2012 @12:08PM (#4973996)
This 'stupid stuff' breaks every single new Rails app on Heroku that uses rbenv.
Re:Rails is omakase by erikpukinskis on Thursday December 27, 2012 @12:57PM (#4974262)
Exactly zero of the Rails apps on Heroku will break.

When you create a new app you'll need to remove a line from the autogenerated .gitignore in order to work the way you expect.

No?

Re:Rails is omakase by steveklabnik on Thursday December 27, 2012 @01:02PM (#4974285)
I am repeating what Heroku's Ruby platform lead said here: https://github.com/rails/rails/commit/61b91c4c55bcbd5a2ec85d...
Re:Rails is omakase by erikpukinskis on Thursday December 27, 2012 @01:06PM (#4974303)
You actually removed the word "new" from the middle of his sentence, which IMO changes the meaning substantially.
Re:Rails is omakase by steveklabnik on Thursday December 27, 2012 @01:16PM (#4974348)
It does, yes. This is my bad. I do not use rbenv, personally. Let's see if HN will let me edit it.
Re:Rails is omakase by memiux on Thursday December 27, 2012 @04:53PM (#4975239)
Mexican-beaner grammar nazi here, is "COJONES" not "CAJONES". xD
Re:Rails is omakase by mikesickler on Friday December 28, 2012 @12:58AM (#4976657)
That's a spelling issue, not a grammar issue :)
Re:Rails is omakase by narag on Friday December 28, 2012 @03:37AM (#4977001)
Re:Rails is omakase by pekk on Thursday December 27, 2012 @11:54AM (#4973927)
Does Rails not provide a way to customize the scaffolding used to make a new app, without forking?
Re:Rails is omakase by oelmekki on Thursday December 27, 2012 @01:42PM (#4974474)
Yes, you can using `rails new app_name -m template_name`.

But that would be way overkilled, here, because we just speak of adding a line to the .gitignore file.

If you don't know git, .gitignore is a file you're expected to edit, you put there anything you don't want to commit in the repository.

So, once again, all the trolling is about changing a default option. Which can be changed back with one line of four characters ("/bin"), in a configuration file. Change to be made only once in the whole life of your application.

Re:Rails is omakase by steveklabnik on Thursday December 27, 2012 @12:00PM (#4973961)
It does have some features to do this, but the point is that the default operation is simply broken for many, many people. That suggests that it should not be the default.