rails-erd
rails-erd copied to clipboard
`rake erd filetype=dot` : Unable to find GraphViz's "dot" executable.
I'm using rails-erd in a Docker container, who don't have graphviz installed. So I'm creating my erd graphs in two steps:
-
docker-compose run web rake erd filetype=dot orientation=vertical attributes=foreign_keys,content
-
dot -Tpdf erd.dot -o docs/graphs_erd/file_name.pdf
When I was using version 1.5.0, everything was fine. Since I upgraded to 1.5.2, I can't do the first step anymore: I got this error:
rake aborted!
Unable to find GraphViz's "dot" executable. Please visit https://voormedia.github.io/rails-erd/install.html for installation instructions.
I get the same result with the simple command rake erd filetype=dot
.
That error occurs when the task can not find dot
in $PATH
. If you don't have dot
on your machine, I'm not sure there's a difference between 1.5.0 and 1.5.2 that would allow your 2nd command to work if dot
is not installed.
(sorry, accidentally closed..)
Well, I just downgraded to 1.5.0, and it's working now.
And it was failing at the first command. It was rake erd
that outputed Unable to find GraphViz's "dot" executable.
I had dot installed on my local machine from the start.
It looks like the rake erd command now depends on dot executable. It's a major problem for me with my docker setup. I don't need/want to install dot in my container.
Anyway, 1.5.0 is working for me.
same here, after having issues with 1.5.2 had to roll back to 1.5.0 and everything started to work
problem still exists on 1.5.2
@rlech @raviale are you using $ rake erd
or $ erd
?
I used this " rake erd " for the output but still getting this same error. How to solve it?
@pmokariya if you could, try using $ erd
and see if it gives you different results.
Just in case anyone ends up here like I did. Try adding dot.exe folder (in Windows, after installing Graphviz with the msi file, it's located in C:\Program Files (x86)\Graphviz2.38\bin) to path variable.
Restart your system <- important
I use nix-shell with this gem. Had the same issue. bundle binstubs rails-erd
and then calling ./bin/erd
solved my problem