rails 3.2.13 ActionView::Template::Error (application.css isn't precompiled)
In production mode for a rails 3.2.13 application, hit precompilation
errors, that were not present in similar 3.2.11 application. Generated
variants of the error whittling down pre compilation errors.
ActionView::Template::Error (application.js isn't precompiled)
ActionView::Template::Error (application.css isn't precompiled)
ActionView::Template::Error (bott.jpg isn't precompiled)
The last one got me entirely clued in to the issue. By process of
elimination, I had removed references to rail tags such as:
<%= javascript_include_tag "application" %>
and hardcoded items, like
<link rel="stylesheet" href="/assets/foundation.css">
Upon the last error, launched via the rails tag:
<%= image_tag 'bott.jpg' %>
it became obvious that this would be a show stopper. I tried tested on the
production server
RAILS_ENV=production RAILS_GROUPS=assets
which forced me to remove form a css file an internal reference
<%= asset_path 'bgButtee.jpg' %>
Errors remained after and even after restarting via cap deploy. All
functioned in development, which loads everything every time; I understand
that in production mode this may not be feasible.
Given the error, I need to get precompilation of all assets in production
mode (hard coding template images might be feasible, but I believe it
won't give love to attachments and such). I've tried in production.rb
config.assets.precompile = true
config.assets.compile = false
while application.rb maintains
config.assets.enabled = true
I don't believe it's a deploy.rb issue as another instance is identical -
save the rails version. Capfile states
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
load 'deploy/assets'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each {
|plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default
tasks
No comments:
Post a Comment