Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix "Exceptional::Config.load - no configuration file" error message

When Exceptional is used in development mode and configured with ENV vars only,
in development mode, above error message appears.

Exceptional::Config.should_send_to_api? should be called before laoding
the config file.
  • Loading branch information...
commit 5802175a4bf1f18560520d642a8eb98de208c138 1 parent f9a25f7
@keo keo authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 init.rb
View
8 init.rb
@@ -15,17 +15,17 @@
else
begin
- if (Rails::VERSION::MAJOR < 3)
- Exceptional::Config.load(File.join(RAILS_ROOT, "/config/exceptional.yml"))
+ if (Rails::VERSION::MAJOR < 3)
if Exceptional::Config.should_send_to_api?
+ Exceptional::Config.load(File.join(RAILS_ROOT, "/config/exceptional.yml"))
Exceptional.logger.info("Loading Exceptional #{Exceptional::VERSION} for #{Rails::VERSION::STRING}")
require File.join('exceptional', 'integration', 'rails')
require File.join('exceptional', 'integration', 'dj') if defined?(Delayed::Job)
end
else
- Exceptional::Config.load(File.join(Rails.root, "/config/exceptional.yml"))
-
+
if Exceptional::Config.should_send_to_api?
+ Exceptional::Config.load(File.join(Rails.root, "/config/exceptional.yml"))
Exceptional.logger.info("Loading Exceptional #{Exceptional::VERSION} for #{Rails::VERSION::STRING}")
Rails.configuration.middleware.use "Rack::RailsExceptional"
require File.join('exceptional', 'integration', 'dj') if defined?(Delayed::Job)
Please sign in to comment.
Something went wrong with that request. Please try again.