Stage for Sinatra

I’ve been getting into hacking together quick web ideas via Sinatra, which is a great little Ruby web framework for getting things going QUICKLY.  I love how easy it is to get started (not many lines) and it supports HAML pretty much automatically.  It also lets you run a quick webserver just by running “ruby <yourfile.rb>”.

This is a great mechanism for development, because it allows really speedy iterations (or bugfixing).  However, some of these ideas are things I want to share or run more than just in a development mode, although not quite turn them into a full bore application.

Enter Phusion Passenger, the “mod_rails” plugin for Apache.  Passenger works for all Rack based applications, including Sinatra, making it pretty easy to setup a Sinatra app at a slightly more permanent location.

On l3ib.org, we have run lighttpd since the server was born, purely chosen out of its ease of syntax.  Over the years, things have been grafted on and some things are straight up hard to do on lighttpd, such as deploy Rails applications.  Luckily, our server provides a second public IP address, which Apache runs on.

Tonight, I created a staging area, called stage.minuslab.net, where I can dump these testing Sinatra apps as suburls.  I won’t link to the one app I put in there just yet as it is resource intensive and I don’t know yet how to throttle it to the outside world, but that will be coming a later haxpact entry.

I also wrote a quick script to manage adding each application as it is ready to be “deployed” – it adds the sub-uri to the stage.minuslab.net Apache configuration file, sets up the proper symlinks, writes the config.ru that is required, and restarts Apache all in one shot.  The script is buggy and internal only so I won’t share that either tonight, but it’s making developing small ideas with Sinatra even easier.

2 Trackbacks

  1. By New Project: FM-like crests – minusblag on 16 Mar 2010 at 9:30 pm

    [...] some uniqueness to each entry.  I see an independent web application (probably running on my staging server with sinatra for now) that will be tied into the NFL site so when people sign up for the upcoming [...]

  2. By Flag Combinator – minusblag on 26 Mar 2010 at 9:51 pm

    [...] when I wrote about the Sinatra staging area I had set up, I had mentioned a project that I had worked on there but hadn’t made public [...]

Post a Comment

Your email is never shared. Required fields are marked *

*
*