RubyFlow The Ruby and Rails community linklog

Shotgun: A Rackup that restarts apps on every request

Ryan Tomayko has released Shotgun, a “forking implementation of Rackup.” Its primary use is for reloading apps on every request to make life easier in development (particularly if your Rack-based app doesn’t do reloading itself).

Comments

Cool, altho Rack::Reloader (which comes with Rack) works fine for me. The only time I need to restart the server is when I make a change to the config.ru (which I don’t often make changes to).

use Rack::Reloader if ENV['RACK_ENV'] == 'development'

… that said, whilst working on a series of screencasts on Rack, i’ve become increasingly frustrated as Thin/Mongrel don’t always like to quit properly via IRB and Rack::Reloader doesn’t work for reloading the config.ru, itself.

If you’re doing lots of development in a config.ru (which isn’t very typical, imho), then shotgun is really, really convenient!

Thanks for this great, super simple tool, Ryan Tomayko!

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in