Skip to main content

Getting Started with Ruby Hosting

Deploy your Ruby applications on ShardCloud with minimal configuration and maximum performance.
ShardCloud supports Ruby applications with automatic dependency management via Bundler.

Prerequisites

Before uploading your Ruby application, ensure you have the following project structure ready.

Required Files

Essential files for deployment

Excluded Files

Files to exclude before upload

Required Files

Your Ruby application must include these essential files:

1. Entry Point File

  • File: app.rb or main.rb
  • Purpose: Main application entry point
  • Requirements: Must contain your application’s main execution code

2. Dependencies Configuration

  • File: Gemfile
  • Purpose: Defines Ruby gem dependencies
  • Requirements: Valid Bundler format with all dependencies listed

3. ShardCloud Configuration

  • File: .shardcloud
  • Purpose: Platform-specific deployment settings
  • Requirements: Plain text configuration file in root directory
All three files are mandatory. Missing any of these files will prevent successful deployment.

Files to Exclude

Remove these files/folders before creating your deployment archive:
  • vendor/bundle/
  • .bundle/
  • Gemfile.lock (optional, can include for version locking)
  • tmp/
  • log/

ShardCloud Configuration

The .shardcloud file configures your application deployment settings.

Configuration Example

DISPLAY_NAME=myfirstrubyproject
DESCRIPTION=a simple Ruby application
MAIN=app.rb
MEMORY=512
VERSION=recommended
Choose memory based on your application’s requirements. Web frameworks may need more memory.

Deployment Process

1

Prepare Application

Ensure all required files are present and configured
2

Verify Gemfile

Confirm all dependencies are listed in your Gemfile
3

Exclude Unnecessary Files

Remove vendor/bundle/, .bundle/, and cache folders
4

Create Archive

Zip or RAR your project
5

Upload via Dashboard

Use ShardCloud dashboard to upload your archive
6

Deploy & Monitor

Application automatically installs gems and deploys

Common Configuration Examples

Rails Web Application

DISPLAY_NAME=rails-app
DESCRIPTION=Web application with Ruby on Rails
MAIN=Gemfile
MEMORY=1024
VERSION=recommended
SUBDOMAIN=rails
CUSTOM_COMMAND=chmod +x bin/rails && bin/rails server -b 0.0.0.0

Sinatra API

DISPLAY_NAME=sinatra-api
DESCRIPTION=REST API with Sinatra
MAIN=app.rb
MEMORY=256
VERSION=LATEST
SUBDOMAIN=sinatra

Sidekiq Background Worker

DISPLAY_NAME=sidekiq-worker
DESCRIPTION=Background job processor
MAIN=worker.rb
MEMORY=512
VERSION=LATEST