I got an ActionController :: MissingExactTemplate even though I have a file

ActionController::MissingExactTemplate

ActionController::MissingExactTemplate (Customer::TopController#index is missing a template for request formats: text/html):

I got this error. It's an error I sometimes see while developing with Rails. No suitable Template found. Error. Well let's deal with it as usual

I don't have a proper view for the controller action ... Let's check the action name of controller and the page name of view ... Did I make a mistake in the file name ...?

I'm not wrong. There is also a directory. Why?

Completed 406 Not Acceptable in 2ms Hmm? 406 error?

406 error I saw it for the first time

Solution

By the way, I used slim files instead of erb! Add the following to the Gemfile

gem "slim-rails"
gem "html2slim"
bundle install

Settled!! Missing Template comes out even in such a case. And I worshiped 406 error for the first time.

Solved safely for the time being

Recommended Posts

I got an ActionController :: MissingExactTemplate even though I have a file
I get a javax.mail.AuthenticationFailedException even though I haven't authenticated.
I got stuck in File
I want to create a Parquet file even in Ruby
[Unit test code] Even though I have a foreign key, I am told "Please enter XX"
I made an app to scribble with PencilKit on a PDF file
I have a question about Android studio.
I got a little more familiar with kaminari. Use kaminari_themes, generate config file