0
votes
  • I have deleted public/index.html.
  • Here is my config/routes.rb
  • Those all I have in that file

    map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' map.root :controller => "home"

  • I've also tried using map.root :controller => "home#index"

  • when I ran rake to check $ rake routes

    (in /var/www/atlantix) /:controller/:action/:id
    /:controller/:action/:id.:format root / {:controller=>"home", :action=>"index"}

  • I also have:

    app/views/home/index.html.erb app/controllers/home_controller.rb

  • My issue:

I am a complete newbie of ROR. I am using Apache and Ruby 1.8. When I navigate to the http://localhost/myapp/, I do not see the new home page I created. Am I missnig something critical in my setup and configuration. Please advise & help

1

1 Answers

3
votes

Mmmm you seem to mix Rails 2 syntax. In Rails 3 you should write:

root :to => 'home#index'

Note: you should also delete the index.html from the public folder.

More information concerning routing can be found here.