bundle exec rake assets:precompile bundle exec rake assets:precompile ruby ruby

bundle exec rake assets:precompile


Try with:

//= require_tree .

Instead of

//= require_tree

With the dot at the end. Like in the guides: http://guides.rubyonrails.org/asset_pipeline.html#manifest-files-and-directives


I saw this same error after updating gems on an older already-deployed app. I narrowed it down to uglifier, having been upgraded from 1.3.0 to 2.0.1. According to its README it needs a JS interpreter:

Ensure that your environment has a JavaScript interpreter supported by ExecJS. Installing therubyracer gem is a safe choice and having node in PATH works too.

But it's not a hard dependency, so it didn't get caught by bundler. Not wanting to pursue that quite yet, I switched uglifier back to 1.3.0 in the Gemfile:

  gem 'uglifier', '1.3.0'

and all was well.


check removing the below line form application.js

//= require_tree

require_tree loads all the files in app/javascripts dir recursively

If it works the there is some issue with one of the javascript file in app/assets/javascripts directory

check all the files in the directrory or

require the files one by one in application.js

//= require js_file_name