vendredi 28 octobre 2022

StoreController#index is missing a template for request formats: text/html

It is showing me "StoresController#pages is missing a template for request formats: text/html" even though everything is correct, I added navbar and devise and simple forms and it was working perfectly fine in morning (about 7 hours ago), then now when i start the server it shows this error! any fixes??

stores_controller.rb

class StoresController < ApplicationController
  def index
  end
end

views/stores/index.html.erb

<h1>Store#index</h1>
<p>Find me in app/views/store/index.html.erb</p>

config/routes.rb

Rails.application.routes.draw do
  devise_for :users, controllers: { registrations: 'registrations' } 

  devise_scope :user do
    get '/users/sign_out' => 'devise/sessions#destroy'
  end

  root 'store#index'

end

Screenshot

I tried restarting the server multiple times with different terminals, with VScode and with Git Bash both, but it didn't work and it shows the same error!

Morning it was working absolutely fine and i even added devise, simple_form and added navbar and it was working, then after 7 hours now when i started the server,it is showing me this error

Aucun commentaire:

Enregistrer un commentaire