Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rails 4.0.0.rc1 "rails new" generates old rails 3.0 style config/application.rb (Bundler.require) #10743

Closed
chrisbainbridge opened this issue May 23, 2013 · 2 comments

Comments

@chrisbainbridge
Copy link

"rails new x" generates x/config/application.rb containing:

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)

but http://guides.rubyonrails.org/asset_pipeline.html says:

If you use the assets group with Bundler, please make sure that your config/application.rb has the following Bundler require statement:

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

Instead of the old Rails 3.0 version:

# 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)
@rafaelfranca
Copy link
Member

This is a dup of #10449

@rafaelfranca
Copy link
Member

This is the pull request to fix it #10222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants