I have been working with Peter Wagenet from Tilde on getting support for Ember Appkit on Heroku with a Rails app. First some background:
Ember Appkit will Transpile ES6 modules for use as AMDs. To that end I wrote the es6_module_transpiler-rails gem which uses Node and Square's es6-module-transpiler package. That package makes use of Esprima for the parsing. There is an issue of a reserved keyword in older JavaScript runtimes not being quoted properly: https://code.google.com/p/esprima/issues/detail?id=469
On our local machines everything works OK and the transpiling does not bomb out because our versions of Node are recent. However, when we deploy to Heroku and Rails attempts to pre-compile its assets the version of Node that Heroku uses is out of date. Based upon some research it appears by default Heroku is using Node v0.4.7 which is from April 2011. It is easy enough to force Heroku to use a more up to date version of Node: https://devcenter.heroku.com/articles/nodejs-support#versions however it is currently unclear if this will run side-by-side with a Rails app for pre-compilation. Furthermore, I do not think it is reasonable to ask Rails developers to include Node configuration code for Heroku in the apps.
I respectfully request that the default version of Node for Rails's asset compilation get bumped up to a more recent version.
Hi, we support integration through node by using multi buildpack and by defining a
package.json
in your application. Here's the PR heroku/heroku-buildpack-ruby#245Make sure nodejs comes first in the .buildpacks file then you can get any version of Node you want.