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
Written by Matthew Riddle
Related protips
3 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#