Below are steps I followed to get ruby debugger ruby-debug
running with Pow. Based on info from this thread basecamp/pow#43 and this blog post http://flochip.com/2011/04/13/running-pow-with-rdebug/
Assuming you're writing your app in Ruby 1.9 and using Bundler, just add the dependency to your development gems:
group :development do
gem 'ruby-debug19', require: 'ruby-debug'
end
Add the following to config/environments/development.rb
# Always run remote debugger in development mode.
require 'ruby-debug'
Debugger.start_remote
Debugger.settings[:autoeval] = true
puts "=> Debugger enabled"
rdebug -c
def create
@post = Post.find(params[:post_id])
debugger
@comment = @post.comments.create(params[:comment])
redirect_to post_path(@post)
end
- Ruby Debugger gist by Jeff Casimir: https://gist.github.com/1094309
- Debugging with ruby-debug by Ryan Bates: http://railscasts.com/episodes/54-debugging-with-ruby-debug
Works for me. Just what I needed. As an FYI for anybody else using Rails 3.2 you can just use gem 'debugger', :require => 'debugger' in Bundler.