I have just installed Rails on window. I want to Show a message in view page by routing in routes.rb but message is not displayed. My rails version is 3.2.21 and ruby is 1.9.3p551
I have made a controller from command prompt rails generate controller welcome index
welcome_controller
class WelcomeController < ApplicationController
def index
end
end
routes.rb is
ProjectApp::Application.routes.draw do
get "welcome/index"
root to: 'welcome/index'
end
i have added root to: 'welcome/index'
and view template index.html.erb
<h1>`Hello Rails!`</h1>
When i go through url[http://localhost:3000/index] it should show Hello Rails as output but it is showing welcome board only
I have followed steps from http://guides.rubyonrails.org/getting_started.html