No template for interactive request occurred while creating the app.
In the case of I No template for interactive request PagesController#index is missing a template for request formats: text/html
Met.
routes.rb
Rails.application.routes.draw do
resources :pages
root 'pages#index'
end
pagescontroller
class PagesController < ApplicationController
def index
end
end
The view file was also created in app / view / pages with index.html.haml, so I couldn't solve it because I didn't understand the cause.
PagesController # index is missing a template for request formats: text / html and the error statement called the html statement, but I had generated a haml file.
Renamed file from index.html.haml to index.html.erb
I was able to solve it with this
The poster wanted to use haml, but it seems that he had to install a gem called haml-rails to use haml.
gemfile
gem 'haml-rails'
You can now call the haml file.
It was painful that this solution alone took about an hour, so I try to do trial and error at faster intervals.
Recommended Posts