在Rails 3中,專門用于在資產(chǎn)管道中生成資產(chǎn)的gem被正確放置在assetsGemfile組中:...# 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 => :rubyend現(xiàn)在,根據(jù)(仍在進行中的)升級文檔:Rails 4.0從Gemfile中刪除了資產(chǎn)組。升級時,您需要從Gemfile中刪除該行。當(dāng)然,使用RC1進行新項目會產(chǎn)生一個Gemfile,其中默認(rèn)包含任何組之外的資產(chǎn)相關(guān)的gem: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 Recordgem 'sqlite3'# Use SCSS for stylesheetsgem 'sass-rails', '~> 4.0.0.rc1'# Use Uglifier as compressor for JavaScript assetsgem 'uglifier', '>= 1.3.0'# Use CoffeeScript for .js.coffee assets and viewsgem 'coffee-rails', '~> 4.0.0'# See https://github.com/sstephenson/execjs#readme for more supported runtimes# gem 'therubyracer', platforms: :ruby...這是否意味著這些寶石現(xiàn)在將默認(rèn)捆綁在生產(chǎn)版本中?如果是這樣,為什么會改變主意?Rails 4是否正在朝著生產(chǎn)中動態(tài)生成資產(chǎn)的方向邁進?
為什么Rails4在Gemfile中放棄對“資產(chǎn)”組的支持
函數(shù)式編程
2019-12-21 10:57:04