Skip to main content

Professional Ruby on Rails Application Development

  • Before starting, make sure you have Ruby (>= 3.x), Bundler, and Rails installed on your system.
    If you don’t have them yet, you can download Ruby from the official Ruby website and install Rails using Bundler.
  • Next, you’ll need to create an account on Square Cloud, which can be done through the signup page.
    You can use your email to create an account.
  • Finally, you need to have an active paid plan on your account.
    You can view our plans and purchase one according to your needs here.

Ruby on Rails Configuration

To install Rails, run the following command:
gem install rails
This command installs the rails gem globally, allowing you to create and manage Rails applications.

Creating a Ruby on Rails Project

To create a new Rails project, run:
rails new myapp
This command generates a complete Ruby on Rails application structure.
After creating your project, you can start the development server with:
cd myapp
rails server -p 80
Rails will start an HTTP server on port 80, serving your application at the root route.

Configuring the START Field

In the Square Cloud, the START field is optional and only necessary if you are using a custom script to start the website or API. In this case, the command will be:
rails server -p 80

Purchasing a Plan Before Uploading the Project

Before uploading your project to Square Cloud, it is important to understand that you need to purchase a plan.
The type of plan you choose will depend on the resources required by your application.
You can view our plans here.
Wondering how much RAM and CPU your plan needs to host a Ruby on Rails application?
Ruby on Rails is a full-featured MVC framework known for its productivity, conventions, and built-in tools. Because Rails is heavier than minimalist frameworks, we recommend the Standard plan with 4GB RAM and 4vCPU for most applications.
For larger or resource-intensive projects, consider upgrading to the Pro plan.
To purchase, simply click here.

Uploading the Project to Square Cloud

After preparing your project, you can upload it to Square Cloud using the dashboard or the CLI.
  • Upload via Dashboard
  • Upload via CLI
Access the Square Cloud Dashboard and upload your project files.

Additional Resources

For more information about Ruby on Rails and its tools, visit the official Rails documentation.
There, you will find guides, tutorials, and API references to help you deepen your knowledge.

Troubleshooting

Custom Domain

To use a custom domain (e.g., mysite.com) instead of the default URL https://mysite.squareweb.app/, you need the Standard plan or higher. The subdomain is defined by the SUBDOMAIN field in the configuration file. See: How to set up your custom domain.

Minimum RAM Requirements

Minimum: 512MB RAM for simple websites/APIs. For sites with frameworks (Next.JS, React, Vue, Angular, etc.), we always recommend at least 1GB RAM. For larger applications, use more RAM to avoid LACK_OF_RAM error and ensure performance.

Could not find this site.

Check if the subdomain/domain matches what's configured in the SUBDOMAIN field or in the custom domain settings. If you just uploaded the site, wait up to 60 seconds for Square to enable first access.

Site took too long to respond...

Check if you correctly configured port 80 and host 0.0.0.0 in the application. We recommend using Square's forced environment variables: PORT and HOST from the .env file.
If you continue facing technical difficulties, our specialized support team is available to assist you. Contact us and we'll be happy to help you resolve any issue.