Skip to content

Instantly share code, notes, and snippets.

@JoseJRVazquez
Created April 3, 2014 20:45
Show Gist options
  • Save JoseJRVazquez/9962549 to your computer and use it in GitHub Desktop.
Save JoseJRVazquez/9962549 to your computer and use it in GitHub Desktop.
Working on deploying to new relic as it is the first time I have used it, but have heard about it for the last year.
it started with entering from the command line within the app director the following code
$ heroku addons:add newrelic:stark
at first it wouldnt perform the add on: however after I verified by using my credit card it worked out fine.
The following was the output.
Joses-MacBook-Air:first-app JRV$ heroku addons:add newrelic:stark
Adding newrelic:stark on sheltered-fjord-5144... failed
! Please verify your account to install this add-on plan
! For more information, see http://devcenter.heroku.com/categories/billing
! Verify now at https://heroku.com/verify
Joses-MacBook-Air:first-app JRV$ heroku addons:add newrelic:stark
Adding newrelic:stark on sheltered-fjord-5144... done, v7 (free)
Use `heroku addons:docs newrelic` to view documentation.
Joses-MacBook-Air:first-app JRV$
After realizing I would have to alter my code again, I made a git branch named 'relic' and made the changes.
I then had to configure my app to use New Relic by adding the gemfile
gem 'newrelic_rpm'
I then had to use the BUNDLE command to bundle inthe new gem, and then installed the config file for new relic
$ curl https://gist.githubusercontent.com/rwdaigle/2253296/raw/77d7c35712a14cb482e67bc8ed47b25e85fa8f07/newrelic.yml > config/newrelic.yml
Three commands to save it all together
$ git add .
$ git commit -m 'Installed the New Relic gem'
$ git push heroku master
Finally I set the name of the app on new relic
Joses-MacBook-Air:first-app JRV$ heroku config:set NEW_RELIC_APP_NAME="first-app"
Setting config vars and restarting sheltered-fjord-5144... done, v9
NEW_RELIC_APP_NAME: first-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment