rails/rails — pull request #6941 by marten (2012-07-03 10:29:02+00:00)
Title: Generate a complete Bundler.require(...) statement for plugins

The issue I encountered was that Rails mountable engines didn't work
correctly with SASS and the Asset Pipeline.

In my testcase, I have an engine that specifies some asset gem in its `foo.gemspec`. In the `lib/foo/engine.rb` it requires the gem. Then `application.css.scss` did:

@import 'file_from_gem';

That file would not be able to be found when trying out the engine
using the dummy application (`cd test/dummy && rails server`).

It *would* all work fine when the engine is tried out using a "full" Rails application as generated with `rails new fullapp`. Going over the diff between the generated test dummy and the full app, I found that changing the `Bundler.require` statement in `config/application.rb` fixed the issue, even though I'm not completely sure why.

TL;DR: The change in this commit fixes that @import statements that load css found in gems work correctly in the generated `test/dummy` application for Rails engines.