Up until a week or so ago my website was just static html and one PHP page for the contact us. Since I have started learning Ruby and Rails, I’ve wanted to switch my site to something Ruby based but I felt that Rails was a bit of an overkill for something so small and simple. So, last week I decided to look into Sinatra, as I had heard that it was very light weight web framework. And I have to say that I really like it. It is simple to setup (see below) and light weight (it only took 2 files to get it up and running on my host).
The weight of Rails is one thing that I have been struggling with as I have been trying to figure out a way to start working Ruby and Rails into my day job MindReactor. A lot of the sites we do usually fall into being primarily static content with 1 or 2 forms or the amount of content and required features necessitates a CMS. For now when it falls into the realm of needing a CMS we are using ExpressionEngine, due to the fact that one of my co-workers has lots of experience with it and I already know PHP, so it makes a smart business decision. However, on the other end of the spectrum, I again felt like that Rails was just way more than I needed and would resort to using PHP or .NET to build it out. Though, now I think that Sinatra would be a prefect fit for that senario and am planning on trying to work that in.
For the most part I followed the steps in the Deploying Sinatra on Dreamhost With Passenger post over on the RailsTips blog, with the following exception. I did not Vendor Sinatra. Instead I opted for installing a local copy of the Sinatra gem and had to add the following line to my config.ru file.
ENV['GEM_PATH'] = '/home/USER/.gems:/usr/lib/ruby/gems/1.8'