You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an Barista::CompilationError on my app/coffeescripts/application.coffee file (which is not the culprit because I ran coffee -c on it successfully) with the following trace:
[Barista] Compiling all scripts for barista
[Barista] Compiling all coffeescripts
[Barista] Compiling application.coffee from framework 'default'
[Barista] There was an error compiling coffeescript from app/coffeescripts/application.coffee:
/tmp/coffee.js20110215-13685-14wc4ac:9
var CoffeeScript = this.CoffeeScript, print = console.log;
^
ReferenceError: console is not defined
at Object.<anonymous> (/tmp/coffee.js20110215-13685-14wc4ac:9:18)
at Module._compile (module:384:23)
at Module._loadScriptSync (module:393:16)
at Module.loadSync (module:296:10)
at Object.runMain (module:459:22)
at node.js:196:8
In my app/views/layouts/application.html.haml file, I have:
= coffeescript_include_tag 'application'
What am I missing? Thanks for your consideration.
The text was updated successfully, but these errors were encountered:
I had the same problem and did some investigation: The root cause for this issue is a bug in locating the node binary in ruby-coffee-script, that has been introduced in the last version by this commit.
You can work around this bug by simply configure the bin_path:
Barista.configure do |config|
config.bin_path = '/usr/local/bin/node'
end
Thanks netzpirat. I tried upgrading to the newly released coffee-script 2.1.3 gem but the same error still occurs. Next I tried setting config.bin_path = 'node' as you suggested and that fixed the error for me.
With some more investigation, I found that I installed nodejs on my Ubuntu machine and then also made a newer local node.js installation via NVM. CoffeeScript was installed locally in my NVM build, but not in the system-wide Ubuntu installation. That was the root cause of those errors.
I uninstalled the system-wide nodejs and now the problem is fully solved!
I get an Barista::CompilationError on my
app/coffeescripts/application.coffee
file (which is not the culprit because I rancoffee -c
on it successfully) with the following trace:In my
app/views/layouts/application.html.haml
file, I have:What am I missing? Thanks for your consideration.
The text was updated successfully, but these errors were encountered: