Rails 4 Asset Pipeline not combining or minifying assets -
i started playing rails4 , can't asset pipeline work correctly. site loading fine in staging environment, except none of css or js being combined or minified in rails 3. there changed between versions?
here staging.rb environment file:
myapp::application.configure config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_assets = false config.assets.js_compressor = :uglifier config.assets.compile = false config.assets.digest = true config.assets.version = '1.0' config.log_level = :info config.cache_store = :dalli_store config.i18n.fallbacks = true config.active_support.deprecation = :notify config.log_formatter = ::logger::formatter.new end
this caused issue on side. somehow set environment variables on server 'development', never running staging file...
regarding @frandroid's answer, don't want set
config.assets.compile = true
as lazily compile assets in production. should make sure compiled during pushing of files server, or before hand, ensure greatest performance.
here's final staging.rb file:
myapp::application.configure config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.serve_static_assets = false config.assets.js_compressor = :uglifier config.assets.compile = false config.assets.digest = true config.assets.version = '1.0' config.log_level = :info config.cache_store = :dalli_store, env["memcachier_servers"].split(","), {:username => env["memcachier_username"], :password => env["memcachier_password"]} config.i18n.fallbacks = true config.active_support.deprecation = :notify config.log_formatter = ::logger::formatter.new end
Comments
Post a Comment