$ irb
rbenv: pry: command not found
The `pry' command exists in these Ruby versions:
2.3.1
I was having the issue in which I was attempting to test code using
Apparently, pry was interrupting my usage of
To fix it, I just updated pry:
gem install pry

Now it’s updated and working correctly. Here are my related software versions:
$ rails -v
Rails 5.2.1
$ pry -v
Pry version 0.11.3 on Ruby 2.5.1
$ irb -v
Pry version 0.11.3 on Ruby 2.5.1