While watching the video of Ruby on Rails application production on YouTube, I will summarize it as a record because the title error occurred while learning in the local environment.
When implementing the logout function
ActionView::Template::Error: The asset "application.js" is not present in the asset pipeline
Upon examination, the cause was a different version of rails.
On the video, the development environment is
But in rails 6
The place was different.
In the view file head in ails 5.x
Since it is, I changed it as follows so that application.js can be loaded normally and solved it.
Since it was the first application production in the local environment, I didn't understand anything and executed
rails new [project name] according to the video, and started with the latest version.