# Installing ERD on macOS for Rails Development

**URL:** <https://community.unix.com/t/installing-erd-on-macos-for-rails-development/379632>\
**Category:** Discourse Plugins\
**Created:** [August 17, 2020, 6:50am UTC](https://community.unix.com/t/installing-erd-on-macos-for-rails-development/379632 "2020-08-17T06:50:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [August 17, 2020, 6:50am UTC](https://community.unix.com/t/installing-erd-on-macos-for-rails-development/379632/1 "2020-08-17T06:50:44Z")

</div>

Recently, I helped a client migrate their legacy desktop application to a web based app.

One of the tools I used was ERD. Here is a sample of the ERD view of an unfinished Rails app I am working on:

 ![Screen Shot 2020-08-17 at 1.36.25 PM](https://community.unix.com/uploads/default/original/2X/1/185be3ccb6ddb16df60758bd7b2f5be6c04de0da.jpeg)

I also tested this on my Discourse dev setup (macOS), and it was buggy, but I did manage to get some results (needs work for sure).

 ![Screen Shot 2020-08-17 at 1.02.56 PM](https://community.unix.com/uploads/default/original/2X/3/34fa0862df78a53af964fd1d52d0aca5b19a149f.jpeg)

 ![Screen Shot 2020-08-17 at 11.37.06 AM](https://community.unix.com/uploads/default/original/2X/3/325c46f87eab75f4a1c6a9ce28947c568dbe0453.jpeg)

This was fairly easy to setup on macOS:

> Install GraphViz

$ brew install graphviz

> Add these Ruby Gems to your Gemfile

```plaintext
gem 'erd'
gem 'ruby-graphviz'

```

> Install

```plaintext
$ bundle install

```

(... or whatever you use to get your Gems working).

ERD is not `"perfect"` and seems to work best on smaller projects; but I don't have enough experience with it yet to say for sure.

There is both an `erd` and a `rails-erd` gem. I tried both today, but was able to get the `erd` Gem below up and running faster. Later I will try `rails-erd` for fun.

Reference:

> **[GitHub - amatsuda/erd: A Rails engine for drawing your app's ER diagram](https://github.com/amatsuda/erd)**
>
> A Rails engine for drawing your app's ER diagram. Contribute to amatsuda/erd development by creating an account on GitHub.

See also:

[https://rubygems.org/gems/erd](https://rubygems.org/gems/erd)
