CodeBuddy

CodeBuddy makes it easy for you to understand the code behind each line of a Ruby exception stack. When something goes wrong during development and you get an exception do you read through the stack trace and start opening files in VIM or TextMate? With CodeBuddy the stack trace and source files are all available in your browser making it easy to understand what's going on.

See a Live Demo of CodeBuddy

Use it in your Rails app

Follow the instructions below to add CodeBuddy to your Rails 3 or Rails 2 app then the Rails exception page just got better.

Make sure you've set the config setting config.consider_all_requests_local=true (it should already be that way in development.rb). Now whenever you see a exception page you'll be able to click on the stack and see it inside CodeBuddy.

Rails 3

Add one line to your app's Gemfile.

gem 'code_buddy'

And install it:

$ bundle install

Rails 2

Add these two lines to your environment.rb

config.gem 'code_buddy'
config.middleware.use "CodeBuddy::ShowApp"

Run as a standalone app

$ gem install code_buddy
$ code_buddy start

Now open localhost:4567 and paste your stack.

Caveats

We haven't tested viewing a stack with Internet Explorer or running the Sinatra app on Windows.

We have tested with Rails 2.3 and Rails 3 on Ruby 1.8.7 and 1.9.2.

Contributors

Alex Rothenberg, Daniel Higginbotham, Pat Shaughnessy

If you find a problem or have an idea please create an issue or fork the project and send us a pull request.