나는 레일 멍청한 녀석이고 나는 레일 생산 응용 프로그램을 가지고 있습니다. 더 신중한 배포 전 평가를하기 위해 나는 평소 사용 준비 버전 설정 :레일스에서 .scss 로깅 응용 프로그램 스테이징 버전에서 Heroku
$ heroku create --remote staging
$ git push staging master
$ heroku run rake db:migrate --remote staging
$ heroku open --remote staging
을하고 난 준비 응용 프로그램을 실행할 때 모든 CSS /하는 SCS 실행되지 제외하고 잘 보인다.
나는 무엇을 바라보고 있습니까 ?? [내 staging.rb이 동일] 여기
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Usrochr::Application.initialize!
내 production.rb 파일은 다음과 같습니다 :
여기 내 environment.rb에 파일입니다
Usrochr::Application.configure do
config.cache_classes = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = false
config.assets.compress = true
config.assets.compile = false
config.assets.digest = true
config.i18n.fallbacks = true
config.active_support.deprecation = :notify
end
에서 작동합니다 :
production.rb
에서 당신은 그런 자산을 긁어 자산 프리 Dconfig.assets.precompile += %w[ bootstrap/*.css bootstrap/*.js ]
에 의해 처리 추가css/j
의 파일을 얻을 수config.assets.precompile
를 사용할 수 있습니다. rb' 파일 –내 environment.rb 파일은 다음과 같습니다. – user2284821
어디에서? ... by your production.rb를 확인하십시오 ............'config.serve_static_assets = true' 또한 기본값으로 assets : 사전 컴파일은/vendor/assets에있는 css/js 파일을 처리하지 않습니다. production.rb에서 config.assets.precompile을 사용하여 자산 precompile'config.assets.precompile + = % w [bootstrap/*. css bootstrap/* .js]'에 의해 처리 된 추가 css/js 파일을 가져올 수 있습니다.'rake 자산 : 프리 컴파일 (precompile) '을 처리하여 영웅 (heroku)으로 작업하게됩니다. –