Skip to content
Permalink
Browse files

Include CoffeeScript in Gemfile

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

This comment has been minimized.

Copy link
@akzhan

akzhan Apr 16, 2011

yajl-ruby is more stable than json gem.

gem 'coffee-script'
gem 'json' # CoffeeScript and Sprockets dependency
GEMFILE
elsif options.edge?
<<-GEMFILE.strip_heredoc
gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'arel', :git => 'git://github.com/rails/arel.git'
gem 'rack', :git => 'git://github.com/rack/rack.git'
gem 'sprockets', :git => "git://github.com/sstephenson/sprockets.git"
gem 'json' # Sprockets dependency
gem 'coffee-script'
gem 'json' # CoffeeScript and Sprockets dependency

This comment has been minimized.

Copy link
@exviva

exviva Apr 13, 2011

Contributor

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

This comment has been minimized.

Copy link
@josh

josh Apr 13, 2011

Author Member

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

This comment has been minimized.

Copy link
@steveklabnik

steveklabnik Apr 18, 2011

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.

GEMFILE
else
<<-GEMFILE.strip_heredoc

368 comments on commit 9f09aeb

@piyushranjan

This comment has been minimized.

Copy link

replied Apr 16, 2011

Time to revive merb ?

@pyrotechnick

This comment has been minimized.

Copy link

replied Apr 16, 2011

LEAVE COFFESCRIPT ALONE

@d4rky-pl

This comment has been minimized.

Copy link

replied Apr 16, 2011

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

@jgv

This comment has been minimized.

Copy link

replied Apr 16, 2011

first

@gr4y

This comment has been minimized.

Copy link

replied Apr 16, 2011

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

@dfischer

This comment has been minimized.

Copy link

replied Apr 16, 2011

Now Diamonds

@agibralter

This comment has been minimized.

Copy link
Contributor

replied Apr 16, 2011

@dfischer Amazing end to a long scrolling comment thread!

@ajsharp

This comment has been minimized.

Copy link

replied Apr 16, 2011

@dfischer nice work sir. kudos.

@canweriotnow

This comment has been minimized.

Copy link

replied Apr 16, 2011

@thehack

This comment has been minimized.

Copy link

replied Apr 16, 2011

The Force is strong with this one.

@m0wfo

This comment has been minimized.

Copy link

replied Apr 16, 2011

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

@robbyrussell

This comment has been minimized.

Copy link
Contributor

replied Apr 16, 2011

"HAML is lame." -@robbyrussell

@pmarreck

This comment has been minimized.

Copy link

replied Apr 16, 2011

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

@justbaker

This comment has been minimized.

Copy link

replied Apr 16, 2011

@cmowforth what do you use now? 0_o

@thehack

This comment has been minimized.

Copy link

replied Apr 16, 2011

@dfischer Thanks for inspiring me to post.

@m0wfo

This comment has been minimized.

Copy link

replied Apr 16, 2011

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.

@m0wfo

This comment has been minimized.

Copy link

replied Apr 16, 2011

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

@m0wfo

This comment has been minimized.

Copy link

replied Apr 16, 2011

@hukl

This comment has been minimized.

Copy link

replied Apr 16, 2011

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

@benatkin

This comment has been minimized.

Copy link

replied Apr 16, 2011

Fired up Chrome Inspector:

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

Well done.

@mdesantis

This comment has been minimized.

Copy link
Contributor

replied Apr 16, 2011

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

@dfischer

This comment has been minimized.

Copy link

replied Apr 16, 2011

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

@rmoriz

This comment has been minimized.

Copy link

replied Apr 16, 2011

@stephanschubert

This comment has been minimized.

Copy link

replied Apr 17, 2011

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

@arp

This comment has been minimized.

Copy link

replied Apr 17, 2011

@aurelian

This comment has been minimized.

Copy link
Contributor

replied Apr 17, 2011

posting in an epic thread

@provideal

This comment has been minimized.

Copy link

replied Apr 17, 2011

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

@jacobandresen

This comment has been minimized.

Copy link

replied Apr 17, 2011

ROFL

@radosch

This comment has been minimized.

Copy link

replied Apr 18, 2011

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.

@beno

This comment has been minimized.

Copy link

replied Apr 18, 2011

Must remember Github has no upvote buttons.

@NARKOZ

This comment has been minimized.

Copy link
Contributor

replied Apr 18, 2011

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

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

@cseeger

This comment has been minimized.

Copy link

replied Apr 18, 2011

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

@visionmedia couldn't agree more.

@colszowka

This comment has been minimized.

Copy link

replied Apr 18, 2011

Does Coffescript scale when used with Rails?

@mephux

This comment has been minimized.

Copy link

replied Apr 18, 2011

@colszowka scale? You have to compile it.

@ohaibbq

This comment has been minimized.

Copy link

replied Apr 18, 2011

I heard that Coffeescript was not web scale.

@thejh

This comment has been minimized.

Copy link

replied Apr 18, 2011

@robbyrussell

This comment has been minimized.

Copy link
Contributor

replied Apr 18, 2011

@khani3s

This comment has been minimized.

Copy link

replied Apr 18, 2011

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

@thejh

This comment has been minimized.

Copy link

replied Apr 18, 2011

@justincampbell

This comment has been minimized.

Copy link
Contributor

replied Apr 18, 2011

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.

@robbyrussell

This comment has been minimized.

Copy link
Contributor

replied Apr 18, 2011

@jasonroelofs

This comment has been minimized.

Copy link

replied Apr 18, 2011

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.

@pboling

This comment has been minimized.

Copy link
Contributor

replied Apr 18, 2011

