Skip to content

v2.0.0 - The Mermaid Era πŸ§œβ€β™€οΈ

Choose a tag to compare

@kerrizor kerrizor released this 06 Jun 19:04
· 29 commits to master since this release
1db89e3

Rails ERD 2.0.0 - The Mermaid Era πŸ§œβ€β™€οΈ

It's alive! After years of quiet maintenance, Rails ERD is back with its biggest update ever.

This release fundamentally reimagines how Rails ERD works. No more wrestling with Graphviz installations, no more mysterious dot executable errors, no more platform-specific headaches. Just run bundle exec erd and get a beautiful diagram that renders right in your GitHub README, GitLab wiki, or Notion docs.

🌊 Why Mermaid?

Mermaid diagrams are text-based and render natively in:

  • GitHub (READMEs, issues, PRs, wikis)
  • GitLab (everywhere!)
  • Notion, Obsidian, and countless other tools
  • Any Markdown renderer with Mermaid support

No more generating PDFs, committing images, or explaining to teammates how to install Graphviz. Your ERD lives in version control as readable text and renders beautifully wherever you need it.

πŸ’₯ Breaking Changes

Setting Old Default New Default
generator graphviz mermaid
filetype pdf mmd
mermaid_style classdiagram erdiagram
direction RL (right-to-left) TB (top-down)
ruby-graphviz required optional

πŸš€ Migration Guide

Most users: Just run bundle exec erd and enjoy your new Mermaid diagram!

To continue using Graphviz output:

# Gemfile
gem 'ruby-graphviz'
bundle exec erd generator=graphviz filetype=pdf

To use classDiagram style instead of erDiagram:

bundle exec erd mermaid_style=classdiagram

✨ New Features

  • Mermaid erDiagram style with crow's foot notation and PK/FK markers (#445)
  • Full CLI parity - CLI now supports all options that rake task supports (#446, #447)
  • Orientation support - Mermaid direction respects the orientation option (#448)

πŸ› Bug Fixes

  • Fix --only flag with single model (#441)
  • Fix nil destination crash (#440)
  • Fix empty .erdconfig crash (#443)
  • Fix CLI string-to-symbol option conversion (#447)
  • Exclude Rails 8 Solid* internal models (SolidQueue, SolidCache, SolidCable) (#437, #438, #439)
  • Suppress Ruby 3.4 hash key warnings (#436)

πŸ“š Documentation

  • Completely updated README for Mermaid-first workflow (#444, #448)
  • Added non-Rails usage example for gems with ActiveRecord models (#444)

πŸ™ Thanks

This release closes 65+ issues dating back to 2020. Special thanks to everyone who reported bugs, submitted PRs, and kept using Rails ERD over the years. Your patience is appreciated!

πŸ“Š Example Output

Running bundle exec erd now produces:

erDiagram
    direction TB
    User {
        integer id PK
        string name
        string email
        integer organization_id FK
    }
    Organization {
        integer id PK
        string name
    }
    Post {
        integer id PK
        string title
        text body
        integer user_id FK
    }
    Organization ||--o{ User : ""
    User ||--o{ Post : ""

Full Changelog: v1.7.2...v2.0.0

RubyGems: https://rubygems.org/gems/rails-erd