What is the difference (implementation wise) in pry gem and pry-rails gem?
Pry is a runtime developer console and IRB alternative with powerful introspection capabilities. Pry aims to be more than an IRB replacement. It is an attempt to bring REPL driven programming to the Ruby language.
Pry is a ruby gem that offers another interactive programming environment, a REPL, and like IRB, allows you to execute Ruby code in your terminal, where you can see and interact with the results.
Pry is like IRB on steroids Both IRB and Pry use REPL commands: Read, Evaluate, Print, and Loop. But Pry allows you to go further when debugging. For example, Pry gives you color-coded syntax, which helps when you're trying to figure out what will happen when code is executed.
Comparing their implementation doesn't make sense, because they're two different things: an IRb alternative and a plugin to make the former the Rails console.
The pry-rails gem simply adds an initializer to change the Rails console to Pry and adds some Pry commands specific to Rails. Pry-rails depends on Pry, and there's no reason you couldn't use Pry with Rails without pry-rails, it just makes it easier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With