rails-erd: cannot find erd.pdf file

I installed graphviz and the gem as per the instructions. I then cd into my project. proj$ bundle exec erd

It says

diagram saved to ‘erd.pdf’

But I cannot find any such file inside my project directory.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 5
  • Comments: 36

Most upvoted comments

I had the same problems reported above: bundle exec erd would print diagram saved to 'erd.pdf', but no such file was created to disk. I found a fix that works for me:

  1. Run bundle exec erd --filetype=dot
  2. Edit erd.dot and delete the line concentrate = "true";
  3. Run dot -v -Tpdf erd.dot -o erd.pdf
  4. Profit!

If I didn’t comment out concentrate = "true";, GraphViz would Segmentation fault: 11 on both Debian with GraphViz installed via apt and Mac OSX with GraphViz installed via brew.

Alternatively, I can generate erd.pdf if I create config/initializers/erd.rb with the patch recommended here from #70 :

require 'rails_erd/domain/relationship'

module RailsERD
  class Domain
    class Relationship
      class << self
        private

        def association_identity(association)
          Set[association_owner(association), association_target(association)]
        end
      end
    end
  end
end

Version info:

$ dot -V dot - graphviz version 2.38.0 (20140413.2041) $ erd --version RailsERD 1.5.2

bundle exec erd --filetype=dot worked. It generated the erd.dot file. But I am not able to convert this file to pdf using dot -Tpdf erd.dot -o erd.pdf. It shows Segmentation fault (core dumped) message.

Having this problem also.

Running into it as well on El Capitan

$ dot -v
dot - graphviz version 2.38.0 (20140413.2041)
libdir = "/usr/local/Cellar/graphviz/2.38.0/lib/graphviz"
Activated plugin library: libgvplugin_dot_layout.6.dylib
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.6.dylib
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
    /usr/local/Cellar/graphviz/2.38.0/lib/graphviz/config6
        was successfully loaded.
    render  :  dot fig map pic pov ps quartz svg tk vml xdot
    layout  :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device  :  bmp canon cgimage cmap cmapx cmapx_np dot eps exr fig gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz xdot xdot1.2 xdot1.4
    loadimage   :  (lib) bmp eps gif jpe jpeg jpg pdf png ps svg

Actually this erd --inheritance --direct --attributes=foreign_keys,content is working…

I’m getting this as well on 1.5.0 with GraphViz 2.38.0 I think this is due to the large number of models as it works when I limit it to just a handful of models in my app. Ex:

bundle exec rake erd only="Model1,Model2,Model3"