What is the best framework for start: rails or sinatra? I heard that sinatra is more flexible but rails has a lot of documentation and tutorials. What's your choice?

3 Answers 3


First off this may or may not apply to you (I'm answering for any future readers who ask the same question), but I'd recommend getting a solid grasp of Ruby before you start learning a framework.

That being said, here's my thoughts on both frameworks for a beginner.

Sinatra is the easiest to get something working. You can get hello world, and very simple sites going with very little code.

However, once you get past that into moderately complex applications, you'll need to start adding stuff that comes baked into Rails. For a beginner that can be a bit daunting.

I'd check out Michael Hartl's Rails tutorial http://ruby.railstutorial.org/ for more hands on Rails information.

  • 7
    +1 for learning the fundamentals of the language first without any framework
    – tcrosley
    Aug 15, 2011 at 10:33

I think it's better to start with Rails (BTW I know and like both Rails and Sinatra). Rails is certainly bigger and more complex than Sinatra, but it's easier to use and there's a smaller chance that you get stuck on something (at least from my experience).

Rails handles elegantly most of the common problems you are likely to encounter during application development, in Sinatra the solution will usually require extra effort, searching though documentation and internet. For example: exporting to xml or json.

I'd recommend this tutorial as a a starting point: Ruby on Rails Guides: Getting Started with Rails.

If you decide to start with Sinatra, the best information sources are official README and Sinatra Book.


Stick with Rails; you'll learn more overall as a beginner to Ruby. When you've learned enough and/or run into the walls that can happen when working with Rails, then look at a more freeform framework like Sinatra. If you start with Sinatra first, you'll have to do most everything yourself and as a beginner that can be fairly daunting and frustrating.

Not the answer you're looking for? Browse other questions tagged or ask your own question.