ExecJS error with CoffeeScript not defined

It has been killing me all day. I have a Rails application that I upgrade from 3.2 to 4.0.13, which works great in development. When testing in Rails 4 I get

ExecJS::ProgramError: ReferenceError: CoffeScript is not defined

for a whole host of integration tests. Nowhere do I explicitly call or use ExecJS, it seems to be called through coffee-script, which, in turn, is called through coffee-rails.

I don’t even know what useful material I can help you. This even happens if I manually compile my entire coffeescript file into javascript, so I don’t think it is my coffee that does this.

Please feel free to ask about things and I will give it to you.

Gems with versions that may relate to this:

rails 4.0.13
capybara 2.7.1
capybara-webkit 1.11.1
coffee-rails 4.2.1
coffee-script 2.4.1
execjs 2.7.0
+4
source share
1 answer

The latest version of the coffee script source is empty: https://github.com/jashkenas/coffeescript/issues/4403 due to poor release

Try using 1.11.1

 gem 'coffee-script-source', '1.11.1'
+12
source

Source: https://habr.com/ru/post/1663879/


All Articles