@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?!?

@mdesantis

This comment has been minimized.

Copy link
Contributor

replied Apr 18, 2011

Can I suggest to GitHub developers this gem?

@sorin-ionescu

This comment has been minimized.

Copy link

replied Apr 18, 2011

Dictatorship

@sunaku

This comment has been minimized.

Copy link
Contributor

replied Apr 18, 2011

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

@weexpectedTHIS

This comment has been minimized.

Copy link

replied Apr 18, 2011

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.

@laszlokorte

This comment has been minimized.

Copy link

replied Apr 18, 2011

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!!

@caseyhoward

This comment has been minimized.

Copy link

replied Apr 18, 2011

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

@flockonus

This comment has been minimized.

Copy link

replied Apr 19, 2011

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

@benatkin

This comment has been minimized.

Copy link

replied Apr 19, 2011

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

@mdesantis

This comment has been minimized.

Copy link
Contributor

replied Apr 19, 2011

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

@glennr

This comment has been minimized.

@ahmeij

This comment has been minimized.

Copy link

replied Apr 19, 2011

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.

@micpringle

This comment has been minimized.

Copy link

replied Apr 19, 2011

@ahmeij Amen to that!

@canweriotnow

This comment has been minimized.

Copy link

replied Apr 19, 2011

@thejh - Getting the joke FAIL.

@niw

This comment has been minimized.

Copy link

replied Apr 19, 2011

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

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

  ( ゚д゚ ) COFFEESCRIPT IN RAILS?
  .r   ヾ
__/ | / ̄ ̄ ̄/_
  \/ github/

@hraban

This comment has been minimized.

Copy link

replied Apr 20, 2011

Postic in epic thread.

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

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

@amitsaxena

This comment has been minimized.

Copy link

replied Apr 20, 2011

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

@benatkin

This comment has been minimized.

Copy link

replied Apr 20, 2011

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.

@benatkin

This comment has been minimized.

Copy link

replied Apr 20, 2011

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!

@lastobelus

This comment has been minimized.

Copy link

replied Apr 20, 2011

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.

@eduardordm

This comment has been minimized.

Copy link
Contributor

replied Apr 21, 2011

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

@pyrotechnick

This comment has been minimized.

Copy link

replied Apr 21, 2011

picture is unrelated

@unikitty37

This comment has been minimized.

Copy link

replied Apr 21, 2011

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

@pbalduino

This comment has been minimized.

Copy link

replied Apr 23, 2011

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.

Thx

@rmatei

This comment has been minimized.

Copy link

replied Apr 23, 2011

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

@benatkin

This comment has been minimized.

Copy link

replied Apr 23, 2011

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

@amitsaxena

This comment has been minimized.

Copy link

replied Apr 23, 2011

@ssinghi

This comment has been minimized.

Copy link

replied Apr 27, 2011

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!!!

@pyrotechnick

This comment has been minimized.

Copy link

replied Apr 27, 2011

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

@alisyed

This comment has been minimized.

Copy link

replied Apr 29, 2011

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??

@jarinudom

This comment has been minimized.

Copy link

replied Apr 29, 2011

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

@JurgenJocubeit

This comment has been minimized.

Copy link

replied May 9, 2011

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.

@cfcosta

This comment has been minimized.

Copy link
Contributor

replied May 9, 2011

@MeetDom
The logic will be the same.

@p3drosola

This comment has been minimized.

Copy link

replied May 10, 2011

epic thread.

@justbaker

This comment has been minimized.

Copy link

replied May 10, 2011

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

@eveevans

This comment has been minimized.

Copy link

replied May 13, 2011

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

@mdesantis

This comment has been minimized.

Copy link
Contributor

replied May 14, 2011

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

@cfcosta

This comment has been minimized.

Copy link
Contributor

replied May 14, 2011

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

@cbmeeks

This comment has been minimized.

Copy link

replied May 23, 2011

@sryche
"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.

@eveevans

This comment has been minimized.

Copy link

replied May 23, 2011

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

@jarinudom

This comment has been minimized.

Copy link

replied May 25, 2011

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

@eveevans

This comment has been minimized.

Copy link

replied May 25, 2011

@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?

@justbaker

This comment has been minimized.

Copy link

replied May 29, 2011

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

@cfcosta

This comment has been minimized.

Copy link
Contributor

replied Jun 1, 2011

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

@amitsaxena

This comment has been minimized.

Copy link

replied Jun 25, 2011

@gerardo

This comment has been minimized.

Copy link

replied Jul 8, 2011

I'm just here for the lulz

@runvnc

This comment has been minimized.

Copy link

replied Mar 11, 2012

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.

@sandro-pasquali

This comment has been minimized.

Copy link

replied Mar 28, 2012

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

@mendeza

This comment has been minimized.

Copy link

replied May 20, 2012

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.

@Denommus

This comment has been minimized.

Copy link

replied Jun 13, 2012

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

@prusswan

This comment has been minimized.

Copy link

replied Jul 3, 2012

still funny, one year on!

@benatkin

This comment has been minimized.

Copy link

replied Jul 3, 2012

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

@benatkin

This comment has been minimized.

Copy link

replied Jul 10, 2012

:trollface:

@giniedp

This comment has been minimized.

@Apathetic012

This comment has been minimized.

Copy link

replied Mar 22, 2013

Drame :trollface:

@adeluccar

This comment has been minimized.

Copy link

replied Jun 10, 2014

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

BTW +1 for default
XD

@sammarcus

This comment has been minimized.

Copy link

replied Nov 4, 2014

So awesome.

Please sign in to comment.
You can’t perform that action at this time.