Skip to content

Commit

Permalink
Merge pull request #1972 from DMPRoadmap/feature/rollbar
Browse files Browse the repository at this point in the history
Fix rollbar loading when optionally included
  • Loading branch information
briri committed Oct 30, 2018
2 parents 7f226ed + c643f03 commit 8c4c9cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 7 additions & 1 deletion config/application.rb
@@ -1,7 +1,6 @@
require File.expand_path('../boot', __FILE__)

require 'rails/all'
#require 'devise'
require 'recaptcha/rails'
require 'csv'

Expand All @@ -17,6 +16,13 @@
#Changed when migrated to rails 4.0.0
Bundler.require(*Rails.groups)

begin
# If Rollbar has been included in the Bundle, load it here.
require "rollbar"
rescue LoadError => e
# noop
end

module DMPRoadmap
class Application < Rails::Application

Expand Down
7 changes: 0 additions & 7 deletions config/initializers/rollbar.rb
@@ -1,12 +1,5 @@
# frozen_string_literal: true

begin
# If Rollbar has been included in the Bundle, load it here.
require "rollbar"
rescue LoadError => e
# noop
end

if defined?(Rollbar)
Rollbar.configure do |config|
# Without configuration, Rollbar is enabled in all environments.
Expand Down

0 comments on commit 8c4c9cd

Please sign in to comment.