dimanche 12 mars 2017

Ruby on Rails can't set my default index when running the localhost

I am using Rails 5.0.2 and Ruby 2.3.3 version. I created a controller using this command.

rails generate controller welcome index

It runs successfully. enter image description here

I'm trying to use the index.html.erb as my default route when the localhost:3000 is called in the url. So in routes.rb file I added the name of the controller action I created

root 'welcome#index'

In which also I checked it exists when I run the command

rake routes

But when I call the localhost:3000 using the changes I did it shows the following error.

enter image description here

How can I fix this? Are there any files I should edit if I change the routes.rb?

Aucun commentaire:

Enregistrer un commentaire