What is the difference (implementation wise) in pry gem and pry-rails gem?
Asked
Active
Viewed 2,465 times
10
-
usually the -rails gems provide extra things for integration with rails, so if from rails, you typically use these. – bento Jul 29 '12 at 14:09
1 Answers
14
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.

Andrew Marshall
- 95,083
- 20
- 220
- 214
-
-
-
-
@AlanCoromano place `binding.pry` anywhere in your Rails code to add a breakpoint e.g. in a controller action. Go to that path in the browser and you'll see the breakpoint in the terminal where `rails server` is running. Here's a screencast to learn more about it http://railscasts.com/episodes/280-pry-with-rails – DiegoSalazar Sep 15 '16 at 15:41