在Rails 3,专门用于在资产管道生成资产宝石被妥善安置在该assets
组的Gemfile的:
...
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
end
现在,根据(仍在进行中) 升级文档 :
Rails的4.0移除资产组从Gemfile中。 你需要升级时从您的Gemfile中删除了这一行。
果然,做一个新的项目,RC1产生一个Gemfile中与任何组之外默认包含与资产相关的宝石:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0.rc1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0.rc1'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
...
这是否意味着这些宝石生产建立在默认情况下,现在将被捆绑? 如果是这样,为什么心脏的变化? 被轨道4走向动态生成的生产资产?