Project

code_buddy

0.02
No commit activity in last 3 years
No release in over 3 years
See the Ruby code running in your app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.3.2
~> 0.10.0
~> 0.9.10
~> 0.8.7
~> 2.3.0

Runtime

~> 0.9
>= 0
~> 1.1
 Project Readme

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.

Open file in text editor¶ ↑

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.

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.