Adding config.assets.precompile
to your config/environments/production.rb file is not working on rails 4. This bug has been raised on sprocket-rails and as a temporary fix, move this setting to config/application.rb
class Application < Rails::Application
...
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
config.assets.precompile += %w( head.js )
end