Installation

Get RailsPress running in your Rails 8 application in under 5 minutes.

Requirements

  • Ruby 3.3+
  • Rails 8.1+
  • PostgreSQL, MySQL, or SQLite
  • ActionText (comes with Rails)
  • Active Storage (required for post images and CMS image elements)

Quick Start

1. Add to Gemfile

Gemfile
gem "railspress-engine"

2. Install and Migrate

Install ActionText and Active Storage first if your app does not already have them:

Terminal
$ rails action_text:install
$ rails active_storage:install
$ rails db:migrate

Then install RailsPress:

Terminal
$ bundle install
$ rails generate railspress:install
$ rails db:migrate
Note

RailsPress now handles Lexxy wiring internally. You do not need to add a manual pin "lexxy" to your host config/importmap.rb for standard installs.

Mount the Engine

Add to your config/routes.rb:

config/routes.rb
Rails.application.routes.draw do
  mount Railspress::Engine => "/railspress", as: :railspress
end

The admin interface will be available at /railspress/admin.

Admin Paths

Path Description
/railspress/admin Dashboard
/railspress/admin/posts Manage posts
/railspress/admin/categories Manage categories
/railspress/admin/tags Manage tags
/railspress/admin/content_groups Manage CMS content groups (when enable_cms is enabled)
/railspress/admin/content_elements Manage CMS content elements (when enable_cms is enabled)
/railspress/admin/cms_transfer CMS content import/export (when enable_cms is enabled)

Models Reference

Railspress::Post

Attribute Type Description
title string Post title (required)
slug string URL-friendly identifier (auto-generated)
content rich_text Post body (ActionText)
status enum draft or published
published_at datetime When post was published
meta_title string SEO title override
meta_description text SEO description
category_id integer Optional category
excerpt text Short summary used in blog listings
reading_time integer Auto-calculated reading time in minutes
author_id integer References the configured author model
header_image attachment Featured image for the post

Associations:

  • belongs_to :category (optional)
  • has_many :tags (through taggings)
  • has_rich_text :content
  • belongs_to :author, polymorphic: true (when authors are enabled)

Scopes:

  • published - Posts with status "published" and a published_at date set
  • drafts - Posts with status "draft"
  • ordered - By published_at descending (published first, then created_at)
  • recent - Last 10 posts (ordered)
  • by_author(author) - Filter posts by author (when authors are enabled)
  • search(query) - Search posts by title
  • by_category(category_or_id) - Filter by category object or id
  • by_status(status) - Filter by status enum value
  • sorted_by(column, direction) - Multi-column sorting

Railspress::Category

Attribute Type Description
name string Category name (required, unique)
slug string URL-friendly identifier (auto-generated)

Railspress::Tag

Attribute Type Description
name string Tag name (required, unique, lowercase)
slug string URL-friendly identifier (auto-generated)