Browse files

Include CoffeeScript in Gemfile

  • Loading branch information...
1 parent 9333ca7 commit 9f09aeb8273177fc2d09ebdafcc76ee8eb56fe33 @josh josh committed Apr 13, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 railties/lib/rails/generators/app_base.rb
6 railties/lib/rails/generators/app_base.rb
@@ -134,15 +134,17 @@ def rails_gemfile_entry
gem 'arel', :git => 'git://'
gem 'rack', :git => 'git://'
gem 'sprockets', :git => "git://"
- gem 'json' # Sprockets dependency
akzhan Apr 16, 2011

yajl-ruby is more stable than json gem.

+ gem 'coffee-script'
+ gem 'json' # CoffeeScript and Sprockets dependency
elsif options.edge?
gem 'rails', :git => 'git://'
gem 'arel', :git => 'git://'
gem 'rack', :git => 'git://'
gem 'sprockets', :git => "git://"
- gem 'json' # Sprockets dependency
+ gem 'coffee-script'
+ gem 'json' # CoffeeScript and Sprockets dependency
exviva Apr 13, 2011

If json is a dependency, doesn't bundler handle it automatically when including coffee-script?

josh Apr 13, 2011 Ruby on Rails member

Slight complications. json is in 1.9 stdlib so not everyone needs it.

steveklabnik Apr 18, 2011 Ruby on Rails member

If that's the case, consider adding a :platforms => :ruby_18 on the end, maybe, to make sure that's explicit?

I guess it doesn't matter either way.


368 comments on commit 9f09aeb


Woh, that is awesome !


Nothing against CoffeeScript, but I do question making this a default. Seems the same as including SASS by default.

Both are useful, but I don't see them being used by the majority of Rails users.


Love it!


Whilst I don't have a problem with CoffeeScript. I really do not think it should be default. Same for SASS

Ruby on Rails member

This is going to be in your generated Gemfile only. It can still be swapped, removed or replaced as everyone is used to do when it comes to prototype/jquery.


How is this a reasonable default? This is not newb friendly, imo.


This is not a sane default by any stretch of the imagination. Just because 37signals built a webserver with coffeescript does not mean everyone wants it to be the default. There's something to be said for leading people in the right direction a la the switch to bundler, and it's another thing entirely to pick a ridiculous default that nobody uses. Thanks but no thanks.


This feels like it should be a really easy option via a switch on the command line (like picking your ORM etc), not something that should go into the 'it's default because we're opinionated' pile. Sorry!


Going to have to agree with the "no thanks" crowd. Including it as an option = yes, making it the default = no.


Haml seems like a much more logical default than coffeescript. Both are awesome, but why one and not the other?


Seems like commenting it out in the Gemfile might be the best of both worlds. Shows it is there and supported, but isn't the default.


Yea... please do not make this a default. Many do not care for CoffeeScript.


As much as I like CoffeeScript I'm not sure it should be a default. Haml maybe due to it's popularity though I've found myself switching to slim templates lately. Perhaps keep them as options.

Ruby on Rails member

This default can be turned off by commenting out the dependencies in the generated Gemfile.

But yes, I think it's an awesome default alongside SCSS for CSS. Together with Sprocket requires, this lifts JS/CSS handling in Rails to a whole new level. Very excited to have this as part of Rails.


+1 for coffeescript. its amazing and worth adding by default so people might get curious and explore using it:


@dhh newcomers have a hard enough time understanding javascript as it is, but introducing another layer of abstraction on top of it? I am disappoint. It's really not a reasonable default, whether you care for the syntax or not.




@dhh I see your vision in taking web apps to the next level with new things like CoffeeScript and more JS heavy front-ends. It is very cool, and creating conventions / showing people solutions is a great idea to get the masses producing modern web apps. But, in my case, I'm not sold on any given pattern yet, in my case I prefer a JSON API (in Rails) with backbone.js. Obviously this can still be done, but I'd still consider the pattern to be influx.


I'm -1 for default. CoffeeScript is a decoration, this is the choice of developpers to use it. Why the need to force them ?

Ruby on Rails member

draftycode, like all of Rails defaults they're easily turned off. The Rails default set is a curated list of technologies that the core group thinks is what most people should be using most of the time. Coffee and Sass fits this description perfectly.

(Also, I remember fondly the knee-jerk reactions we had when Rails went REST in Rails 1.2. Most people came around :))


+1 for making it an option, a strong -1 for making it a default!


this is such a huge newb play, common you guys. With CSS it actually makes sense, making a static language dynamic, great. JS is dynamic, JS is simple, dont make it more retarded




I welcome our new coffee-script overlords.


@visionmedia there is nothing retarded about coffeescript. it makes javascript much more pleasant. I use CoffeeScript with your JSpec library and it works as well as using the grammar mode:



Just because 37signals built a webserver with coffeescript does not mean everyone wants it to be the default. is a recent CoffeeScript project, but people have been using and evangelizing CoffeeScript for over a year (I think it started to gain traction in Jan 2010). At the RubyNation conference last month there were no less than two separate talks that evangelized CoffeeScript. It's also been popping up at ruby and other language user groups for a while now.

If you had your ear to the ground, you would've heard CoffeeScript coming long before was released.

a ridiculous default that nobody uses.

Here's a partial list of CoffeeScript being used in the wild.


-1 for this change.
I strongly feel that a lot of people promote CoffeScript for the wrong reasons (as much as i've seen). Those reasons mainly being inexperienced in JavaScript, and only feeling comfortable with Ruby, thus using a layer of abstraction on top of JS to handle it at all.
While I do understand some uses for it, I do not agree that it should be something encouraged to be used by newcomers. JS in itself is too powerful of a language (both in terms what you can do with it and what you can learn about programming concepts in general by using it) to "protect" people from it or encourage hiding it behind abstraction layers.


Way to make creating a new Rails app more of a pain in the ass than it should be. I'm all for adding support for a param to rails new that generates an appropriate Gemfile for those who want to use CoffeeScript. Making it the default is a little ridiculous IMHO.


@perfectline I agree.

Coffeescript is a toy, it is nothing more than an aggregation of features from a few languages, and in fact complicates an extremely simplistic language. If I wrote a layer on top of Ruby, took out the end keywords etc, it would be a huuuuuugely newbish thing to do, however it seems that this is "the thing to do" with JavaScript. So lame


I think it's absolutely fantastic that Rails is starting to change the defaults. The original defaults from 2004/2005 served us well, but it's time to make a transition that keeps up with the changes in surrounding communities.

CoffeeScript is a pleasure to work with, and once you dive in, you'll never want to write direct JavaScript again. Everything @coderifous said is spot on too.

@perfectline You should come see my talk at Red Dirt RubyConf. I'd love to debate some of your claims with you.

For most of the naysayers, it's evident most of you haven't actually tried CoffeeScript or are afraid of learning something new. Get over it, no one is forcing .coffee files on you, but I will say that if you don't pick it up soon, you'll likely be left behind.

@dpickett is not a question of syntax preference. It's an abstraction that adds no value to the underlying scripting language. It's not worth having the argument of whether it's nice or not (which is entirely subjective) obscures without adding value and therefore is an unreasonable default.


@nestlequ1k it's not appropriate for real software. Try this with C, and take a look at how many people will laugh at you. Frankly I don't us Rails anyway, but I thought it was funny that you guys cant/dont just write regular js


It's both a good and a bad idea. The syntax is clear, concise, and must ruby-like but it adds too much complex abstraction logic for beginners IMHO.


Oops, i guess i forgot to switch accounts and commented under @perfectline

@rmm5t While I would love to attend and discuss this, sadly I'm a bit too far away for that :)
But as for your last argument - I have worked with CoffeScript, and I have also talked to several people who have hyped it and used it. So i've "done my research" so to speak. I also have done a lot of in-depth development with JavaScript and I still feel that CS is something thats not needed, if you are competent with JS. Moreover, I would say most of the people who I have met, and who hype CS, also hate JavaScript, are not familiar with it beyond simple event bindings etc. So I guess this is a bit of a two-way street.

All things said, I strongly feel that being exposed to, and mastering different languages (and especially different concepts and paradigms), will make you a better developer. Sitting in your own "comfort zone" of language X, and trying to force/abstract everything under it, so you would still be in your comfort zone, seems something I would definitely encourage, especially with beginners.


+1 optional -1 default


I don't agree...

HAML, SASS, CoffeScript are awesome projects but I think we don't need this as default.

What about passenger and rspec?

Are all useful projects but should not come with rails by default.


It's just laughable, I would never hire someone who wrote coffeescript, that's like hiring someone for client-side js that knows jQuery but nothing about the DOM


+1 for this. Coffeescript is awesome, and I'd love for it to have more widespread adoption.

Ruby on Rails member

What is the problem?, you can continue using regular Javascript files if you don't like Coffeescript.

The coffeescript gem is included by default but use it is an option.


While @visionmedia might be agressive and a bit bashy in his arguments, he does have points.
We are not talking about if CoffeScript should be used at all, we are talking about if it should, and is, a reasonable default in Rails.


-1. CoffeeScript is cute but is just one extra layer on top of javascript. Should be supported, obviously, but I don't think it should be the default. Not that it will be to hard to get rid of it... but it's a bit strange to see it there as the default. But I've spent quite some time ditching prototype and putting jquery in. So I'm kind of used to it...

It's just that CoffeeScript it's not my cup of tea...


I understand that rails isn't being made just for beginners, but adding more syntax will only make it difficult for new comers. IMO, this should be an option but not a default. I would say the same for sass.


This is a silly decision that does not represent the majority of the rails community. Official plugin? Absolutely. Core? No fucking way.

Ruby on Rails member

There is another option: Generating the coffee script require in the default gemfile, but having it commented out by default. I would prefer this frankly as I think it's more newbie-friendly, while giving them a hint that there's something out there to learn about. But I don't think it's a huge deal, haterz gonna hate :)



