πŸ’ŽRuby

Learn how to host your bot, website, api with Ruby on DisCloud!

πŸ“ Files

You should not send all your application files to .zip, there are some exceptions, they are:

- File Gemfile.lock (Required for Ruby On Rails)
- Folder .git
πŸ“„pageCreate the Gemfile

πŸ—œοΈ Compressing the Files

Select only the necessary files as mentioned above and create your .zip

For more details on how to Compress your Files according to your Operating System, you can see below:

pageHow to compress my files?

✍ Hosting your bot

☁️pageHow to Host

🌎 Hosting Your Site

This feature needs some basic requirements to be able to be used, please check the requirements here before continuing

Using Ruby On Rails

Rails is a development tool that gives web developers a framework that can be used in building websites or APIs.

Installing Rails

See the official documentation below.

Configuring Rails

You need to add your subdomain (or domain) in Rails allowed hosts.

  • Edit the config/application.rb file

  • Modify line 19, with your subdomain or domain

config/application.rb
require_relative "boot"

require "rails/all"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module RailsOnDiscloud
  class Application < Rails::Application
    # Initialize configuration defaults for originally generated Rails version.
    config.load_defaults 7.0
    # config.time_zone = "Central Time (US & Canada)"
    # config.eager_load_paths << Rails.root.join("extras")
    Rails.application.config.hosts = [
    IPAddr.new("0.0.0.0/0"),        # All IPv4 addresses.
    IPAddr.new("::/0"),             # All IPv6 addresses.
    "localhost",                    # The localhost reserved domain.
    "yoursubdomain.discloud.app"    # !!!! Discloud Domain !!!!!
]
  end
end

discloud.config example for Rails

βš™οΈpagediscloud.config
discloud.config
ID=subdomain
TYPE=site
MAIN=config/application.rb
RAM=512
AUTORESTART=false
VERSION=latest
APT=tools

Last updated