Я пытаюсь перейти на кедр / конвейер активов и что-то теряюсь.
Все отображается нормально, но мое приложение выглядит заметно медленнее. Просматривая свои бревна, я вижу тонны подобных вещей:
2012-03-15T17: 03: 02 + 00: 00 приложение [web.1]: кэш: [GET
/assets/application.js] miss 2012-03-15T17: 03: 02 + 00: 00 app [web.1]:
кеш: [GET /assets/down_arrow.gif] пропущен 2012-03-15T17: 03: 02 + 00: 00
приложение [web.1]: кеш: [GET /assets/application.css] miss
Я ожидаю, что это будут хиты - верно?
Моя продукция.рб
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# For nginx:
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# I also tried these
# config.action_dispatch.x_sendfile_header = "X-Sendfile"
# config.action_dispatch.x_sendfile_header = nil
config.cache_store = :dalli_store
Мое приложение.rb
...
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
config.assets.initialize_on_precompile = false
config.active_support.deprecation = :log
Примечание: assets:precompile
отлично работает при развертывании:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
-----> Rails plugin injection
Injecting rails_log_stdout
Injecting rails3_serve_static_assets
Спасибо! Дайте мне знать, если вам нужна дополнительная информация