레일 애플리케이션이있어서 로컬 아파치 서버에 바로 배포를 시도합니다.레이크 애셋을 사용하여 레일스 애플리케이션의 모든 CSS를 사전 컴파일 할 수 없습니다. 프리 컴파일
나는 rake assets:precompile
명령을 사용했지만 CSS, 자바 스크립트 파일을 미리 컴파일하려고 시도했지만 오류가 발생하지 않았습니다.
그러나 localhost를 통해 웹 사이트에 액세스 할 수 없으며 제작 로그 파일을 검사했습니다.
오류 :
ActionView :: 템플릿 :: 오류 (scaffolds.css이 미리 컴파일되지 않음) : 3 : 4 : Pragprog 온라인 스토어 5 : 6 : <퍼센트 = stylesheet_link_tag " "%"-> 8 : < % = stylesheet_link_tag "페이지 매김"%> 7 : < % = stylesheet_link_tag "저장소", : media => "모두"%> -> app/views/layouts/application. html.erb : 6 : in `_app_views_layouts_application_html_erb__1763484413904368549_ 70243433398420 '
scaffolds.css를 명령으로 미리 컴파일 할 수없는 것 같습니다.
설정을 config.assets.compile = true
으로 변경했으며 웹 사이트가 작동합니다. :) 하지만 그 명령이 그 css를 미리 컴파일 할 수없는 이유를 알고 싶습니다.
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w(search.js)
단순히 미리 컴파일 추가 자산을 지정하려면이 옵션을 사용하여, 예를 들면 : 아마 아직도 주석 (사용중인 또는 어떤 환경) 당신의 production.rb에서이 라인 밖으로
는
Rails는 scaffold.css를 알려주지 않았기 때문에 사전 컴파일을 시도하지 않습니다. –
가능한 복제본 http://stackoverflow.com/questions/7510920/asset-pipeline-trouble-on-deploying-my-rails-3-1-application-with-capistrano – AnkitG