Static pages and assets in Rails 3.1.1 -
currently working on project need drop in various static html pages + static assets time time "just work." cannot have editing html directly place paths in assets. need work such html + asset folders placed directly /public , content served generated.
when testing behavior in production, it's no go errors such as:
actioncontroller::routingerror (no route matches [get] "/some_folder/some-image.png"):
i assume result i'm reading 3.1.x's asset pipeline.
how alter routes such these served directly? or there preferred way keep precise behavior? (ultimately deployed on heroku.)
adding more details current remarks have not yet pushed issue on edge in terms of solution:
in present scenario i'm running straight on webrick rails s -e production
test out. in development mode work properly; exception in production
.
i running prior running server: bundle exec rake rails_env=production rails_groups=assets assets:precompile --trace
when attempt load page in production, see following output:
cache: [get /] miss cache: [get /test_files/index.css] miss cache: [get /test_files/index.js] miss cache: [get /test_files/logo.png] miss cache: [get /test_files/background.png] miss cache: [get /test_files/horizontal.png] miss cache: [get /favicon.ico] miss
upon further scrutiny of production.rb seeing: "config.serve_static_assets = true" when set false default evokes issue experienced in webrick. when setting true serves files properly.
from additional reading appears perhaps heroku needs set false well, environment we're deploying.
thanks input, appears approach take , i'd appreciate further input if not correct answer or if there's better approach.
Comments
Post a Comment