[RUBY] How to resolve the error'ActionView :: Template :: Error (The asset "application.css" is not present in the asset pipeline.'" When precompiling Rails assets

background

--When I deployed the created Rails application and accessed the page, the following error screen appeared and I could not access it.

--So, when I checked log / production.rb, I got the following error.

log/production.rb


ActionView::Template::Error (The asset "application.css" is not present in the asset pipeline.):

I've taken so much time to resolve this error that I'm not sure if it's the right way to do it, but I'll share the solution in my environment.

environment

Rails 5.2.4 Ruby 2.6.4

solution

I edited config / environments / production.rb as follows and it was fixed

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

References

Recommended Posts

How to resolve the error'ActionView :: Template :: Error (The asset "application.css" is not present in the asset pipeline.'" When precompiling Rails assets
"" Application.js "is not present in the asset pipeline" error in Ruby on Rails
Error in production environment (The asset "~" is not present in the asset pipeline.)
How to solve the problem when the value is not sent when the form is disabled in rails and sent
How to write the view when Vue is introduced in Rails?
How to set when "The constructor Empty () is not visible" occurs in junit
How to output the value when there is an array in the array
How to solve the unknown error when using slf4j in Java
[Rails carrier wave] How to not transition to the error screen even if the image upload is not selected
How to solve the problem that it is not processed normally when nesting beans in Spring Batch
How to resolve errors when installing Rails 5.1.3
[Rails] About the error that the image is not displayed in the production environment
How to constrain the action of the transition destination when not logged in
[Ruby] How to prevent errors when nil is included in the operation
[Rails] What to do when the Refile image is not displayed when writing the processing at the time of Routing Error
Possibility when deploying to EC2 but nothing is displayed in the error log
How to redirect to http-> https when SSL is enabled in Rails × Heroku environment
How to resolve the "OpenSSH keys only supported if ED25519 is available" error
What to do when rails db: seed does not reflect in the database
How to resolve errors that occur in the "Ruby on Rails" integration test
[Error] How to resolve the event that the screen does not transition after editing
How to check Rails commands in the terminal
When the project is not displayed in eclipse
[rails devise] How to transition users who are not logged in to the login page
[Rails] How to solve the error "undefined method` visit'" when using Capybara with Rspec
How to set the display time to Japan time in Rails
[Error] The app is not displayed in the production environment
[Rails] How to display an image in the view
How to resolve SSL_connect error in PayPal Ruby SDK
How to perform a specific process when the back button is pressed in Android Fragment
Fixed the phenomenon that vuetify built in Rails is not loaded when page transition is done
What to do when Rails on Docker does not reflect controller changes in the browser
[Rails] How to temporarily save the request URL of a user who is not logged in and return to that URL after logging in
The story when the test folder was not created in Rails
How to set chrony when the time shifts in CentOS7
The idea of cutting off when the error is not resolved
[Rails] When the layout change of devise is not reflected
How to get the log when install4j does not start
[Rails] How to display information stored in the database in view
[Rails] What to do when the error No database selected and Unknown database appears in db: migrate
[Programming beginner] What to do when rails s becomes an error in the local development environment
How to solve the problem that the website image is not displayed after deploying to heroku on Rails 5
[Note] What to do if bundle install in Chapter 3 of the rails tutorial is not possible
What to do if the app is not created with the latest Rails version installed when rails new
Method definition location Summary of how to check When defined in the project and Rails / Gem
[Rails / Routing] How to refer to the controller in the directory you created
How to deal with 405 Method Not Allowed error in Tomcat + JSP
[Rails] What to do if data is not registered in DB
What to do when the changes in the Servlet are not reflected
The repository ... is not signed error in docker build apt-get update
I tried to understand how the rails method "redirect_to" is defined
[jOOQ] How to CASE WHEN in the WHERE / AND / OR clause
What to do if Cloud9 is full in the Rails tutorial
I tried to understand how the rails method "link_to" is defined
[Rails] PG :: DuplicateTable: ERROR: relation "users" How to resolve already exists
[Rails] How to reset the database in production environment (Capistrano version)
[Rails 5] How to display the password change screen when using devise
[RSpec] When you want to use the instance variable of the controller in the test [assigns is not recommended]
[Rails] How to solve the problem that the default image is overwritten when editing without uploading the image [Active Storage]
[Ruby on Rails] When logging in for the first time ・ How to split the screen in half using jQuery
What to do if Operation not permitted is displayed when you execute a command in the terminal