return unless Rails.application.server? || Rails.application.console? require_relative '../../lib/monkey_patches/monkey_patcher' MonkeyPatcher.run do |patch| case patch when 'action_dispatch/middleware/debug_exceptions.rb' then Rails.application.server? when 'rails_live_reload/watcher.rb' then Rails.application.server? && Rails.env.development? when /^semantic/ then true else false end end