views:

45

answers:

2

Hi

i have been trying to change the homepage of my app for over and hour and searched the net but cant find anything, i have map.root :controller => "welcome" set in the routes.rb file and i have deleted the index.html.erb file in public and http://0.0.0.0:3000/ still takes me to the welcome to rails default page.

i have a welcome controller

class WelcomeController < ApplicationController
  layout 'general'

  def index
  end
end

and i have a index.html.erb file in the views/welcome directory but still wont work.

any ideas why?

thanks

+1  A: 

It sounds like you need to delete public/index.html

Generally, an html file in public will take priority over a Rails route.

The Who
its definitely deleted, i really don't get it, i even restarted the server and i have the same problem, do i have to delete it with a command or something?
Mo
@Mo you can make a search (like grep) to find where file you see comes from. Just search for some particular phrase.
Nikita Rybak
@nikita-rybak how do i use grep to search for a particular phrase? im not very familiar with linux, i only started using it because i started learning rails (which is about 3 days ago) :)thanks
Mo
A: 

I restarted my laptop and it worked. i really dont know why that was a problem. but thanks for all the comments.

Mo
That is because a change to routes.rb requires a restart in mongrel (unless you are on passenger).
Shripad K
It was probably a caching issue, which may have been fixed by restarting your browser.
Ryan Bigg
no i tried restarting the server and the browser but that didn't fix the issue at the time, it was only fixed after a complete system restart.
Mo