Rails on a Ubuntu 14.04 server, not loading the application layout

I just finished my application on my development laptop, and now I'm trying to deploy it on an ubuntu server. I installed everything and ran the rails to try out the development environment. It works, but it never loads css or js, I precompiled them and double checked that they are in the shared assets folder. The problem is that he never asks for them. For example, my application layout considers it as normal (as an idea, not the actual code, but no need to explain):

<html>
<head>
  ----rails calls to application.js and css 
</head>
<body>
  <%= yield %>
</body>
</html>

But when I load the login page, there is no css. I check the source of the page and it only shows the <% = yield%> part, the html, body or head tags and, of course, the links to css or js. I log in and move the application correctly, but css or js files are never used.

Why is this happening? Nothing has changed in the code, just another machine. I tried it on different machines, just copying the folder with all my code and running the package, and then the rails, and it works fine on three different machines. Why doesn't it work on ubuntu server?

+4
source share
1 answer

- . - , . , :

layout "application.html.erb"

, , .

+2

Source: https://habr.com/ru/post/1613063/


All Articles