I would never hire someone who wrote coffeescript

Good call. That way you don't end up working with the kind of schleps that lousy company's like 37signals, Ars Technica, etc, employ.


default != requirement

Get rid of the line on your Gemfile and move on with your life


@coderifous and I'd much rather not, I have an awesome job, and an awesome team of people who actually know how to write javascript


+1 for default :)


Let's all try to avoid feeding the trolls, please?


I'm surprised this is a default, but as a fan of Coffeescript, it's cool. It's optional, so it's interesting to see the freak outs by so many folks - there's nothing forcing you to use Coffeescript, you can keep writing JS just fine. I like that Rails has continued to be "opinionated software", and that they're pushing things forward, and making their opinionated choice on how to improve things.

As for the statements that Coffeescript is only for newbs, or people who don't get JS and so on, I think that's unfair. In fact, I think it's key to know JS quite well when using Coffeescript (you still have to know JS, it's only a thin alternate syntax on JS). But, that said, Coffeescript is simply a more pleasant way to write JavaScript. We're using it in our Rails app, and our iPhone app is 99% Coffeescript as well (1% JavaScript). It's a pleasure to code in.


@coderifous Who's already using CoffeeScript in production code is irrelevant, this is about having sensible defaults. This isn't a sensible default. I'm absolutely in favor of core support for CoffeeScript + generators, I think it's bad idea to make it the default.


@dabit, how many newcomers to Rails edit their Gemfile without being explicitly told in a tutorial or a book? Seriously? Leave it commented or make it a generator option, whatever, as long as it's not a default.

@visionmedia, I respect you dude, but you need to lay off Coffeescript hate.


I think @dpickett sums the issue up nicely in his comment.


+1 for scss
+1 for coffeescript
+1 for jquery
+1 for default

Good job core team. Lead us forward.


"It's an abstraction that adds no value to the underlying scripting language"

It's blatantly obvious when people hate on CoffeeScript without actually having tried using it within a competent team of professionals.

Whilst you bicker amongst yourselves about where to put the semi-colons and braces and which library you should use for collection iteration we'll gladly have some fun actually doing some hacking.


@batasrki they are right this is not the place to discuss it lol so I apologize for that. I think it unnecessarily splits an otherwise strong community, among other reasons for disliking it, but yeah, blog post maybe? haha I'll shut up in here


+1 for scss +1 for coffeescript +1 for jquery +1 for default

Good job core team. Lead us forward [2]


I have no opinion on this but I love the nerd drama.

RJS templates - pain in the ass. Inline prototype remote helpers? Get up all in my grill. This, though, won't ruin anyone's day.

Can someone explain to me how this is going to force anybody to use coffeescript, and thus why anyone should really be worked up about it?


Agree with @visionmedia this is a ridiculous default. This should be voted on by the community.
@batasrki he is entitled to his own opinion and can say whatever he wants. Who are you anyways..? What's next? Are you going to tell him he can't believe in a different religion then you?


@visionmedia, I do agree with you, but I also see coffeescript as a cool demonstration of what JS could be. On top of it, people do find it useful. Blog post would be great, definitively.

@mephux, firstly, I don't think this should be a default either, as can be read in my note. Be careful while judging. Secondly, as @visionmedia himself noted, this isn't the place for it.


Just got a hint that @josevalim is going turn these comments off! Quick, everyone — bash NAO! (no, he isn't)

Also, good change. Promoting great technologies while providing an extremely easy opt-out is the way to go. @dhh was spot on with the REST example and that was much different than this change since developers can just ignore CoffeeScript and SASS and just code the way they want without having to change anything.

Ruby on Rails member


I'm excited to see this is a default, and sass as well. Now if we could just get some haml, I'd be using the default Rails stack again...


So if it's so easy to turn off (i.e not really needed), and it adds no real extra value, why should it be the default? :)


What @JustinCampbell said. Why this over something like haml?


@batasrki Firstly, I didn't say you did disagreed, as can be read in my note. Secondly. i'll judge when I want and who I want. You be careful.


It's not appropriate for real software. Try this with C, and take a look at how many people will laugh at you.

@visionmedia Are you kidding? Are you aware of the history with C++ and Objective-C? Not to mention, practically every interpreted language has its underpinnings in C; hence, an abstraction on top of C.



Who's already using CoffeeScript in production code is irrelevant

I pointed out that list in context of someone saying that CoffeeScript was something that "nobody uses." I agree it's beside the point of whether CoffeeScript should be the default in Rails going forward.

I think it's bad idea to make it the default.



@rmm5t C++ / Objective-C are real languages... not source to source


@coderifous Why? Well, Because it's a mask on an already simple / straight forward language. Do you remember RJS? Not to imply they are the same however, a generation of rails developers learned an abstraction and didn't even know how to write one line of javascript. Its pointless and has to compile - its hacked together if you read the internals.. SASS and HAML and ever worse. I could never do as good of a job but, why would I want to?



re: nobody uses, fair enough — my bad.

re: Why?, Call me a minimalist but I'd rather have to explicitly tell rails new what I want to use in a project for persistence, templating, testing frameworks, etc., rather than have a default. The only exception might be testing as it's a core philosophy of Rails.

FWIW, I don't doubt CoffeeScript's supporters' claims that it's a joy to use. I'd just personally prefer keeping the core framework lighter with fewer defaults that I'll only have to undo when I forget to --skip it.


@visionmedia Objective C and C++ were originally implemented as preprocessors that compiled directly to C. Nowadays they have their own compilers and toolchains, but things didn't start out that way.


C++ / Objective-C are real languages... not source to source

@visionmedia Objective-C started as a preprocessor to C. Many languages compile to intermediate representation before hitting the metal. Is assembly not source? Is {Java,Ruby,Python,.NET} byte-code not source? I just think your definition of a "real" language being only those that compile directly to machine code is flawed.


@pyrotechnick I think you missed the point...


@visionmedia By your argument, we should all just go back to writing machine code. Why not think of the JS engine as a VM?



"Don't use machine code; use an abstraction that produces machine code."

Notice something wrong with your logic?


This entire conversation is pathetic. A single line update, a recommended default, something that Rails has been doing SINCE RELEASE (Prototype, jQuery, REST, etc). If you don't want to use CoffeeScript, don't use it!

It's no wonder outsiders look at the Ruby / Rails community and laugh. Makes me want to rewrite everything in Django and just say to hell with all this.

@visionmedia why do you say C++ is a "real language"? It's just an abstraction on top of assembler / machine code. I see you write a lot of Javascript, and at a glance I don't see a lick of assembler, Kind of negates your entire argument.


@pyrotechnick not really.. You must be fresh out of arguments/logic if you compair assembly to javascript.


Duplicate Comment - Removed By Author


@rmm5t / @josiahivey I'm not arguing about high level programming languages in general. I'm speaking for interpreted languages, I don't think it's overly useful at all to require compilation for an already dynamic language, just to give it a bit of "sugar" which anyone with basic knowledge of lemon/re2c could write in a week



I'd rather have to explicitly tell rails new what I want to use in a project for persistence, templating, testing frameworks, etc., rather than have a default.

That's essentially the antithesis to the Rails philosophy. One of the things Rails got right from the beginning was "convention over configuration", with defaults that were informed by opinions. Those defaults have always been override-able.

FWIW, I don't doubt CoffeeScript's supporters' claims that it's a joy to use.

It really is a joy - give it a shot next time you get a chance. :)


