{"issue":{"state":"closed","pull_request":{"diff_url":"https://github.com/newrelic/rpm/pull/41.diff","html_url":"https://github.com/newrelic/rpm/pull/41","patch_url":"https://github.com/newrelic/rpm/pull/41.patch"},"user":{"avatar_url":"https://secure.gravatar.com/avatar/2d36f32e6280af5bb307cead90e3844f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2d36f32e6280af5bb307cead90e3844f","url":"https://api.github.com/users/lmars","login":"lmars","id":488515},"milestone":null,"assignee":null,"updated_at":"2011-11-08T21:15:48Z","labels":[],"comments":2,"closed_at":"2011-11-08T19:55:15Z","url":"https://api.github.com/repos/newrelic/rpm/issues/41","body":"This was causing NewRelic::Control to be instantiated (in the depends_on block) before Rails had initialized.\r\n\r\nDependencyDetection.detect! is called in the Rails#init_config method anyway so no need to call it here.\r\n\r\nI was unable to run the tests for this:\r\n\r\n```\r\nlewis@mac-local:~/github/rpm (master)$ rake test:newrelic \r\n(in /Users/lewis/github/rpm)\r\nrake aborted!\r\nDon't know how to build task 'environment'\r\n```","html_url":"https://github.com/newrelic/rpm/issues/41","number":41,"title":"Don't check dependencies in delayed_job_injection.rb if Rails is defined","id":2176356,"created_at":"2011-11-08T16:46:03Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/2d36f32e6280af5bb307cead90e3844f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2d36f32e6280af5bb307cead90e3844f","url":"https://api.github.com/users/lmars","login":"lmars","id":488515},"updated_at":"2011-11-08T21:15:48Z","url":"https://api.github.com/repos/newrelic/rpm/issues/comments/2673694","body":"Ok thanks.\r\n\r\nTwo reasons:\r\n\r\nBecause Rails hadn't initialised yet, `Rails.root` was not set, so super was being called in `NewRelic::Control::Frameworks::Rails3#root`, going to `NewRelic::Control::Frameworks::Rails#root` which referenced RAILS_ROOT which is deprecated.\r\n\r\nAlso, because `root` was incorrectly defined, `NewRelic::Control#config` was incorrect so `NewRelic::Control#initialize` was putting \"Cannot find or read ...\".\r\n\r\nI hate seeing output on my stderr, hence the witch hunt!\r\n\r\nLewis","id":2673694,"created_at":"2011-11-08T21:15:48Z"}}