I\'m trying to precompile my assets for production, but rails doesn\'t seem to be cooperating.
$ bundle exec rake assets:precompile
/home/drderp/.rvm/rubies/
This was horrible; no javascript error on my local computer means that there's an issue with asset compilation.
Here's how I solved it.
As suggested in the comments for a similar question ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» when running rake assets:precompile on production , I removed uglifier (in production.rb, comment out the compressor line) and compression altogether. (I had tried with other compressors; yui did not give much information. closure seemed to give me a hint but didn't help much)
I then compressed the assets locally, then I pushed to production.
(To compress locally, use RAILS_ENV=production rake assets:precompile )
I ran on the server and this is when the javascript errors surfaced. It was basically erroneous merging of files (mainly due to something commented out). I got rid of those lines and pushed back to production. Everything succeeded.
I brought back uglifier, deleted the precompiled assets under public/assets/ and pushed back to production.
I hope this helps someone!