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:
rake gems:install
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
include ExceptionNotifiable
end
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
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/bd1ea7763627ed0d
missing config.gem
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/a9d17c908c0554b1/a333b212d99300ee
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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---