2010-12-11 6 views
5

안녕하세요 여러분 레일 난간에 몇 가지 문제가 있습니다. 웬일인지 루트 URL (localhost : 3000 /)을 적절한 위치로 라우팅 할 수 없습니다.레일 3 루트 루트 문제?

나는 새로운 앱을 만들고 "질문"모델을 생성하기 위해 비계를 사용했습니다.

Fbauth::Application.routes.draw do 
    resources :questions 
    root :to => 'questions#index' 
end 

레이크 경로 출력 :

(in /home/jsfour/rails3_apps/fbauth) 
    questions GET /questions(.:format)   {:action=>"index", :controller=>"questions"} 
       POST /questions(.:format)   {:action=>"create", :controller=>"questions"} 
new_question GET /questions/new(.:format)  {:action=>"new", :controller=>"questions"} 
edit_question GET /questions/:id/edit(.:format) {:action=>"edit", :controller=>"questions"} 
    question GET /questions/:id(.:format)  {:action=>"show", :controller=>"questions"} 
       PUT /questions/:id(.:format)  {:action=>"update", :controller=>"questions"} 
       DELETE /questions/:id(.:format)  {:action=>"destroy", :controller=>"questions"} 
     root  /(.:format)     {:controller=>"questions", :action=>"index"} 

문제는 여기에 내가는 "인덱스"행동이 내 코드는 여기 (비계에서 기본적으로)

을 존재 함을 확인할 수 있습니까? 왜 localhost : 3000/"레일 환영"메시지를 전 하죠?

+2

/public/index.html 파일을 삭제 했습니까? – jyoseph

답변

30

public/index.html을 삭제해야합니다. 루트 동작보다 우선합니다.

+0

와우 어떻게 그걸 잊었 어! 나는 내가 다시는 없을 것 같아. 감사! – jsfour

+0

젠장,이게 내 문제 야. 감사합니다 – notaceo

+0

이것이 작동했는데 이것이 왜 대답으로 받아 들여지지 않는지 궁금합니다 –