Stay organized with collectionsSave and categorize content based on your preferences.
It's easy to get started developing Ruby on Rails apps that run on
Google Cloud. Because the apps you create run on the same
infrastructure that powers all of Google's products, you can be confident that
they can scale to serve all of your users, whether there are a few or millions
of them.
Hosting platforms
These are some of the available options for deploying Rails on Google Cloud:
In many situations, there are compelling reasons to use a NoSQL database, for
example, scalability or suitability for your data model. Although using Rails
models with a NoSQL database can be challenging, it is possible with some
limitations. For example, you can express many types of database joins in Rails,
but joins aren't supported by Datastore or other NoSQL databases such
as MongoDB. You can learn more by reviewing our RailsBookshelf tutorial using Datastore,
which uses Datastore as its non-relational database.
For a managed, massively-scalable NoSQL solution, considerDatastore,
which is a non-relational database that often scales better than a SQL solution.
If you choose to use MongoDB, you can deploy it by usingGoogle Cloud Marketplaceand do your own management, or you can use the managed MongoDB hosting service
provided bymLab.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Running Rails on Google Cloud\n\nIt's easy to get started developing Ruby on Rails apps that run on\nGoogle Cloud. Because the apps you create run on the same\ninfrastructure that powers all of Google's products, you can be confident that\nthey can scale to serve all of your users, whether there are a few or millions\nof them.\n\nHosting platforms\n-----------------\n\nThese are some of the available options for deploying Rails on Google Cloud: \n\nFor more details on the differences between these platforms, see [App Hosting options on Google Cloud](https://cloud.google.com/hosting-options).\n\nDatabases\n---------\n\n### Relational databases\n\n[Rails Active Record](http://guides.rubyonrails.org/active_record_basics.html)\nworks best with a traditional SQL database. If you are starting a new project,\n[Cloud SQL](/sql)\nis a good choice. With a few clicks you can create a MySQL or PostgreSQL\ndatabase that is fully managed and scaled by Google, with no management on your\nend. Review the\n[Using Cloud SQL for MySQL with Rails 5](/ruby/rails/using-cloudsql-mysql)\ntutorial or the\n[Using Cloud SQL for PostgreSQL with Rails 5](/ruby/rails/using-cloudsql-postgres).\n\n### NoSQL databases\n\nIn many situations, there are compelling reasons to use a NoSQL database, for\nexample, scalability or suitability for your data model. Although using Rails\nmodels with a NoSQL database can be challenging, it is possible with some\nlimitations. For example, you can express many types of database joins in Rails,\nbut joins aren't supported by Datastore or other NoSQL databases such\nas MongoDB. You can learn more by reviewing our Rails\n[Bookshelf tutorial using Datastore](/ruby/getting-started/using-cloud-datastore),\nwhich uses Datastore as its non-relational database.\nFor a managed, massively-scalable NoSQL solution, consider\n[Datastore](/datastore),\nwhich is a non-relational database that often scales better than a SQL solution.\n\nIf you choose to use MongoDB, you can deploy it by using\n[Google Cloud Marketplace](/marketplace/solution/click-to-deploy-images/mongodb)\nand do your own management, or you can use the managed MongoDB hosting service\nprovided by\n[mLab](https://www.mongodb.com/atlas/database).\n\nCaches\n------\n\nTo install Memcached on Compute Engine, you can use\n[Cloud Marketplace](/marketplace/solution/bitnami-launchpad/memcached?q=memcache).\nTo install Memcached on either Compute Engine or GKE\n, you can use the\n[Memcached Docker image](https://hub.docker.com/_/memcached/).\nSimilarly, you can install Redis by using\n[Cloud Marketplace](/marketplace/solution/click-to-deploy-images/redis)\nor the\n[Redis docker image](https://hub.docker.com/_/redis/)."]]