New to Sinatra, just development server up and running but rackup
is using WEBrick
instead of Thin
, Thin
gem is already installed, this has to be a simple configuration tweak but I don't know where. Oh while you are at it, does Thin
auto-refresh when I change the source code? It appears that I have to stop and restart WEBrick
when I make source code changes.
EDIT
As suggested, thin start
works with a tweak for my setup. By itself, it throws an error "start_tcp_server": no acceptor (RuntimeError)
which means I already have another service running on that port. To resolve the issue, I simply run thin start -p 9292
. Hope this helps someone else.
I believe you'll likely just want to start up thin via something like:
bundle exec rackup -s thin
If you're on OSX you might want to check out Pow for your development environment.
For reloading files between requests: How to get Sinatra to auto-reload the file after each change?