def init_config(options={})
@config = options[:config]
if rails_config && ::Rails.configuration.respond_to?(:after_initialize)
rails_config.after_initialize do
DependencyDetection.detect!
end
end
if !Agent.config[:agent_enabled]
::NewRelic::Agent.logger.info("New Relic Agent not running.")
else
install_developer_mode(rails_config) if Agent.config[:developer_mode]
install_browser_monitoring(rails_config)
install_agent_hooks(rails_config)
end
rescue => e
::NewRelic::Agent.logger.error("Failure during init_config for Rails. Is Rails required in a non-Rails app? Set NEW_RELIC_FRAMEWORK=ruby to avoid this message.",
"The Ruby agent will continue running, but Rails-specific features may be missing.",
e)
end