Berry Berry - 1 year ago 121
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

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download