Skip to content

Commit

Permalink
Explicitly scope calls to Rails.env and such to prevent loading issue…
Browse files Browse the repository at this point in the history
…s when manually requiring parts of airbrake.
  • Loading branch information
Sutto committed Nov 1, 2011
1 parent f12aa53 commit e608f46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/airbrake/railtie.rb
Expand Up @@ -2,7 +2,7 @@
require 'rails'

module Airbrake
class Railtie < Rails::Railtie
class Railtie < ::Rails::Railtie
rake_tasks do
require 'airbrake/rake_handler'
require "airbrake/rails3_tasks"
Expand All @@ -15,9 +15,9 @@ class Railtie < Rails::Railtie

config.after_initialize do
Airbrake.configure(true) do |config|
config.logger ||= Rails.logger
config.environment_name ||= Rails.env
config.project_root ||= Rails.root
config.logger ||= ::Rails.logger
config.environment_name ||= ::Rails.env
config.project_root ||= ::Rails.root
config.framework = "Rails: #{::Rails::VERSION::STRING}"
end

Expand Down

0 comments on commit e608f46

Please sign in to comment.