1

I've just created a Rails project using Rails '~> 5.0.0', '>= 5.0.0.1' and whenever I try to debug it with binding.pry it freezes the whole application and also the terminal where I started the rails s command.

the gems I'm using are gem 'pry' gem 'pry-rails'

and also configure my applicaiton.rb with

console do
  require 'pry'
  config.console = Pry
end

The weirdest thing is that the terminal freezes as well... but no further log is printed on screen.

I do have my applicaiton wrapped in Docker but even if i'm running on docker or directly with rails s the behaviour is the same... it does look it stopped at the binding.pry on the code... but it doesn't show anywhere.

Do I have to do extra setup?

Fred Novack
  • 727
  • 9
  • 27
  • Sorry, but I didn't understand your question, you're trying to debug your application using pry, ok, but that behavior that you described *" try to debug it with `binding.pry` it freezes the whole application and also the terminal where I started the rails s command."* it's the expected behavior of the debugger, you've to write `continue` to your application continue normally through stack. – Otavio Henrique Aug 27 '18 at 02:10
  • the application.rb code you've posted should just change the type of console you get when you run `bundle exec rails console`. It sounds like you are getting what's expected. What happens if you write code in the terminal? `puts 3*4` and press enter? Does it output anything? What about a `whereami` command? – Stuart Aug 27 '18 at 15:34

0 Answers0