Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

pry with capybara-webkit #522

Closed
rweng opened this issue May 7, 2013 · 4 comments
Closed

pry with capybara-webkit #522

rweng opened this issue May 7, 2013 · 4 comments

Comments

@rweng
Copy link

rweng commented May 7, 2013

Hi,

as far as I understand it, where Rack::Test runs single threaded, capybara-webkit starts a second thread. When doing normal requests binding.pry works fine. However, when the request is posted via javascript, the binding.pry doesn't trigger. RubyMine even crashes.

How do you guys debug the controller action that is triggered via JavaScript?

Thanks,
Robin

@jferris
Copy link
Member

jferris commented May 7, 2013

JavaScript drivers use threads, so that may be what's tripping you up. I did a quick Google search for pry and threads and found a few things that look promising: http://tim.theenchanter.com/2010/01/getting-ruby-to-use-readline-instead-of.html

Can you check what your Ruby was compiled against?

@rweng
Copy link
Author

rweng commented May 13, 2013

I am quite sure that it is installed with readline support. At least when starting up irb, I can use features like arrow up to get to the last command. In addition, I've had readline installed via brew and my ruby contains an ext/readline dir: ~/.rvm/src/ruby-2.0.0-p0/ext/readline. Also, everything works fine with a "normal" request: If putting a binding.pry in an action and navigating there I get a pry promt. The error only occurs when using JavaScript to make the request.

I'll setup a demo as soon as I get to it.

@mikegee
Copy link

mikegee commented Jan 13, 2014

Looks like pry fixed this. see: pry/pry#944

@jferris
Copy link
Member

jferris commented Jan 13, 2014

@mikegee thanks.

@jferris jferris closed this as completed Jan 13, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants