'RoR App: “The asset 'application.css' is not present in the asset pipeline”

Info: Rails 6.1.4 Ruby 3.0.1 PostgreSQL 9.6 NodeJS 11.15.0 Yarn 1.22.5

when I start my APP I always got the same error: enter image description here

I've tried all I saw in others posts but I can´t resolve this problem. Any suggestions?



Solution 1:[1]

Did you tried to do the following on the server

RAILS_ENV=production bundle exec rake assets:precompile

Solution 2:[2]

In config/environments/production.rb I added the following line:

# Do not fallback to assets pipeline if a precompiled asset is missed.
  config.assets.compile = true

also I checked the following line:

config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? 

With this configuration I can start my APP.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 FredyK
Solution 2 Harold Alcalde Solarte