I have a ruby on the rails web server that I am trying to deploy in production. I'm having problems loading assets into production: .css, .js and images (it seems to work fine because of this.
Here is my production.rb
Rails.application.configure do
config.cache_classes = true
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_files = true
config.assets.js_compressor = :uglifier
config.assets.compile = false
config.assets.digest = true
end
Previously, I had a deployed version of the same server, and its tags looked like this: application.html.erb:
<head>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
in production (loaded css / js)
<link data-turbolinks-track="true" href="/assets/application-06ed3643d0bf74fdf192f533cc269506.css" media="all" rel="stylesheet" />
<script data-turbolinks-track="true" src="/assets/application-f134ff018deb0477bd5ad046d853559d.js"></script>
When my application is deployed now, it looks like this (without a fingerprint). Precompilation does not seem to work. There are no files in the public / assets, which is a problem. Currently my application manifest is as follows
<link data-turbolinks-track="true" href="/stylesheets/application.css" media="all" rel="stylesheet" />
<script data-turbolinks-track="true" src="/javascripts/application.js"></script>
, - . css js . -: . ?
, :
config.assets.compile = true
Rails.application.config.assets.precompile << /(^[^_\/]|\/[^_])[^\/]*$/
, , . , . !
. , application.js /assets/javascripts, application.css.scss /assets/stylesheets - ,