in my app/assets/javascripts/specific.js
I have
//= require_tree ./specific
in app/assets/javascripts/specific/chat
I have pusher.js
Also, in config/environments/production
I have
config.assets.precompile += %w( specific.js some_other_manifest.js )
However, when I go into production (on heroku) it still complains pusher.js
is not precompiled. What am I doing wrong here?
While the application is deployed, the javascript files seem to be compiled.
from Heroku logs:
Compiled specific/chat/pusher.js (0ms) (pid 1042)
Compiled specific.js (60ms) (pid 1042)
But when I go to the view,
ActionView::Template::Error (specific/chat/pusher.js isn't precompiled):
1: <%= javascript_include_tag 'specific/chat/pusher' %>
2: <%= javascript_include_tag params[:controller] %>
3:
4: <div id="chat-header">
app/views/messages/index.html.erb:1:in `_app_views_messages_index_html_erb___3285714722884343394_70246542189040'
I also tried putting config.assets.precompile ..
option inside config/application.rb
instead of production.rb
Related: Assets say "not precompiled" when they are precompiled
When I run assets:precompile
and look in public/assets
folder, I see that they are all precompiled (e.g. specific-bfgbfbf4534535.js
)
So the asset is actually precompiled, but the error says it isn't precompiled
From my view:
<%= javascript_include_tag 'specific/chat/pusher.js' %>