Until the Rails Core team starts showing up at people's offices and forcing them to add .coffee to their javascript filenames I don't see a whole lot of reason to freak out


@coderifous I didn't really articulate my opinion clearly, but suffice to say that I think padrinorb does it right:

With no configuration options I get a basic padrino app. I have support for other components out of the box but my desire to use any of them isn't assumed.

To your point, "with defaults that were informed by opinions", I'd take the less than enthusiastic reception of this change (depending on who you ask) as a signal that it should be reconsidered, wouldn't you?


@misfo and not even that. This isn't a retroactive change. This won't break old rails applications or change how they use JavaScript/CoffeeScript because it's only in the Gemfile for new applications.


@visionmedia: In my opinion, it isn't about how hard it was to write the compiler - would you say that a server written in assembler has more value than one written in C++ or so just because there's more work in it? Would you say that programs written in JS don't have as much value as ones written in C just because they weren't as hard to write?

Yaay, assembler is the 🆒est language ever!</ironic>

Btw: More rants and 🔥wars, please!


Language abstractions are a good thing. Without them, we wouldn't have so many high level languages that we can choose from. Other than that, I think it makes perfect sense to introduce a new default if it makes easier to accomplish tasks. And remember that old javascript will work just fine, newbies can just ignore the line in the gemfile or learn about later. I don't really buy the argument that real javascript coders code in javascript, I would rather use something more elegant in which I am more productive.


This is just getting good. +1 from me, @pyrotechnick lol @ the rage comic. as @steveklabnik said haml +sass would be excellent.


I really like the attitude of changing the defaults. This is scary at first for me but I'm willing to keep this default for now until it proves to be a problem


@mephux: Don't use SQL, use an abstraction that produces SQL!
Don't write HTML, use an abstraction that writes HTML!
Don't talk to a webserver, use an abstraction that talks to a webserver!


@jyurek Calm down there buddy, you're going to put an eye out with those exclamation marks. We need to stop producing language abstractions for shits and giggles. Also, you may want to look up the definition of abstraction. abstraction is the process or result of generalization by reducing the information content of a concept or an observable phenomenon, typically to retain only information which is relevant for a particular purpose. ... My argument is that coffeescript, SASS and HAML do not accomplish this and should not be labeled best practice or default.


Awesome! I like this default.

It will probably clean up quite a bit of "bad parts" JavaScript. It seems to me CoffeeScript generate better JS than... 90% of devs. The latter 10% of whom actually write proper JS can always just... enable it.


@oc said:
`Awesome! I like this default.

It will probably clean up quite a bit of "bad parts" JavaScript. It seems to me CoffeeScript generate better JS than... 90% of devs. The latter 10% of whom actually write proper JS can always just... enable it.`

@oc you can thank your buddy @jyurek... lol You see what i'm talking about now... This is what all your worthless language masks will produce. @oc you realize you still have to write proper coffeescript right?

javascript { write_my_application! }



and I'd much rather not, I have an awesome job, and an awesome team of people who actually know how to write javascript

I find it ironic that the same guy who does not like coffeescript because he likes working with people who "know how to write javascript" and because it's a "toy language" is the author the stylus css library: Apparently, some all-knowing masters of the universe collective of C programmers would "laugh at us" for using a "toy language" like coffeescript because it makes javascript more elegant and adds "features from a few languages", but they wouldn't laugh at us for using stylus? Stylus is a library, which, among other things, makes CSS more elegant and adds a few features. If my assumption is correct, then, you know, that makes TONS of sense.


@ajsharp css and js are quite different ... pretty sure you can figure that one out


@visionmedia try not to backpedal so fast, you might hurt yourself ;)


@visionmedia: please enlighten me: in which relevant aspect are they different?


@visionmedia if there is a non-required abstraction layer provided for you to make it easier to write either JS or CSS, what problem do you have with that? You clearly support the use of an abstraction layer for writing CSS, I don't see how your argument of how they are just "different" makes it any worse that you seem like a hypocrite for raging within this thread for a language you don't even use, neither Rails or CoffeeScript.


@thejh css is static lol hence sass/scss/stylus to at least provide the ability to become dynamic, js has no such problem


