Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

newrelic_rpm,rails gem showing no route in development

i need to check the performance of my rails application. i installed newrelic_rpm. In environment.rb , the following added:

config.gem "newrelic_rpm"

then, in browser i gave:

http://localhost:3000/newrelic

then, it shows the error message as below:

Routing Error No route matches "/newrelic" with {:method=>:get}

Can you please help me to solve this..

Thanks in advance...

like image 737
jissy Avatar asked Mar 25 '11 11:03

jissy


1 Answers

I'm guessing my issue is related to running thin (and other processes) through foreman in development. I added the following to get the routing and monitoring working:

config/environments/development.rb

require 'new_relic/rack/developer_mode'
config.middleware.use NewRelic::Rack::DeveloperMode
ENV['NEWRELIC_ENABLE'] = 'true'

Setting ENV['NEWRELIC_ENABLE'] = 'true' may monitor stuff when you would rather it didn't (rake tasks etc...)

like image 87
Duncan Stewart Avatar answered Sep 29 '22 13:09

Duncan Stewart