Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Template is missing ruby-on-rails

localhost says that template is missing. routes.rb:

 Rails.application.routes.draw do

     root 'home#index'

     resources :sessions,      only: [:new, :create, :destroy]

     get    'signup'   => 'users#new'
     get    'signin'   => 'sessions#new'
     delete 'signout'  => 'sessions#destroy'
     get    'about'    => 'static_pages#about'

     match '*path' => 'application#routing_error', via: :all

 end

nothing in my home_controller.rb

any idea to fix this?

like image 440
user5311019 Avatar asked May 12 '26 17:05

user5311019


1 Answers

You probably already have a home folder under view. If not, create the folder. Then add a index.html.erb with a heading like this:

 <h1>Welcome!</h1>

hope this helps

edit You should define and index method too! (not necessary)

like image 57
Yahs Hef Avatar answered May 14 '26 08:05

Yahs Hef



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!