Skip to content

Instantly share code, notes, and snippets.

@WattsInABox
Last active July 5, 2024 09:36
Show Gist options
  • Save WattsInABox/8620783 to your computer and use it in GitHub Desktop.
Save WattsInABox/8620783 to your computer and use it in GitHub Desktop.
Generate Static HTML Website Using Ruby on Rails
# config/database.yml
development: &development
adapter: postgresql
database: workherder_development
host: localhost
username: postgres
password:
static:
<<: *development
group :development do
gem 'heel' # used to server the static site from the /out directory
end
# Ignore static version of the site (used to upload error pages to S3 for Heroku errors)
/out
# config/environments/static.rb
require File.expand_path('../development', __FILE__)
# environment for serving static pages like error pages to upload to S3
Workherder::Application.configure do
config.serve_static_assets = true
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment