Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy did Rails4 drop support for "assets" group in the Gemfile
    text
    copied!<p>In Rails 3, gems used exclusively to generate assets in the asset pipeline were properly placed in the <code>assets</code> group of the Gemfile:</p> <pre><code>... # 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 =&gt; :ruby end </code></pre> <p>Now, according to the (still in progress) <a href="http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-3-2-to-rails-4-0">upgrade documentation</a>:</p> <blockquote> <p>Rails 4.0 removed the assets group from Gemfile. You'd need to remove that line from your Gemfile when upgrading.</p> </blockquote> <p>Sure enough, making a new project with RC1 yields a Gemfile with asset-related gems included by default outside of any group:</p> <pre><code>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', '~&gt; 4.0.0.rc1' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '&gt;= 1.3.0' # Use CoffeeScript for .js.coffee assets and views gem 'coffee-rails', '~&gt; 4.0.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby ... </code></pre> <p>Does this mean these gems will now be bundled in production builds by default? If so, why the change of heart? Is Rails 4 moving towards the dynamic generation of assets in production?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload