Berry Berry - 1 month ago 4x
Ruby Question

ruby on rails/Template is missing

I am a very beginner of using ruby on rails. I am trying to build my first full-stack app but I have an error of

Missing template tweets/index

Here is my controller:

Here is my view:

And here is my routes:

Rails.application.routes.draw do
root to: 'tweets#index'
get 'tweets', to: 'tweets#index'

I am really confused. Please help


From the tree view of your text editor, it looks like index.html.erb isn't inside the tweets folder. ie. It is on the same level as that of the tweets folder(outside it).

Move it to the tweets folder and it should work.