Topic: How to call index html page

Hello,

I am new to RoR and trying to create my website.
But here i am facing an issue while working on the same, what  i am trying to do i have index.html page having html code which i need to be call as index page of my app.

I rename this page as index.html.erb and place under app/views and created controller home/index but failed to call on browser as this is giving Mysql Connection error and i am not using db with this page right now.

Please help me on this, is this a right way i am doing.

Re: How to call index html page

I'm not sure if I understand your question fully, but it sounds like you needed to change the root in your routes.rb file.

Re: How to call index html page

I have a index.html page and i want to create a controller to call this index.html as index page of my app.

Re: How to call index html page

Hello

1 - Delete index.html from 'public' folder
2- In config/routes.rb add the line :

root :to => 'home#index'

Now in your browser if you type localhost:3000/ you should reach your index.html.erb page as expected...

I recommend to read a bit before diving in Rails, and follow some tutorials to understand what's happen, when and why...
Some very useful resources :
railscasts.com
http://guides.rubyonrails.org/
http://net.tutsplus.com/category/tutorials/ruby/
http://ruby.railstutorial.org/

Cheers

Re: How to call index html page

Thanks..this works for me.
Thanks for your help....