在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ù)(仍在進(jìn)行中的)升級(jí)文檔:Rails 4.0從Gemfile中刪除了資產(chǎn)組。升級(jí)時(shí),您需要從Gemfile中刪除該行。當(dāng)然,使用RC1進(jìn)行新項(xiàng)目會(huì)產(chǎn)生一個(gè)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)版本中?如果是這樣,為什么會(huì)改變主意?Rails 4是否正在朝著生產(chǎn)中動(dòng)態(tài)生成資產(chǎn)的方向邁進(jìn)?
為什么Rails4在Gemfile中放棄對(duì)“資產(chǎn)”組的支持
函數(shù)式編程
2019-12-21 10:57:04