There is no index.html file in public folder

87 views
Skip to first unread message

Furqan Ahmad

unread,
Nov 28, 2016, 5:19:29 PM11/28/16
to Ruby on Rails: Talk
i am new in ruby and just developing my first app, i am following a tutorial on youtube, when i run the server by localhost:3000 it shows me "Yay! You’re on Rails!". i don't know how to route it to index.html file in my home where i start developing my app. please need help i am new here.

here is my routes.rb file


Rails.application.routes.draw do
get 'home/index'

For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html

end

Yinka Ash a.k.a Netguru

unread,
Nov 28, 2016, 7:22:13 PM11/28/16
to Ruby on Rails: Talk
You have to create a home controller and set your root_path in the routes.rb to root 'home#index'i

Hope this helps.

Colin Law

unread,
Nov 29, 2016, 2:37:34 AM11/29/16
to Ruby on Rails: Talk
On 28 November 2016 at 18:23, Furqan Ahmad <faa...@gmail.com> wrote:
i am new in ruby and just developing my first app, i am following a tutorial on youtube, when i run the server by localhost:3000 it shows me "Yay! You’re on Rails!". i don't know how to route it to index.html file in my home where i start developing my app. please need help i am new here.

I suggest working through the tutorial at railstutorial.org which will give you a good introduction to rails and is free to use online.

Colin
 
Reply all
Reply to author
Forward
0 new messages