Grails, CoffeeScript and Eclipse

I’m using the Grails CoffeeScript plugin, but when running my Grails application from Eclipse, with run-app, I got the following error:

Compiling CoffeeScript Files ...ERROR Launching CoffeeScript compiler: Cannot run program "coffee": error=2, No such file or directory

Now, in order to fix this you need to tell the CoffeeScript Grails plugin where to find the coffee command. You can do this in BuildConfig.groovy by adding this line:


But, this is not enough, because now I get the following error:

Compiling CoffeeScript Files ...env: node: No such file or directory

The solution I found to this problem was editing /opt/local/bin/coffee, changing

#!/usr/bin/env node



Now I’m able to do run-app from within Eclipse.

Keep in mind that I’m on a Mac having installed CoffeeScript with npm, and node and npm with MacPorts. You might have your CoffeeScript installation in a different location.

One Response to Grails, CoffeeScript and Eclipse

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>