Airbrake, Rails and Heroku
Setting up new Rails Project with Airbrake
Step 1: Install Rails
Step 2: Create a new Rails app
Heroku apps use postgresql so be sure to add
--database=postgresql when you
create your Rails app.
Step 3: Add airbrake to the Gemfile and install
Step 4: Sign up for Airbrake and create a project
Sign up for Airbrake and create a project for your Rails
app. After your Airbrake project has been created you will need it’s
PROJECT_KEY to generate your Airbrake config.
If your configuration was successful and the test error was sent correctly you should see a locate link at the bottom of the output:
you can view your error in the Airbrake dashboard by following the locate link.
If you would like to test your Airbrake config/setup, run the following rake command from your local environment:
Deploying to Heroku (without the addon)
Step 1: initialize your project with git
Starting from where we left off–in the
airbrake_rails_test directory from
above. Make a local git repo:
Step 2: Then create the heroku app:
Step 3: And push your code to heroku:
Step 4: Test your Airbrake setup on heroku
run this rake command to send a test exception from your heroku app:
visit the locate link near at the bottom of the command’s output to see your error in Airbrake.