Last Updated: October 27, 2016
· mriddle

Rails console equivalent for Sinatra

If you want to fire up your app and play around via the command line the easiest way I found is to use irb.

Just run with irb with -r. The bundle exec is optional.

bundle exec irb -r app.rb

3 Responses
Add your response


if you don't mind another dependency, you can add racksh to your gemfile. I've found it extremely useful and it allows you to use a .rackshrc file for configuration.

over 1 year ago ·

Thanks for the tip Kormie!

over 1 year ago ·

If the command can't find your app.rb file, make sure it's in your LOAD_PATH:

bundle exec irb -I. -r app.rb

over 1 year ago ·