Generate Entity-Relationsip-Diagrams (ERD) from a Rails app
Use gem rails-erd to generate Entity-Relationship-Diagrams (ERD) from your Rails app
Usage #
- Add the gem to Gemfile
gem 'rails-erd', group: :development - Install graphviz dependency in the console
sudo apt-get install graphviz - Now when you run
bundle exec erd
It will generate erd.pdf in the root folder of your Rails app.
Here are some examples of what it can look like:

Advanced usage #
You can also create an .erdconfig file in the root folder and add some configs
Did you like this article? Did it save you some time?