Problem
There is no New Relic logfile in log/newrelic_agent.log.
Solution
If there is no newrelic_agent.log file, try the following steps to diagnose:
Verify that the agent is actually being required by your application:
- Ensure that the
newrelic_rpmgem line in yourGemfileis not marked withrequire: false, which prevents Bundler from requiring the gem. You can remove therequire: falsestatement, or you can manually control thenewrelic_rpmgem yourself by callingrequire 'newrelic_rpm'elsewhere in your code during application startup. - If the
newrelic_rpmgem is in a group within yourGemfile, ensure that group is being loaded in the environment to which you are deploying. - Ensure that the
newrelic_rpmline in yourGemfileis not wrapped in a conditional that evaluates to false in the environment to which you are deploying.
- Ensure that the
Make sure that the
logdirectory within your application's root directory exists and is writable by the user that your application is running as.Ensure the current working directory from which you start your app server processes is the same as the root directory for your app (that is, the current working directory should contain a
logdirectory).
For debugging purposes, it may be helpful to force the agent to be enabled and send its log output to STDOUT. To do this, set the environment variables NEW_RELIC_LOG=stdout and NEW_RELIC_AGENT_ENABLED=1 when starting your application server.