Wednesday, April 22, 2015

Sinatra Console

There is nothing similar to rails console in sinatra. You can go to irb and do a :

require './myapp.rb'

to start experimenting with your Sinatra app.

You can create a console.rb and put the following code:

require './game.rb'
require 'irb'
ARGV.clear
IRB.start

You now have a simple Sinatra console, you can run it as ruby console.rb.

Reference:

Sinatra Console