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.
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.
Add one line to your app's Gemfile.
And install it:
$ bundle install
Add these two lines to your environment.rb
config.gem 'code_buddy' config.middleware.use "CodeBuddy::ShowApp"
$ gem install code_buddy $ code_buddy start
Now open localhost:4567 and paste your stack.
To open the current file you're looking at in an editor press “e” it will open the current file in your current editor using the environment variable CODE_BUDDY_EDITOR or if that's not set EDITOR.
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.
If you find a problem or have an idea please create an issue or fork the project and send us a pull request.