Sometimes you don't want to modify your Gemfile just to add a developer dependency for whatever reason.
Most of us use Bundler for managing gems, which restricts your loadpath to only the ones loaded by Bundler.
For example with Sinatra...
So if you try:
$ pry  pry(main)> require 'app' LoadError: cannot load such file -- 'some/file'
Will fail because your loadpath is empty.
In order to get it working you will need to do the following:
$ pry  pry(main)> require 'bundler' => true  pry(main)> Bundler.setup  pry(main)> require 'app' => true  pry(main)> Sinatra.constants
Niceness now you can try stuff out on your terminal and everything should work.
you can even put it all on the initial command:
pry -I. -e "require 'bundler';Bundler.setup;require 'app'"
( Irb should work the same too! )