@visionmedia so the purpose of stylus is to reduce superfluous repetitions of code, right? and coffee reduces superfluous parts of the syntax and repetitions of common patterns like for (var i=0; i<array.length; i++) { var element = array[i].


@mephux I'm obviously putting it to the point. (However; I stand by that writing proper JS is way harder to most than writing proper coffee-script - that generates proper JS).

(I'll probably write JS whenever I have to. Just like I sometimes find SQL a way better DSL for talking to databases. Doesn't mean either should be the Rails-default.)


@visionmedia it's sad that you even had to explain that. It only proves that language masks are harmful. If people actually stopped being lazy and just learned javascript they would fall in love. HAML, SASS and Coffeescript were all developed by people who deeply understood the language they intended to mask. It's very likely it was a fun side project they started that others started to adopt (it's more familiar to me). These people will turn into the php developers of tomorrow.. scared to learn and scared to change.


@thejh +1. @visionmedia you're right in that js obviously doesn't have the problems css has, but it does have it's fair share of problems nonetheless. Crockford's "The good parts" synthesizes some of the more obvious stuff well IMHO, and I think coffeescript attempts to solve some of js' problems. Still, many of my gripes with js (and reasons I like coffeescript) are purely syntactical, such as semi-colons and var declarations -- some of the same functionality stylus provides. These features of coffeescript are big, yet easy wins.


@thejh +1. @visionmedia you're right in that js obviously doesn't have the problems css has, but it does have it's fair share of problems nonetheless. Crockford's "The good parts" synthesizes some of the more obvious stuff well IMHO, and I think coffeescript attempts to solve some of js' problems. Still, many of my gripes with js (and reasons I like coffeescript) are purely syntactical, such as semi-colons and var declarations -- some of the same functionality stylus provides. These features of coffeescript are big, yet easy wins.


@ajsharp personally I think the lack of var is a terrible thing, I love when I can look at a chunk of code, and tell exactly where the declarations are. This was one of the reasons I left ruby, I could not stand the ambiguity. Not to mention if you actually type "function", or loops etc.. probably best to get some snippets going


@mephux: So we all should go back to writing binaries with hex editors, right? Because it's so pure and unmasked.

I believe that a warrior who lived a few hundred years ago would be able to handle guns better than we do, but that isn't a reason for todays armys to go back to using swords, right?


@mephux yeah I agree to some degree. If people who understand js well choose CS, then sure, but it will certainly breed a group of misunderstood people. I for one absolutely love JavaScript although it does have some issues, but none of those are fixed by CS


die-hard designers would probably rage over SASS/LESS/Stylus as well, however css does have the fundamental issue of not being dynamic, so I think that is a different argument


@visionmedia I see your point here. No doubt about it, no var definitely leads to more ambiguity surrounding variable scope. Still, I've never had a big problem with it in ruby, unless the method is hosed to begin with (usually too long, doing too much, etc). At that point, variable scope ambiguity is the usually not the most important problem to solve, but is still a problem nonetheless.

I see where this would be a much bigger problem in js, as the language systax and conventions tends to be written much more closure-ish, with many nested functions, making variable scope often difficult to determine. I trust your judgement on this one, as you've written considerably more js code than I have ;)


CoffeeScript is cool, but I don't understand: why CoffeeScript and not HAML? Rails is a web framework; if there's the need to abstract, the first language which must be abstracted is HTML!

                                  Rails Languages Assistants Inclusions Hypothesis

                                          (1)                            (2)

Highest Abstraction Priority              HTML                        JavaScript
Lowest Abstraction Priority             CSS JavaScript

(1) is rational, maybe rash... but everything in Rails is rash.

(2) is nonsense!


@thejh CoffeeScript is a 1:1 mapping of a custom syntax to JavaScript, you are not abstracting anything away. However with C or C++, you can write minimal code that expands to very complex Assembly, this is Abstraction.

CoffeeScript does not have an RFC or represent a solid standard; nor is HAML or SASS. I'm a bit worried we are ignoring supported and standardized languages, for a little syntactic sugar.

Furthermore, I think we've been over this before with RJS.


@postmodern could not agree more, great points.


My take on this: having Sass as a default is great. You could completely ignore Sass and just write CSS and name your files with .scss extensions to make Rails happy. You can make a Rails app, not touch any defaults, write CSS, and it still works. Then, optionally, you can leverage Sass features for more awesomeness. If I have to edit the Gemfile of a fresh, default app in order to be able to use the languages that are the lingua franca of web (HTML, CSS, Javascript), I see that as bad defaults.


@enricob yeah exactly, if coffeescript extended js (which would be way cooler) it would make more sense



Guys, the point has been made, now get back to doing something productive, like browsing reddit.


@postmodern "Abstraction" in figurative sense... more correctly, we can agree HAML, SASS and CoffeeScript are "syntactic sugars" respectively for HTML, SASS and CoffeeScript...

...and this is incorrect, too: HAML is a syntactic sugar for ERB, and SASS, in addition too this, extends CSS properties with variables declariations and mixins...

...but IHMO this is not the point. IHMO the point is:

should the development of a "standard" Rails web application be done using CoffeeScript?
if yes, is the reason of this a sort of concision and organization improvement over web standard languages ?
if yes, why not HAML and SASS?


+1 for scss +1 for coffeescript +1 for jquery +1 for default


@mephux It's funny that you post an image to make fun of coffeescript but if I say the same things about libs you already use I need to calm down. Anyway, AR/ERb/Haml/Ares/Arel/Rack/HTTP::Request/etc are just as much of an abstraction. But I'll just let you rail on here like it'll make a difference.



No, just kidding.

Fuck the haters.


+1 for this change, CoffeeScript is really nice, and this change can make lots of people that doesn't know it to start knowing


@radar We're trying to have a discussion here.

@jyurek See previous comment about how CoffeeScript is not an Abstraction, it's a syntactic sugar with a 1:1 mapping down to JS.


While were discussing HAML, what do people think of Slim?


+1 for making CoffeeScript a default gem. Hadn't looked at it for a while, but jashkenas is a genius!


Funny how people think newbies will have more trouble finding where to turn off CoffeeScript than where to put *.js files.


@postmodern: you make me giggle like school girl


This is great! I didn't even know coffeescript existed! It looks exactly like what I wish I could do every time I write javascript.

The nerdrage in this comment thread is a little over the top guys. It's not OMG ADDED TO CORE, it's a line in the Gemfile you can comment out. Settle your asses down.


How about some kind of online vote pool for decide this ?
+1 for Jquery +1 for haml +1 for sass...
sorry CoffeeScript I've never heard about you before...

Ruby on Rails member

+1 for scss +1 for coffeescript +1 for jquery +1 for default

Good job core team. Lead us forward [3]


what @rmoriz said


%w(haml sass jquery coffeescript).each { |v| } would be a cute idea. Maybe an unofficial-purely-statistical initiative?


The reason I haven't gotten into CoffeeScript yet is because you still have to debug the JavaScript output. For those who have experience, how easy is it to write in CoffeeScript, but debug in JavaScript?


This is what rails application templates are for. If you have a preference outside of the defaults provided by Rails ( e.g. rspec over test unit ).


Nice Core Team!

For the ones complaining about another abstraction layer, don't you guys use activerecord?


@alextakitani See previous comment about the difference between Abstraction vs. syntactic sugar.


@kenearley not that difficultt, it's relatively easy to see which coffeescript was responsible for which javascript.


Enough said, that is the reason rails ROCKS!


@kenearley in general its not so hard, but I really recomend you to have a good test suite anyway ;)


I just had to do this ;-)



I went here: - Looks gorgeous. Javascript has needed this kind of help for a long time. The native syntax is ridiculous.


@jonleighton said what I wanted to say much better, although I’d add an additional explanation of what it actually does.


+1 for this change. Wish they made HAML default too.


@postmodern, didn't know about Slim. Seems like a cool replacement for HAML, trying it out now. :)


IMO: CoffeeScript is like 50% on the way to a much needed 100% overhaul of Javascript :) Hold off a bit longer on this change and let CoffeeScript really push the limits first :)


+1 even with my hesitations, it's optional and CoffeeScript is wonderful in that it does a great job exposing the true and wonderful JS we all missed for 10+ years. I'd say it even made me a better JS programmer.


+1 for slim here

slim > haml


Holy shit guys. As @josevalim said, it's just going in your Gemfile by default and you can easily remove it. No one's forcing anyone to use coffee.

But, even if it were made a hard dependency of Rails, which no one is even suggesting, coffeescript just compiles *.coffee to *.js. Coffee users already do this—an app's coffeescript is compiled down to js, where it runs alongside jquery.js and friends.

For anyone still concerned:

Instructions for not using coffeescript
1) Write .js files, like you were doing before*

* Be sure not to write coffeescript in .coffee files if you don't want
  to use coffeescript. By doing so, you will be using coffeescript.
  Instead you should only write javascript in .js files.

Hi Ben :)


Who would have thought that Rails would be opinionated and embrace defaults that everyone doesn't agree with? You've jumped the shark, Rails.


+1 for Coffee


@visionmedia stop trollin'


just keep the jquery default, the CoffeeScript and Sass as Opetional.


