2011-11-12 5 views
2

스타일 시트 폴더와 이미지 폴더에 CSS를 넣었습니다. 이 두 폴더는 모두 내 레일 응용 프로그램의 공용 폴더에 있습니다. 그러나 계속해서 이러한 오류가 발생합니다.RoR 라우팅 오류

Started GET "/assets/blueprint/print.css" for 127.0.0.1 at Sat Nov 12 07:36:49 -0500 2011 
Served asset /blueprint/print.css - 404 Not Found (2ms) 

ActionController::RoutingError (No route matches [GET] "/assets/blueprint/print.css"): 


Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.3ms) 


Started GET "/assets/custom.css" for 127.0.0.1 at Sat Nov 12 07:36:49 -0500 2011 
Served asset /custom.css - 404 Not Found (2ms) 

ActionController::RoutingError (No route matches [GET] "/assets/custom.css"): 


Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.4ms) 


Started GET "/assets/logo.png" for 127.0.0.1 at Sat Nov 12 07:36:49 -0500 2011 
Served asset /logo.png - 404 Not Found (3ms) 

ActionController::RoutingError (No route matches [GET] "/assets/logo.png"): 

내가 뭘 잘못하고 있니? 감사.

답변

2

3.1을 사용하고있는 것 같습니다. stylesheet 및 js 파일을 assets 디렉토리 아래에 놓습니다. 자산 파이프 라인 사용 방법 섹션을 참조하십시오.

+0

감사합니다. 이제 작동하지만 콘솔에 다음과 같이 기록됩니다. "Served asset /custom.css - 304 Not Modified (0ms)". 304가 어떤 종류의 오류입니까, 아니면 정상입니까? 다시 한번 감사드립니다. – 0xSina

+1

걱정할 필요가 없습니다. 리소스가 마지막으로 서비스 된 이후로 변경되지 않았 음을 의미합니다. http://www.checkupdown.com/status/E304.html – chrispanda

+1

리소스가 제공하지 않는 정보 일뿐입니다. 캐시를 사용할 수 있으므로 [HTTP 상태 코드] (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)를 참조하여 304를 검색하십시오. – mliebelt