Hey,
I'm building a Rails engine that uses activeadmin that, in turn, installs an initializer. When the initializer runs, it supposes that the top-level module, ActiveAdmin is already loaded.
Here are the relevant snippets:
config/initializers/active_admin.rb:
ActiveAdmin.setup do |config|
Gemfile:
myapp.gemspec:
s.add_dependency "rails", "~> 3.2.13"
s.add_dependency "activeadmin", "~> 0.5.1"
s.add_development_dependency "sqlite3"
s.add_development_dependency "debugger", "~> 1.5.0"
s.add_development_dependency "rspec-rails", "~> 2.13.0"
s.add_development_dependency "capybara", "~> 2.1.0"
It then breaks, because it is not. Looking at how Bundler loads dependencies, I realized that when the Gemfile contains a `gemspec` line, it only loads the gems that are defined with `add_development_dependency`.
I wonder what the reasoning behind this is. Is there a best practice or some consideration I'm not aware of?
Thank you,
Balint