mardi 14 mars 2017

rails assets in production not served (yet another assets issue)

I'm using apache 2.2.15 passenger 5.1.2 rails 4.2.6 ruby 2.3.3

In the rails log, I get

(No route matches [GET] application-xxxxx.js

as well as

(No route matches [GET] application-xxxxx.css

I can find the assets in the public/assets directory.

My manifests:

app/assets/stylesheets/application.css.less:

/*
 *= require jquery-ui
 *= require font-awesome
 *= require bootstrap_and_overrides
 *= require awesome-bootstrap-checkbox
 *= require lists
 *= require mailgroups
 *= require general
 *= require colors
 *= require print
 *= require loader
 *= require tooltips
 *= require_self
 *= require_tree .
*/

app/assets/javascripts/application.js

//= require jquery
//= require jquery.turbolinks
//= require jquery_ujs
//= require jquery-ui
//= require twitter/bootstrap
//= require bootstrap
//= require turbolinks
//= require twitter/bootstrap/rails/confirm
//= require_self
//= require_tree .

and I set (following other answers here on SO) in config/production.rb

config.serve_static_files = true

in app/views/layouts/application.html.erb

<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => "reload" %>
<%= javascript_include_tag "application", "data-turbolinks-track" => "reload" %>

I'm lost, thanks for your help.

Aucun commentaire:

Enregistrer un commentaire