This project is archived and is in readonly mode.

#6706 new
jeanbaptiste.barth (at gmail)

Bad syntax for comments in generated *.js.coffee

Reported by jeanbaptiste.barth (at gmail) | April 17th, 2011 @ 03:22 AM

Actual template for ".js.coffee" files generates a app/assets/javascripts/[controller].js.coffee with 3 comments starting with a "//". It leads to this error when trying to compile to JS:

ExecJS::ProgramError
Error: Parse error on line 1: Unexpected 'IDENTIFIER'

If I'm not wrong, Coffeescript comments start with a "#", not a "//". Hence the (trivial) attached patch, which solves the error for me.

Relevant information for this ticket: I'm running a fresh Rails master (3.1), with coffee-script 2.2.0 and coffee-script-source 1.0.1.

No comments found

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages