Conversation
Some of those gems (especially mini_racer) are very large, and it is useful to be able to skip them. They were already in a commented-out group; restore the group to allow skipping them (they will still be installed by default). Note that putting them in a group will mean they won't be auto-required when config/application.rb calls `Bundler.require(:default, Rails.env)`, but that should be fine. Also remove the old comment "not required in production environments by default" because it is unclear/inaccurate (we currently run the asset precompilation on the production server), and add hints on how to skip the group.
Holmes98
left a comment
There was a problem hiding this comment.
I'm not quite sure I fully understand why, but the assets group was removed in Rails 4:
- https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-3-2-to-rails-4-0-gemfile
- https://stackoverflow.com/questions/16406204/why-did-rails4-drop-support-for-assets-group-in-the-gemfile
- rails/rails@49c4af4
And this doesn't seem ideal, but we might be compiling some assets live in production mode; not sure if that could cause issues with this:
nztrain/config/environments/production.rb
Lines 59 to 60 in b084e51
|
Good catch, what a mess. Just wanted to skip some gems...
I hope that can be dealt with separately? (The gems will still be installed in production, just won't be auto-required by default; I'll try to confirm that live compilation still works with that change.) |
Feel free to merge this if you don't find any issues.
TODO: #250 (comment)
Some of those gems (especially mini_racer) are very large, and it is useful to be able to skip them. They were already in a commented-out group; restore the group to allow skipping them (they will still be installed by default).
Note that putting them in a group will mean they won't be auto-required when config/application.rb calls
Bundler.require(:default, Rails.env), but that should be fine.Also remove the old comment "not required in production environments by default" because it is unclear/inaccurate (we currently run the asset precompilation on the production server), and add hints on how to skip the group.