NullVoxPopuli
NullVoxPopuli

Reputation: 65183

Rails3: how do I set the root of my app to application#index?

I have views/application/index.html.erb

and in my routes file I have:

  root :to => "application#index"

And my ApplicationController is as follows:

class ApplicationController < ActionController::Base
  protect_from_forgery

  def index
    # ask whether teh player wants to go first or second
    @player_start_character = ""

      end
end

but when I nav to localhost:3000 it still says the "you have just started a rails app project" page

I also have deleted public/index.html

Upvotes: 4

Views: 2327

Answers (1)

Mauricio
Mauricio

Reputation: 5853

you have to remove the /public/index.html file

Upvotes: 6

Related Questions