Remote debugging / pry + pow

Posted on 5 grudnia 2014

If you want to debug Ruby application and you are using pow you might bump into connection issue.


$ pry-remote

/usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:736:in `rescue in block in open': druby://127.0.0.1:9876 - # (DRb::DRbConnError)
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:730:in `block in open'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:729:in `each'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:729:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:1191:in `initialize'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:1171:in `new'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:1171:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:1087:in `block in method_missing'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:1105:in `with_friend'
from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/drb/drb.rb:1086:in `method_missing'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/pry-remote-0.1.8/lib/pry-remote.rb:289:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/pry-remote-0.1.8/bin/pry-remote:4:in `'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/pry-remote:23:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/pry-remote:23:in `

'

Solution is to create file „.prv” containing:

Pry.config.correct_indent = false
Pry.config.auto_indent = false