jsdf / sprockets-coffee-react

DEPRECATED – Sprockets preprocessor for CJSX (Coffeescript with React JSX markup)
MIT License
85 stars 29 forks source link

CJSX files not being processed ever #3

Closed vinnymac closed 9 years ago

vinnymac commented 9 years ago

The Issue

I have installed the gem outside any groups inside of the Gemfile. As far as I can tell, Sprockets is picking up on my .js.coffee.cjsx file. However it is not compiling the cjsx file. The browser throws an error (ExecJS::RuntimeError: SyntaxError: unexpected COMPARE) because coffeescript doesn't understand all the cjsx syntax. I also tried the .js.cjsx extension and the result is a untouched coffeescript/cjsx file.

If you want more information, let me know what you require. Thanks.

Logs

In my logs, I can see various assets being compiled, the output surrounding this file looks like this:

Compiled banana.js  (91ms)  (pid 31548)
Compiled apple.js.cjsx  (363ms)  (pid 31548)
Compiled orange.js  (5ms)  (pid 31548)

Banana, apple, and orange all have coffeescript in them.

Versions

Ruby Version: 2.0.0p451
Rails Version: 3.2.18
sprockets-coffee-react Version: 2.1.0
jsdf commented 9 years ago

Hmm I'm guessing this is to do with different versions of Rails requiring Sprockets preprocessors to be registered at different times. I'll look into it.

jsdf commented 9 years ago

Hi, I tried to replicate your issue using the same versions of Ruby, Rails etc, but wasn't able to. As far as I can see everything is working as it should be. If you can provide a repo with a dummy Rails install which reproduces the issue, or exact steps to repro it I can investigate further.