Ruby is without any doubt, one of the most popular object oriented programming languages out there. It is loved by developers all around the world specially because it's not only powerful but has a sweet simple syntax with lot of great features.
There are quite a number of frameworks developed for Ruby over the years. These frameworks help a developer to accelerate the web development and create innovative web applications with a little effort.
I have mentioned a curated list of all the popular open-source ruby frameworks which are actively maintained. Some of those frameworks might not be as huge & feature rich as others but they work really well for a particular set of requirements.
Ruby on Rails
Ruby on Rails is not a minimalist framework, it's a monolith. One filled with all the major components needed to run a large, sprawling application like Basecamp or GitHub or Shopify.
This means there's a lot to learn! But it also means you can learn it piece by piece. You do not need to be an expert in all facets of Ruby on Rails to get started on creating a great application.
Sinatra is a free and open source software web application library and domain-specific language written in Ruby. It is an alternative to other Ruby web application frameworks such as Ruby on Rails, Merb, Nitro, and Camping. It is dependent on the Rack web server interface.
Padrino is a ruby framework built upon the excellent Sinatra Web Library. Sinatra is a DSL for creating simple web applications in Ruby quickly and with minimal effort. This framework tries to make it as fun and easy as possible to code more advanced web applications by building upon the Sinatra philosophies and foundations.
- Official Documentation
- Getting Started with Padrino and BDD
- Just Do It: Learn Sinatra, Part One
- Blog Tutorial
Hanami is a full-stack Ruby web framework. It is built by Luca Guidi, made up of smaller, single-purpose libraries. As the Hanami Team writes on their page, Hanami’s goal is to build lightweight apps which consume less memory than other Ruby web frameworks (they probably had in mind Rails). Hanami also allows you to create many applications under one application.
Controller and views have similiar implementation as Rails however Models are divided into two classes – entities and repositories. Entities are plain, Ruby objects which define all instance methods, while repositories are classes responsible for defining database associations, scopes, query construction and defining a connection with the database.
- Official Documentation
- A collection of awesome Hanami Gems and projects
- Getting Started with Hanami and GraphQL
Celluloid provides a simple and natural way to build fault-tolerant concurrent programs in Ruby. With Celluloid, you can build systems out of concurrent objects just as easily as you build sequential programs out of regular objects. Recommended for any developer, including novices, Celluloid should help ease your worries about building multithreaded Ruby programs.
- Official Documentation
- An Introduction to Celluloid - Site Point
- Celluloid – Ruby Multithreading Made Easy
Cuba is a microframework for web development originally inspired by Rum, a tiny but powerful mapper for Rack applications.
Cuba was written by Michel Martens with the goal of following a minimalist philosophy and only providing what’s needed rather than some of the bloat and unused features that come along with much larger frameworks. Cuba is small, lightweight, and fast. It integrates many templates via Tilt, and testing via Cutest and Capybara.
Pakyow Web Framework
Pakyow lets you build modern apps that don't break the web.
It provides features such as auto-updating views while embracing traditional concepts like progressive enhancement. Designed to be as simple as possible, it helps you quickly create momentum and maintain it throughout a project.
Removes friction from development. Quickly build a prototype with only HTML and CSS. Later on, build right on top of the prototype without throwing out previous work.
Grape is a REST-like API framework for Ruby.
It's designed to run as a mountable rack engine or complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily develop RESTful APIs.
It has built-in support for common conventions, including multiple formats, subdomain/prefix restriction, content negotiation, versioning and much more.
- Website: [postrank-labs.github.io/goliath][http://postrank-labs.github.io/goliath/]
- Github: postrank-labs/goliath
Goliath is an open source version of the non-blocking (asynchronous) Ruby web server framework. It is a lightweight framework designed to meet the following goals: bare metal performance, Rack API and middleware support, simple configuration, fully asynchronous processing, and readable and maintainable code (read: no callbacks).
The framework is powered by an EventMachine reactor, a high-performance HTTP parser and Ruby 1.9+ runtime. The one major advantage Goliath has over other asynchronous frameworks is the fact that by leveraging Ruby fibers introduced in Ruby 1.9+, it can untangle the complicated callback-based code into a format we are all familiar and comfortable with: linear execution, which leads to more maintainable and readable code.
Scorched is a generic, unopinionated, DRY, light-weight web framework for Ruby. It provides a generic yet powerful set of constructs for processing HTTP requests, with which websites and applications of almost any scale can be built.
If you've used a light-weight DSL-based Ruby web framework before, such as Sinatra, Scorched should look quite familiar. Scorched is a true evolutionary enhancement of Sinatra, with more power, focus, and less clutter.
Roda is a web framework built on top of Rack, created by Jeremy Evans, that started as a fork of Cuba and was inspired by Sinatra. It is a routing tree web toolkit, designed for building fast and maintainable web applications in ruby.
It is designed to be simple, both internally and externally, reducing cognitive overhead. It is built completely out of plugins, which makes it very extensible.
The primary difference between Roda and Sinatra is that Roda uses a routing tree, while Sinatra uses a list of routes. At any point in the routing tree, Roda allows you to operate on the current request. If your URLs reflect your application architecture, this allows you to have DRYer code.
Praxis is a framework for both designing and implementing APIs.
An important part of the framework is geared towards the design aspect of building an API. This functionality empowers architects with tools to design every last aspect of their API, resulting in a complete, web-browsable documentation, which includes automatic generation of examples for resources, parameters, headers, etc...as well as requests and responses for the supported encodings.
The design process is iterative, and flows from defining new resources, parameters, etc...to reviewing the resulting docs (usually with some of the potential clients of the API), back to updating the design based on feedback, or expanding it with more resources.
The design language (i.e. DSL) of Praxis follows a clean 'ruby-type-syntax' and its final outcome is to generates an output that is both a set of schema documents as well as a web-based API browser (driven by those schemas). This allows Praxis to design APIs that can potentially be implemented in any language.
- Official Documentation
- Unveiling Praxis
- Praxis: a Ruby framework that takes a different approach to creating APIs
Syro is a very simple router for web applications. It was created in the tradition of libraries like Rum and Cuba, but it promotes a less flexible usage pattern.
The design is inspired by the way some Cuba applications are architected: modularity is encouraged and sub-applications can be dispatched without any significant performance overhead.