rqfeug
Last Updated: October 27, 2016
·
10.99K
· 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

5938

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 ·
5939

Thanks for the tip Kormie!

over 1 year ago ·
23387

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 ·