0

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?

2 Answers2

0

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.

  • 1
    the assets should be precompiled in the production environment. Here is the explanation. https://stackoverflow.com/a/8827757/4492997 – Long Luong Apr 07 '23 at 12:33
0

Did you tried to do the following on the server

RAILS_ENV=production bundle exec rake assets:precompile
FredyK
  • 299
  • 1
  • 16