I’m struggling with precompiling assets both on Heroku and locally when the environment is set to production.
//= require fullcalendar/dist/fullcalendar
This works just fine when I run a local server in development mode. I noticed something is off when I pushed to Heroku, which won’t precompile my assets:
remote: Running: rake assets:precompile
remote: rake aborted!
So I tried precompiling assets locally, which works as expected when the environment is set to development. However, when I run …
% RAILS_ENV=production bundle exec rake assets:precompile --trace
… ExecJS yells at me (full trace here):
** Execute assets:precompile
ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» (line: 70927, col: 13, pos: 2134177)
Those are my asset paths:
And the only change I made in ./config/initializers/assets.rb is adding another manifest file for precompilation:
Rails.application.config.assets.precompile += %w(onboarding.js)
So to sum up my two questions:
- How do I properly include files located at /vendor/assets/**/* in manifest files?
- What’s ExecJS executing at precompilation and how do I figure what breaks it?
Thanks in advance!