I personally am outraged that all of the things I have to spend time setting up for every Rails app are going to be the default. That's like, an hour I can't bill clients for anymore.

If you really want to make me broke, you'll make Haml and Rspec the defaults too.


Wow, so it's come to "completely ridiculous" javascript syntax that "needs a 100% overhaul" now. Really?


Hum, but, coffee-script, needs node.js to run, which is kinda a big dependency, could it be made to run in pure ruby ?


From what I've read, it does not require node.js to compile. Only the command-line tool needs node.js.


@mat813 It uses ExecJS which uses a bunch of different js engines to run. But, that's beside the point - This doesn't prevent rails from running; It's something you can choose to use (even if rails does ship with it), vs. being forced to use coffee-script on your application.


Meh. I don't ever use the defaults; I generate new apps with a template anyway, and I'll just exclude those in my templates.

I do feel sorry for students and new web devs who learn Coffeescript, thinking it's how you write web apps though. First they'll likely have a hell of a time debugging it; it'll be like debugging heavily optimized C at the assembly level. It's also a little sad because it means when I interview developers and they start using coffee macros (which is essentially what they are) I'm going to have to ask them to show me that they know standard Javascript, in the same way as asking people not to use Collection classes or the stl when showing they understand algorithms.

Essentially this default is of zero importance to anyone experienced, but it's going to lead a lot of inexperienced devs down a bad path that they're going to have to work harder to come back from.

But hey...I got mine, Jack. Have fun!

p.s. Toasting in an epic bread...


