Full Rails plugin (Engine with dummy app) doesn't load Railties from gems in the spec #8229

Closed
rehevkor5 opened this Issue Nov 15, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@rehevkor5

Even if you add a railtie gem as a development dependency in the gemspec of a Rails plugin with "full" specified, it doesn't get set up properly in the dummy app that is used for things like rake.

For example, if you add rspec-rails, the spec tasks don't show inrake -T.

Fortunately, I believe the appropriate fix is easy: change line 15 of lib/rails/generators/rails/plugin_new/templates/rails/application.rb from:

Bundler.require

to:

Bundler.require(*Rails.groups)

Agree/disagree?

@senny

This comment has been minimized.

Show comment
Hide comment
@senny

senny Nov 18, 2012

Member

I confirmed the issue. I'll create a PR to fix it and start a discussion whether there is a reason to just do a Bundler.require

Member

senny commented Nov 18, 2012

I confirmed the issue. I'll create a PR to fix it and start a discussion whether there is a reason to just do a Bundler.require

senny added a commit to senny/rails that referenced this issue Nov 19, 2012

backport #8262, require bundler groups to include rake-tasks in engines
If you generate a full engine, this will include rake tasks from
your gem under the `app` namespace. For example if you have a dependency
on `rspec-rails` in your engine's `gemspec`. You will get the task `app:spec`

Closes #8229

Conflicts:

	railties/CHANGELOG.md
@rehevkor5

This comment has been minimized.

Show comment
Hide comment

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment