CSS is available but not displayed when the [Rails] button is clicked

For some strange reason, I can't get the Rails application to display CSS files on the server while in production mode. I am running Passenger + Nginx setup.

When I hit the public URL, I see the application. The problem is that styles are not applied. When I use Chrome dev tools to view the CSS that is displayed, I see that the file is present on the server, with all the CSS in it.

However, if I look at a specific component, I see something strange:

a:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
}

Everything says "webkit ... style". Or "user agent". I have not seen this before?

Again, pre-compiled CSS files are definitely located on the server - I can access them. (Assets / Applications 45fdaf ..... CSS).

:

<head>
  <title>Walter - <%= content_for?(:title) ? yield(:title) : "CRM App" %></title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <%= csrf_meta_tag %>

  <!-- Stylesheets -->
  <%= stylesheet_link_tag 'application' %>

  <!-- Font Awesome -->
  <link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">

  <!-- Apple icons -->
  <%= favicon_link_tag('apple-icon-57.png', rel: 'apple-touch-icon', type: 'image/png', size: "57x57") %>
  <%= favicon_link_tag('apple-icon-72.png', rel: 'apple-touch-icon', type: 'image/png', size: "72x72") %>
  <%= favicon_link_tag('apple-icon-114.png', rel: 'apple-touch-icon', type: 'image/png', size: "114x114") %>
  <%= favicon_link_tag('apple-icon-144.png', rel: 'apple-touch-icon', type: 'image/png', size: "144x144") %>

  <!-- Favicon -->
  <%= favicon_link_tag '/favicon.ico' %>
</head>

( true false production.rb, , , ).

, public/assets CSS. , , . , :

<link href="/assets/application-f0659345b965e7ce36fb30edf04896c6.css" media="screen" rel="stylesheet">

, ?

.

<%= stylesheet_link_tag 'application' %> - text/plain text/css.

?

Fixed

, mime.types nginx.conf. , - , . , . CSS.

+4
1

css content-type/css application/octet-stream? , -, , .

+1

All Articles