Skip to content

Commit

Permalink
Correcting Bundler.require in application.rb
Browse files Browse the repository at this point in the history
We had deviated from the standard Rails 3.2.x
Bundler.require directive. When we upgraded
to the latest version of bootstrap-sass,
Publisher deploys started failing during
assets precompilation:

govuk_setenv publisher bundle exec rake \
RAILS_ENV=production RAILS_GROUPS=assets \
assets:precompile

@alext pointed this out, and suggested this
change to keep configs consistent with other
Rails 3.2.x apps.
  • Loading branch information
Vinay Patel committed Sep 8, 2014
1 parent f20d95f commit 2bcd669
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
require "rails/test_unit/railtie"
require "sprockets/railtie"

# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end

module Publisher
class Application < Rails::Application
Expand Down

0 comments on commit 2bcd669

Please sign in to comment.