javascript - rails app styling all fails -
i have rails application moved server. somewhere of configuration off , web pages styling not loading. rails console gives out: actioncontroller::routingerror (no route matches [get] "/images/search-icon.png")
every asset (images, javascript, , stylesheet).
where occuring?
the main difference launching in production mode.
rails 3.1 brought 'asset pipeline'. introduction, serving of assets (images, stylesheets, javascripts) works differently in production.
in development/test environments, rails application handles serving assets concatenating, minifying and/or compressing based on configuration.
but in production, expected assets precompiles public directory following rake task:
bundle exec rake assets:precompile
and application can configured assets served rails application or (by convention) web server.
looks have not precompiled assets, why rails unable serve non-existent files.
visit asset pipeline more details.
Comments
Post a Comment