Closed jrochkind closed 6 years ago
Great pickup, and that is certainly a reasonable point of confusion.
What I've just done now is remove the :group => :test
option from the README, as I feel the config.ru
file is correct. The labels are confusing, though… in a Rails app, yes, your choices are usually between development, test, and production. In a gem, though, you're really considering runtime dependencies vs development dependencies (as defined in your gemspec file). The config.ru
is referring to development
in the latter context.
From the perspective of a Gemfile, though - all gems there can be considered development dependencies, as they're not in the gemspec, and thus cannot be considered runtime dependencies. So, no group label is required at all.
From the perspective of engine/gem coding, I think the right approach is to use the :default
and :development
Bundler groups - though I welcome feedback on situations where this shouldn't be the case!
Marking this as closed, but don't hesitate to add thoughts/suggestions if you'd like.
The README suggests
But the config.ru file generated has:
So if you try following README instructions to just
rackup
, you getuninitialized constant Combustion
. You either need to include combustion in thedevelopment
group, or change the line in theconfig.ru
toBundler.require :default, :development, :test
.I'm not sure if
:development
is really needed there, not sure if the line in config.ru should just beBundler.require :default, :test
? That seems to work too, not sure if when yourackup
you end up with RAILS_ENV development or test by default.