LogoLogo
πŸ‡ΊπŸ‡Έ EN
πŸ‡ΊπŸ‡Έ EN
  • πŸ‘‹Welcome
  • Suport
    • ☁️How to Host
      • πŸ€–Bots
        • πŸ”ŒBot
        • 🧩VSCode Extension
        • ⌨️CLI
      • 🌎Website and APIs
        • πŸ”ŒBot
        • 🧩VSCode Extension
        • ⌨️CLI
    • ⌨️Languages
      • 🟨JavaScript
        • πŸ“„Create the package.json
      • 🐍Python
        • πŸ“„Create the requirements.txt
      • β˜•Java
      • πŸ’ŽRuby
        • πŸ“„Create the Gemfile
      • 🐿️Go
      • 🐘Php
      • πŸ¦€Rust
        • πŸ“„Create the Cargo.toml
    • ⛓️Integrations
      • 🌐Your Own Domain
      • πŸ™GitHub and GitLab
      • 🎧Lavalink
      • πŸ’ΎDatabase
        • MongoDB Atlas (mLab)
    • ❓Frequently Asked Questions (FAQ)
      • How to compress my files?
      • Discloud ModMail (Ticket)
      • How do I get my bot's ID?
      • What is the main file?
      • Configuring Puppeteer
      • How to report an offender?
      • Why can't I access my website?
      • Very Heavy BOT
    • βš’οΈCommands
      • How to get API token
      • How to integrate Github
    • 🀲Donations
  • configuration
    • βš™οΈdiscloud.config
      • πŸ“¦APT (Install Packages)
      • πŸ—οΈVERSION (Switch between Versions)
  • πŸ–₯️local environment
    • βš™οΈInstall
      • 🟨JavaScript (NodeJS)
      • 🐍Python
      • πŸ’ŽRuby
      • πŸ¦€Rust
  • API
    • πŸ“‘Using the API
    • πŸ”—Routes
  • About
    • 🎨Discloud Brand
      • Name origin
      • Visual Identity
  • πŸ”—Links
    • 🌎Website
    • πŸ“ŠDisCloud Status
  • πŸ“œLegal
    • πŸ“„Terms of Service (TOS)
Powered by GitBook
On this page
  • Files
  • Compressing the Files
  • ✍ Hosting your bot
  • Hosting Your Site
  • Using Ruby On Rails
  • Installing Rails
  • Configuring Rails
  • discloud.config example for Rails

Was this helpful?

Edit on GitHub
  1. Suport
  2. Languages

Ruby

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

PreviousJavaNextCreate the Gemfile

Last updated 1 year ago

Was this helpful?

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
  • Have trouble finding your main file?

  • Doubts about creating your Gemfile file?

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:

✍ Hosting your bot

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

discloud.config
ID=subdomain
TYPE=site
MAIN=config/application.rb
RAM=512
AUTORESTART=false
VERSION=latest
APT=tools

Hosting Your Site

⌨️
πŸ’Ž
🌎
How to compress my files?
☁️How to Host
βš™οΈdiscloud.config
πŸ“
πŸ—œοΈ
πŸ“„Create the Gemfile
Getting Started with Rails β€” Ruby on Rails GuidesRuby on Rails Guides
Logo
Click here
Click here