Created
October 26, 2011 18:15
-
-
Save kalupa/1317217 to your computer and use it in GitHub Desktop.
Upgrade to Rails 3.0 Asset Pipeline - 3.1 defaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' | |
# Change the path that assets are served from | |
# config.assets.prefix = "/assets" | |
if defined?(Bundler) | |
# If you precompile assets before deploying to production, use this line | |
Bundler.require *Rails.groups(:assets => %w(development test)) | |
# If you want your assets lazily compiled in production, use this line | |
# Bundler.require(:default, :assets, Rails.env) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not compress assets | |
config.assets.compress = false | |
# Expands the lines which load the assets | |
config.assets.debug = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do | |
gem 'sass-rails', "~> 3.1.0" | |
gem 'coffee-rails', "~> 3.1.0" | |
gem 'uglifier' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compress JavaScripts and CSS | |
config.assets.compress = true | |
# Choose the compressors to use | |
# config.assets.js_compressor = :uglifier | |
# config.assets.css_compressor = :yui | |
# Don't fallback to assets pipeline if a precompiled asset is missed | |
config.assets.compile = false | |
# Generate digests for assets URLs. | |
config.assets.digest = true | |
# Defaults to Rails.root.join("public/assets") | |
# config.assets.manifest = YOUR_PATH | |
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) | |
# config.assets.precompile += %w( search.js ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment