Sinatra from scratch

I wrote a small Ruby app the other day which was chucking out JSON which was being parsed by some PHP.

So I thought I’d convert it to all-Ruby using Sinatra (my first real attempt at a Ruby web framework that’s not Hello World).

Installation was harder than expected on my clean Ubuntu box, but for reference:

gem install 1.8-dev
gem install mongrel
gem install rack --version 0.4
gem install sinatra

It was the third line which really caught me out – Sinatra is bound to version 0.4 of Rack, even though it’s at 0.9.1 right now!

Everything seems fine so far, I’ll post a URL if I ever get it running!

update: Sinatra 0.9 was released two days after I wrote this, and it is now dependent on Rack 0.9.1 so the “–version 0.4” is no longer needed