Multi Tenant Application with Ruby on Rails

You can develop multi tenant application very easily with Ruby on Rails

You can use the gem called apartment

Multitenancy Crash Course:
Multitenancy with the Apartment gem

If you would like to learn more about Multi Tenancy Architecture you can visit this tutorial

Three Database Architectures for a Multi-Tenant Rails-Based SaaS App