Turbo-sprockets-rails3 do not support proper rollback deployment
Turbo sprockets seem to fail in the following case:
- Make some changes to the existing css file on the branch.
- Launched assets: rake problem precompilation.
- The css file will be compiled by this gem.
- Now check / rollback to old commit after which the css file was changed.
- Running the pre-compile task will not compile the css file and it still contains the changes made to the css file in the subsequent commit.
Expected result . The css file needs to be compiled again as it was restored to its previous state.
EDIT: Relevant code from app .rb
#for PDF
config.middleware.use PDFKit::Middleware, :print_media_type => true
# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
config.middleware.use I18n::JS::Middleware
config.sass.preferred_syntax = :sass
config.generators.stylesheet_engine = :sass
config.generators.template_engine = :slim
config.cache_store = :file_store, "tmp/cache" # specifying the cache store to file_store with the default tmp/cache dir
## Append path to the end of routes file to catch routing errors specifically.
config.after_initialize do |app|
app.routes.append{ match '*a', :to => 'application#error_404' } unless config.consider_all_requests_local
end
from environments /production.rb:
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
# Disable Rails static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
+3
source to share