Ruby
Complete guide to host Ruby applications on Discloud.
📁 Preparing the Files
Before uploading your project, you must exclude unnecessary files to optimize the deployment.
❌ Files to Exclude
Ensure the following files and directories are not included in your .zip
:
- Gemfile.lock
- .git
- tmp/
- log/
📌 Use a .discloudignore
file to automatically exclude these files.
🔗 Need help setting up your Gemfile
or find main file?
🌐 Hosting Your Site with Ruby on Rails
Before deploying your website or API on Discloud, ensure that you meet the following requirements:
Platinum plan or higher is required to host websites or APIs.
A subdomain must be created before deployment.
Port 8080
is mandatory – Applications must listen on this port.
⚙️ Configuring Ruby on Rails
require_relative "boot"
require "rails/all"
# Requires the gems listed in the Gemfile, including those limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module RailsOnDiscloud
class Application < Rails::Application
# Initialize the default configuration for the 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", # Reserved domain localhost.
"seusubdomínio.discloud.app" # !!! Discloud Subdomain !!!
]
end
end
✍️ Deploying Your Application
Once your project is configured and compressed, you can choose one of the following deployment methods on Discloud:
Last updated