But, hum, coffee-script is written in javascript, so, how can it generate .js from .coffee files without having a javascript compiler like node.js installed (and, don't tell me that we send everything to the browser and let it deal with the whole thing)


@mat183 Did you look at ExecJS? It does need an interpreter, just not Node - for example, for developers on OSX, it uses the jsc binary that ships with osx. On windows it also uses the JScript host which I believe (but am not 100% sure) works out of the box. Along the same lines, you'll also only need it if you use coffee-script (E.g. you can still use plain old javascript files as before, this wont prevent that).


@Sutto yes, I did, but I do my dev on a freebsd box (and the hosting too), and I don't have a javascript interpreter at the ready :-)
What I mean is that it adds another dependency to the lot and I'll have to remember to install one javascript interpreter on the production box so that it can serve javascripts. No ?


@mat813 Only if you choose to use coffee-script in your application (just having the gem in the gemfile doesn't require an interpreter afaik, only compiling coffee scripts to js does).


Commit Coffeescript and Carry On.

Ok, jokes aside:

I agree that making it the default is going to skew development in one direction; the culture can end up building around them (like Rails' activerecord over, say, datamapper). It's neat that such a useful tool is being effectively "blessed" by DHH / Rails, but I fear for the first wave of web developer newbies (trying to follow the resulting rushed web developer newbie tutorials) who are going to have difficulty picking up CoffeeScript at the same time they're also trying to learn Ruby, Rails, HTML/CSS and Javascript.


I use coffeescript entirely for a new project, it's great but I still don't think it should be a default in rails.

the project need maturing, and greater ORGANIC adoption


it's my first time to use coffeescript, im a newbie and i dont like javascript to be honest because of its ")(@^#@)*(^#)!@#^" syntax but coffeescript is just as awesome as ruby syntax :) i know how to code in javascript but im not happy to code with those syntax errr

in short RAILS rocks! get lost haters. its very ironic seeing someone who left ruby but he still continue to argue with ruby/rails community, doesnt make sense at all LOL


you did it for teh lulz?


if only for the lulzy nerdrage in comments here, it was worth it. kudos, dhh, for this decision!
even if it gets reverted, it won't take back the amount of butthurt in the comments above. delicious!

bonus points a year from now, when half of nerds writing "omg dhh you bastard" above start evangelizing coffeescript. I'm bookmarking this commit, guys. Internet will remember ;)


Ryan Norbauer, June 2006

What so many people seem to be missing here [...] is that the achievements of Rails aren’t primarily technical; they are aesthetic.

DHH rightly calls Rails opinionated software. DHH understands that the key to productivity as a programmer is happiness. Rails imposes
well-thought-out conventions in order to create a framework that is simple and that results in beautiful code and elegant solutions.

Both CoffeeScript & Sass are a perfect fit for Rails. With Rails you adapt your programming to the framework, not the other way around; we all subscribe to and accept this when adopting Rails (and if you didn't know this prior to adopting Rails, you should have done your homework)


I'm already using HAML + SASS + CoffeeScript (through barista) - no way I'm going to return to old dusty HTML, CSS or JS

class Hater
  hate: (arguments...) ->
    ignore argument for argument in arguments

Rails is more than web framework, this is culture and way that you thinking . And SASS and CoffeeScript are piece of this culture, so they MUST BE part of Rails. If you don't like it - just disable them .


haters gonna hate :D


Everyone is just getting all butt hurt over change!


It's worth noting that the folks against this change aren't 'haters' or 'butt hurt', they generally love Rails. They disagree with a direction they see it going, and are expressing that, in a genuine effort to help improve Rails.

It's okay to love something and disagree with it at the same time.

It's also okay and expected for a project to override the wishes of a vocal contingent of its users; it's not intended to be a democracy. But that doesn't stop folks who care a lot from agitating for their side. It's not correct to dismiss them as 'haters' or afraid of change. Think 'loyal opposition', instead.


i don't really care, but mb u should add coffeescript later.. it is still not so nice


@cyberfox I'd be curious to see how many of those disagreeing with the direction the core team are taking Rails have actually ever made any sort of worthwhile contribution to the project (bug fixes, patches etc).

You have to remember that the core team aren't here to service the community, they are here to further develop a framework they all love and take it in a direction they see as progress.

Therefore, if you really have a beef with this, rather than airing your nerdrage on a Github commit message why not be productive and fork the source, commit a few patches, issue a pull request and put in the work to get promoted to the core team where your opinion will actually mean something. If you're not up for that then you either have to like it or lump it; This is the only genuine way to help improve Rails


@micpringle I totally agree with @cyberfox : why do not take these comments as a simple comparison between some developers' opinions, and not an attempt to subvert the laws that rule this universe? smile and stay happy!


@ProGNOMmers Because it's not productive and it's not doing anyone any favours.


@micpringle I'm not sure if the 2nd and 3rd paragraphs are directed at @cyberfox, but since you seem to be talking to him I will assume this is the case. (If I’m wrong, then please ignore this paragraph.) @cyberfox’s comment is one of the few ones that makes sense and isn't loaded with emotional statements (I mean ‘butthurt’, that's just sad). The majority of your comment about working on OSS stuff is spot on, but I find it unfortunate that you then end up dismissing his comment as ‘nerdrage’. What exactly is the rage in his comment?

Also, I'm one of those people that has contributed to Rails and have the opinion that requiring these dependencies by default is not the best choice for newbies. I have absolutely no problem with the suggestion to use these tools if you find yourself needing such tools. See @jonleighton’s comment. (Please don't tell me I can easily remove it from the Gemfile, because then you have totally missed the point, it's not about me or other seasoned Rails devs.).

Will it make me use Rails any less? Nope. Because emptying the Gemfile is the first thing I would do anyways, so this is not meant as Rails hating.


@micpringle For my it is being productive: reading points of view of people more skilled than me make me a better programmer, and I discovered slim , thanks to @postmodern comment.


With HAML installed, I can still use erb by simply using the .erb extension on my templates. Now correct me if I am wrong, but wouldn't you be able to use vanilla JS by just using a .js extension instead of .coffee?

If thats the case, and considering how little JS is ever really generated in rails, then this whole argument is just a bandwagon for bored people to jump on.


@alloy Only the first paragraph was directed at @cyberfox, perhaps I should have made that a bit clearer :D

I still feel you are missing the point though in that the core team have absolutely no motivation to put the community, or newbies first. Rails has always been and will always be (as far as I'm aware) a highly opinionated framework. This means that as long as the guys working on it agree a new feature or dependency should go in, it will go in, with a total disregard (for the most part) of what that outside community may think.

For another example, see DHH's recent debate about whether or not RSpec should be the default testing suite.


@ProGNOMmers I meant in the context of making a genuine effort to improve Rails (Slim does rock!)


@micpringle Ok, please ignore the first paragraph then :)

No I didn’t miss that point, I think they should definitely do what they want and need. The only reason I’m commenting here about it (instead of only my own personal twitter thought stream) is because of all the hating vs eachother, even if some people are just making imo valid suggestions. Nobody making those kind of suggestions feels that the Rails-core team should listen to them, just that they can. Or at least that’s how I’ve read @jonleighton’s comment and that’s how I meant mine. And let's be honest, that’s a part of what this whole comment section on github is about :)


@micpringle The recent RSpec vs test-unit discussion is exactly why I have this opinion, because I thought that was about making the process of getting newbies working with Rails as painless as possible instead of overwhelming them with too many new tools. If, however, that's not the motivation and it's, like David said yesterday, simply what he/37signals uses, then by all means. Again, I don’t care about it for myself, I’ll just strip it from the Gemfile :)


@alloy Suppose I can't argue with that, and I also think @jonleighton has a good idea, it is after all how I discovered Unicorn :D I was actually trying hard not to get drawn into this, but it spilt over to my Twitter account (I follow a few of the core) and I got sucked in.

The main point I was trying to make is that it would be more useful to put yourself in a position to have your opinion mean something, rather than air your discontent on a Github commit message but then do nothing about it. Rails has always had a core set of values that we (maybe begrudgingly) adopt when we start developing with it; it's no use trying to now argue against those some years down the line.


@micpringle I think we can conclude that we both agree that ‘bitching to get something changed’ is not the way to do OSS right. So comments about whether or not you like something or you hate it, and by extension whether or not those people are wrong or right, are meaningless and just add noise. It’s this noise that makes a healthy discussion impossible, which is what the comment section (I assume) is for. And by healthy I mean that the outcome does not have to be what I personally feel is the right thing to do, c’est la vie :)


@alloy Couldn't have put it better myself :D



HAML is like an abstraction, except you still have to know HTML, you still have to think about the HTML it's generating, and instead of just writing the HTML, you have to figure out how to write the HAML that will generate the HTML that you need to have in your head anyway.

HAML is like eating soup by holding your spoon with chopsticks.

Oh, and it's really hard to hire a good designer who also knows HAML.

-1 for HAML and any other abstraction that isn't really an abstraction.


HAML is like eating soup by holding your spoon with chopsticks

+1 , and i cannot use more ZenCoding..



Would you really want someone working on your templates who couldn't figure out HAML in an hour or two?


What are you all afraid of? If you're using ERB, is the fact that HAML exists out there keeping you up at night? "Oh my God, some newbie might start templating in HAML tonight! To the Batmobile!"

Will you stop using GitHub when you find out they use CoffeeScript? Will your users abandon you when they find out your webapp is not written in pure, sugar-free JavaScript?

Concentrate on producing cool stuff. Not bitching about what you produce them with. Nobody but you cares.

Afraid of hiring devs who do not know JavaScript?
Then don't hire devs who do not know JavaScript. Simple.

Angry that people choose other tools than you do?
Too bad, you're weird and its a miracle you've made it this far.

Afraid you'll have to work with CoffeeScript at some point?
Good devs can express their intentions in any language they have to work with because its all about the product, not the tools.
If you can't, maybe you should work on that.


Indeed, it's about the Project, not the tools. Scenario. I need to hire a freelance designer. This designer has worked on projects all over town that are written in Java, PHP, Rails, DJango, whatever. The common linqua franca is HTML. But no, to work here the freelancer has to learn a tool that is of zero value to him or his other customers. This person can't hit the ground running and that costs me money.

And if, in the future, I need another freelancer and the one we just paid the "HAML tax" on is not available we have to pay the tax again on someone else.

No Thanks.


HAML is a superior default because it enforces a correct opinion about the best way to create markup -- to wit, it strongly suggests structure and semantics, while at the same time being significantly more writable, readable and editable than ERB and HTML. The people who are complaining because it's yet another DSL seem not to be remembering that it replaces ERB, which is already a DSL.

CoffeeScript is an ill considered idea, like the ill-fated (and core) RJS. There might be a large number of CoffeeScript implementations, but there are a radically larger number of JavaScript implementations and that is getting larger faster (owing to node, etc.). If CoffeeScript were significantly better than JavaScript in the same way that ERB and HAML are significantly better than HTML, or Sass is better than CSS, then it would make sense. But JavaScript is not that horribly broken, and doesn't need the prosthetics.




So with the inclusion of CoffeeScript as the default my javascript will break? No, I don't think so. So what's the hub-ub about? Let rails include it - don't use it if you don't want to. Oh, and you write your queries in SQL too instead of using Active Record while your at it :P No, really, I have no problem with it being included as 'self-promotional' as long as it doesn't break other existing code (like plain old js). I'm just thankful it's easier to get rid of that gawd awful prototype as the default in Rails 3 !


I see this as no different than when Apple removed PS/2 ports, serial ports, parallel ports, and floppy drives before everybody else. If somebody isn't pushing the state of the art forward, everybody gets held back.


Apple removed legacy ports that didn't work any more. That's a little different from putting a syntactic sugar layer on top of arguably the most popular and thriving dynamic language on the planet.


Didn't work any more? They certainly did, and manufacturers still made products that supported them. Apple took enormous amounts of flak for their actions, but within a year pretty much every other computer manufacturer silently did the same.

Maybe the analogy isn't perfect, but the sentiment is the same. If nobody has the balls to make a stand in pushing the state of the art ever forward, we'll be forever mired in the bad decisions of the past. There's even been serious discussion towards making something like Sass or SCSS a web standard, so that browsers will interpret it directly instead of having it compiled down to CSS. CoffeeScript could well follow the same path.


Conclusion: arguing for hours to make the core team remove one line from Gemfile is easier than removing the line by yourself.


DB9 and DB25 were maxed out in bandwidth, and floppy drives were maxed out in storage capacity. And you know this.

I'll go out on a limb here and say that CoffeeScript, like RJS, is not going to supplant JavaScript in the next decade, because all it is is syntactic sugar on top of JavaScript. Far more than HAML, it's an aesthetics-centered DSL, but with little upside for its mental cost. The problem with people 'having the balls to make a stand in pushing the state of the art ever forward' is that you end up with sheer awesomeness like

where clearly about 5000 different people decided that they and they alone had the balls to push the state of the art forward. Sometimes for the sake of environmental consistency you need to evaluate whether your one true grand plan hurts, or harms, the ecosystem. RJS: harms. HAML & SASS: help. CoffeeScript: harms. The fact that it's so controversial is an immediate red flag about it being a software best practice, wouldn't you say?


I just want to jump in here one more time to say thanks for the utter embarrassment this ridiculous, pathetic exchange has caused the Rails community.

Mind boggling, just mind boggling. I wouldn't be surprised if this will be looked back on as the day that Rails "jumped the shark", so to speak.


I haven't used CS, but to me, it looks ugly. How does one debug CS? So, instead of clicking on an error in the firebug console and then clicking on my js source code.. will I now have to trace back through from the compiled code back to my original source? JS debugging is already enough of a pain.
I'm very wary of this change. This is taking opinionated to a ridiculous level. JS is the lingua franca of the web. Everyone knows it. Everything runs it.
Still, love rails 3. Not trying to hate.


This is not a discussion forum, stackoverflow, slashdot. Post a comment only if you have something NEW and USEFUL to say.


@erauqssidlroweht that is the greatest thing ever, ever. I award you this 👍


@jameskilton Rails jumped the shark because it has a lively community that is passionate about its direction? Give me a break.


I'm still wondering why you guys dont take coffeescript and have it compile to ruby, and replace all your ruby too


@visionmedia You don't even use Rails, why are you still here discussing it?


I'm just curious, get rid of the __end__s and compile CS to ruby?


@visionmedia, well, cucumber might be an example of that.


@oscardelben well sure, but why not extend CS to compile to ruby instead of writing ruby? it's obviously superior :p, then half your community can write ruby in CS, and half can use ruby


@dlitz What's here isn't passion, what's here is fanboi-ism and pig-headedness. Someone not currently deep in the rails community will look at this and wonder wtf happened here, all this complaining, nay, raging over a single line library requirement that won't change how anyone uses Rails if they don't want to change and won't affect existing rails apps at all.


Not that I really care either for I only use rails when required, but... Making syntactic sugar a default over the standard, is at best an opinionated choice.
now, if the ruby community prefers CS over JS, well,... their problem.

lemme think, EcmaScript or CS?... hmmm... vim or eclipse ? hmmm..... and why not a GUI for git ?... yeah, that would be great, I wouldn't even have to remember what a commit is !....

@visionmedia : +1 all the way




I really don't care.


I liked coffeescript before rails started using it.
I outhipstered you guys. Deal with it.



gem install meme_generator

Just in case it's not clear: this whole meme thing is a joke. I just can't believe this thread exists. Sorry if anyone is upset about by this. Seems I started it accidentally.

Just use your favorite tools, do not freak out about a one line default, be happy. :)


Yesterday I decided not to post this, but to take a screenshot and tweet it instead, but I changed my mind, because I think this might be a good thread ender. (Thread Ender.js if you're so inclined!)


What's this "Rails" I keep hearing about???


I say leave it in commented out, because it's yet another dependency and slowdown if you are iterating on some new JS code. But I trust DHH's judgment for the most part.

This thread, however, is awesome. I need to figure out how to set a github alert for when a Rails commit's discussion explodes.


Vendo Fusca '77
Documentação OK
Lataria precisando de pintura.


Syntactic sugar trumps standardized languages once again.
+1 for the option, -1 for making it the default


The solution is simple. Just backtick all of your JavaScript in.


Oh well...



Why not RubyJS?


FACT: The Future will be: Rails + CoffeeScript + SproutCore (or) Backbone.js


(or) Sammy.js ;-)


backbone now too? stepping into a whole new world of newb :p


1. teach everyone to use the bleeding edge JS/NoSQL-stuff that breaks and requires a lot of debugging
2. use rails + MySQL/Postgres/... yourself
3. make truckloads of money (aka profit) & use proven scaling patterns for appserver + storage

now deal with it!


You don't HAVE to use coffeescript. I see a bigger waste of time bitching about it.
I also see people bitching who don't even use rails.
@visionmedia Why are you even here? You add nothing to the discussion. You even said you don't use Rails. You just have shit to talk about the people here who like coffeescript.
Obviously it is not a toy. Toys have maybe one use; Coffeescript has practical applications everywhere.
I can write pure js, I can also write coffeescript. Coffescript is easier and faster for a programmer to code with. Why would you want to make your own job easier? Why don't you go ahead and use Brainfuck?
Newb's troll, and you sir, are trolling.


Greatest. Thread. Ever.


Total delirium O.O




Oh my God. I had three pregnants during this thread. If my wife ever finds out about this...

At first I was like WTF?!? And then I was like, "Dude, just remove it from the Gemfile :D", and then I was like "@visionmedia: WTF?", and then I was like "ROFLMAO", and then I googled coffescript. Actually I made up the last part. Didn't google shit.


@justinbaker 'Coffescript is easier and faster for a programmer to code with' - This is a fact? I mean, that is exactly an example why I don't like people jumping the bandwagon without giving it a bit thought, and not only from their own personal perspective. Maybe it's just me.


How is coffeescript formed?


@casedog: i think it happens from kissing


@gitsucks Thank you for chiming in, "gitsucks"


@gitsucks they already have something that makes ruby more like python. It's called python


Guys, Rails is @dhh's playground, if he wants CoffeeScript or MiniTest, he'll have it, end of discussion. Go build your own Ruby framework if you're going to bitch about it. I'm not going to lie, I'm using Rails because it's as easy as a hooker, I don't care if she has black or red lipstick, comes with CoffeeScript or Sproutcore.

@dhh, btw, REST was not a good example, default routes are pretty meaningless except for the simplest of cases. You want more descriptive urls if you care about your app.


@gerhard exactly!


Time to revive merb ?


I don't know why but I feel like writing about PHP in here.




Keep it trollin' ;-) What about rspec support? scnr


@dfischer Amazing end to a long scrolling comment thread!


@dfischer nice work sir. kudos.


This is an example of why I've stopped using Rails.


"HAML is lame." -@robbyrussell


@cmowforth You've stopped using Rails because a heated discussion about a topic turned into a defusing explosion of internet memes filled with inside jokes? Damn, guess it's time for you to quit the HTTP and go back to NNTP...


@cmowforth what do you use now? 0_o


@dfischer Thanks for inspiring me to post.


A bit of maturity is called for. Rails, in my opinion, has continued to ruthlessly innovate [or just change, depending on your level of cynicism] for the sake of innovation. The introduction of Coffeescript perfectly illustrates this. For those asking, I either use a combination of hand-rolled tools built on top of clojure, or sinatra. Don't hate on me- DHH famously asserted "I don't owe you shit". That works both ways. I don't owe rails shit in terms of loyalty, either.


@pmarreck This was not a knee-jerk decision, I am just as equally mercenary as those who created RoR. Pragmatism also means deserting a framework when it no longer fulfills your business needs, but nobody likes to acknowledge that.


I'm so going to put this on a poster :D


Fired up Chrome Inspector:

> $('.commit-comment').size()
> $('.commit-comment .body img').size()

Well done.


RoR is dying, this desperate and aimless seek of innovation is drifting it apart from its native pragmatism.

I felt the lack of this kind of troll assertions :D


@thehack your vader meme made me laugh really hard. Your inspiration played off well. haha.


Just wait for Rails 3.2 replacing AR w/ Mongoid. :D


posting in an epic thread


@cmowforth: You should have said "RoR is obsolete", that would have guaranteed eternal f(l)ame. ^^


This cannot be topped :D
Very strange, what one line of code can start,
I don't mind,... I try a new coffee ;-)
When I don't like it, I switch back to tea again.


Must remember Github has no upvote buttons.


I noticed that the email notifications for these commit notes were not working :\

@beno Github is for social coding, not a social network


" hiring someone for client-side js that knows jQuery but nothing about the DOM"

@visionmedia couldn't agree more.


Does Coffescript scale when used with Rails?


@colszowka scale? You have to compile it.


I heard that Coffeescript was not web scale.


If it's is only a language that compiles to JS... Why don't use something with a syntax close to Ruby...


I wish someone from GitHub could close/lock this discussion. I constantly have to hit "Mark all as read" in my Notifications, and valid notifications are being lost in the pile.


Reading comprehension FAIL. :P

Turning off email notifications doesn't stop Github from constantly adding a new notification to my account in the app, which is what Campbell is talking about, and yes, it's kind of annoying.


@jameskilton: So what you're saying is, you use github to get real work done, and this thread has now become an impediment. Burn Github! Pitchforks!

How about we make this the new default?!?


Can I suggest to GitHub developers this gem?


@sorin-ionescu Oooh! I want to join the Ruby Workers Party! Where do I eval? :)


Since Coffeescript is not backward compatible with normal JS I would definitely -1 for making it default. Setting it as default is essentially telling rails newbies that they need to learn a new language (yes there are differences between Ruby and Coffeescript) in order to get started. That's just silly.


I never used .rjs and I am sure i won't use coffeescript.

But I am not sure if the people complaining here got this one:

Until you name your files .coffee you wont even notice anything about coffeescript.

You do not even have to remove this line in your gemfile for not using coffeescript.
You do not even have to use backticks for not using coffeescript.

You JUST have to name your file .js AS YOU EVER DID BEFORE!!


@ProGNOMmers: I'm pretty sure this thread is an edge case. However, if pagination was turned on by default, I'm sure most of the people in this thread would be in a thread complaining about that too.


Why can't you simply suggest to people: Learn Good JavaScript™ ?


@flockonus because there are some real conveniences in CoffeeScript: multiline strings without a \ at the end of every line, string interpolation, not having to worry about making sure every element of an array or object literal except the last one has a comma at the end of it, and the fat arrow for binding, to name a few.


@caseyhoward : I didn't mean to be serious :P


So we take rails, we call it cool, we apparently all work with it (why else comment in this thread). We cheer if stuff is made (much) better like with rails 3, (however most of us forgot to donate to the charity). Then when an inconsequential feature is added, which allows yet another file/code type to be processed automatically, poof this thread. I think we can agree or disagree about the value of Coffeescript (and many of the other changes made to rails) but we should keep in mind that this is open source, all those changes we love (and hate) are made available for free.

I think the options available are:

  • Either start contributing enough to become part of the core team (and get a bigger say in where rails will go);
  • fork and go your own route;
  • come with structural feedback / comments;
  • or stfu.

@pyrotechnick: You are showing a nice example of stfu I'd say.


@ahmeij Amen to that!


@thejh - Getting the joke FAIL.


  (  ゚д゚)
_(__つ/ ̄ ̄ ̄/_
  \/ github/

  ( ゚д゚ )
_(__つ/ ̄ ̄ ̄/_
  \/ github/

  .r   ヾ
__/ | / ̄ ̄ ̄/_
  \/ github/


Postic in epic thread.

Also, @glennr: laughed out loud at that one.

[edit: negativity removed, more positivity in the world. peace onto rails!]


Where are the like buttons........Facebook can you lend them for this thread...........:P ;)


This is ridiculous. I unsubscribed to email notifications but I keep getting notifications on the top of every github page next to my name. @rtomayko please fix this. Better Notification Controls only gives us half of what we want!

Also, a lot of us, including me, probably deserve this, but if you look at the list of people commenting here, there are a few people who probably don't goof off too often.


BTW if @github does fix it because @rtomayko saw the last notification, I'll be amused, because the same blog post where we got half of the ZOMG stop annoying me feature had the feature we needed (@replies) to get the other half!


Strong +1 for making it a default, along with SASS. And I would love to see HAML or SLIM become default as well.

Working in enterprise, I rely on the good stuff becoming part of the "opinionated" part of Rails because it drives adoption.


There was a time when my github newsfeed was useful. That was before the 9f09aeb commit.


@pboling That's going on the wall at work…


Email notifications for these commit notes are off.

Hey @github, it's not working. I don't give a shit if Coffeescript will be included or not, since this notification stops.



What happened to most of the images? This needs to be immortalized :(


@pbalduino I even tried to delete all of my comments to get the notifications to stop. No dice. The delete buttons are there but an error message flashes and they don't get deleted. I really hope @github does something about this. If anyone from @github sees this, please just set a date within the next few days to fix it! Even Don't Tread On Me didn't end this thread.


As a new web developer I learned and started using rjs bejore javascript, but soon discovered what a mess I was making. I can see CoffeeScript and SASS going down a road similar to RJS. History will repeat itself!!!


@ssinghi If you think drawing a parallel between CoffeeScript and RJS is a sensible activity I'm afraid you've been wildly misinformed. You're comparing apples to oranges.


If its just a Gemfile change, then why do it? What else is going to accompany CoffeeScript is my concern - is this the point where another merb gets forked??


@alisyed Human sacrifice, dogs and cats living together... mass hysteria!


I'm not familiar with Coffeescript, I'll have to take a gander at it. No doubt Ryan Bates will help me out with a few episodes dedicated to it. I am wondering however, how do I debug Coffeescript? If this has already been answered I apologize, I didn't read every hysterical comment. I can debug using Safari's Error Console and Firebug in Firefox, but that'll be Javascript not Coffeescript.


The logic will be the same.


epic thread.


@ssinghi Maybe you just don't know what you're doing.


is easier to say to an experimented developer to use haml, sass and coffescript than a newcomer to change the gemfile in order to write an application with the estandar language


+1 for @eveevans . Don't try to seem more geek than you are: if you were noob (and you were, at least in the past), you would shocked from sass and coffeescript.


Rails isn't a easy framework. It's productive and sexy, but not easy.


"Rails isn't a easy framework. It's productive and sexy, but not easy."

Easy is a relative term. But I can tell you this. I use Rails at home and at work, I've been told I have to use Struts 1 with Java, Tiles, C3P0 and JPA. You think Rails isn't easy...try that platform.


@proGNOMmers thanks,
@sryche my point is > Why try to make it more difficult from the start?


@eveevans That's like saying ActiveRecord makes Rails more difficult from the start because it's one more thing to learn. Coffeescript makes writing your JS easier, and just like ActiveRecord it's optional.


@jarinudom In the case of Active Record there are a lot of DB engines to be aware. But, In the case of Cofeescript it just javascript ? what's the big deal?


Coffeescript is like Javascript++
everyone stop bitchin' about an optional part of a very versatile framework? kthnx.


Because it makes js programming easier for everyone who gives a little shit to learn it?


I'm just here for the lulz


I found this thread after I was Google searching 'CoffeeScript' because I am building a client-side widget-based CMS/platform and I was trying to decide whether to make CoffeeScript the default or stick with JavaScript.

After reading most of this thread, I really really want to make CoffeeScript mandatory, just because it will probably piss off a ton of people. But I also want people to use my platform, so I may have to rethink that.


@visionmedia You make excellent points about how CS forks a unified community. Especially relevant on github.

Now there are repositories on github which exclude the majority of developers simply by being written in CS. This is an unnecessary weight, added for no clear reason (I also scratch my head when people say that JS is hard, or so full of confusing syntax that it is unusable). It also is like suicide -- why would you intentionally, greatly, limit the range of possible contributors?

I predict forking CS libraries, improving the js (making it readable), and promoting the pure javascript repository (FTW) will entertain some.


Having used both extensively on quite similar projects (including converting advanced examples from one system to the other), imho TJ's Stylus is superior to SCSS. As a "designer" comfortable coding the surface layer in most native and web UI scenarios, I seriously dig Stylus to the point of being a fanboy. But the truth is that both SCSS and Stylus do far more than "makes CSS more elegant and adds a few features" - he who wrote this has probably never seriously used these excellent and deep pre-processors.


@mendeza SCSS have one advantage, though: writing plain CSS is a valid SCSS.


still funny, one year on!


@prusswan that's one year and almost three months! damn fuzzy dates...


Can't believe I scrolled through the whole thread. Thank you internet.

BTW +1 for default


So awesome.

Please sign in to comment.