I'm updating an app and wanted to install rspec.
After installing the gem into the system I added:
config.gem "rspec-rails", :lib => "spec"
to config/environment.rb and ran:
However the install does not complete because my initializer is not run.
In my initializer I defined a constant: EXCEPTION_NOTIFIER_CONFIGS_EXISTS that is used in application.rb.
Changing the code in application.rb to this works:
if defined? EXCEPTION_NOTIFIER_CONFIGS_EXISTS && EXCEPTION_NOTIFIER_CONFIGS_EXISTS
In general a task that installs a gem shouldn't need to rely on much.
Threads that partially relate to to this are here:
Initializers aren't run on gem dependency failure
However I am not trying to deal with optional gems or continue my application with missing gems -- just trying to install a gem into vendor/gems.