From 317f465542116f4ef6af710120465ba0a8d951bd Mon Sep 17 00:00:00 2001 From: Matilda Smeds Date: Fri, 19 Oct 2018 19:20:04 +0300 Subject: Remove "Upgrading Old Versions" from Asset Pipeline Guide [skip ci] * How to upgrade Rails 2.x/3.2 not relevant for this Guide * All configuration changes are already included in Upgrading Ruby on Rails Guide --- guides/source/asset_pipeline.md | 57 ----------------------------------------- 1 file changed, 57 deletions(-) (limited to 'guides/source/asset_pipeline.md') diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md index 66cf9da33b..faf5f7e1ca 100644 --- a/guides/source/asset_pipeline.md +++ b/guides/source/asset_pipeline.md @@ -1234,60 +1234,3 @@ it as a preprocessor for your mime type. Sprockets.register_preprocessor 'text/css', AddComment ``` -Upgrading from Old Versions of Rails ------------------------------------- - -There are a few issues when upgrading from Rails 3.0 or Rails 2.x. The first is -moving the files from `public/` to the new locations. See [Asset -Organization](#asset-organization) above for guidance on the correct locations -for different file types. - -Next is updating the various environment files with the correct default -options. - -In `application.rb`: - -```ruby -# 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" -``` - -In `development.rb`: - -```ruby -# Expands the lines which load the assets -config.assets.debug = true -``` - -And in `production.rb`: - -```ruby -# Choose the compressors to use (if any) -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 - -# Precompile additional assets (application.js, application.css, and all -# non-JS/CSS are already added) -# config.assets.precompile += %w( admin.js admin.css ) -``` - -Rails 4 and above no longer set default config values for Sprockets in `test.rb`, so -`test.rb` now requires Sprockets configuration. The old defaults in the test -environment are: `config.assets.compile = true`, `config.assets.compress = false`, -`config.assets.debug = false` and `config.assets.digest = false`. - -The following should also be added to your `Gemfile`: - -```ruby -gem 'sass-rails', "~> 3.2.3" -gem 'coffee-rails', "~> 3.2.1" -gem 'uglifier' -``` -- cgit v1.2.3