otr-activerecord icon indicating copy to clipboard operation
otr-activerecord copied to clipboard

using diagram generators

Open tansaku opened this issue 5 years ago • 1 comments

I was wondering if it was possible to generate diagrams for otr-activerecord with things like https://github.com/voormedia/rails-erd ?

I just tried and got:

$ bundle exec erd
Loading application in my-app'...
Failed: NameError: uninitialized constant RailsERD::CLI::ActiveRecord

I also tried https://github.com/preston/railroady and that failed with:

$ bundle exec rake diagram:all

rake aborted!
Don't know how to build task 'diagram:all' (See the list of available tasks with `rake --tasks`)

tansaku avatar Feb 07 '20 13:02 tansaku

ah, I figured it out - got it to work via adding the following to the end of our Rakefile:

require "rails_erd/diagram/graphviz"

task :default do
  RailsERD::Diagram::Graphviz.create
end

via https://voormedia.github.io/rails-erd/install.html

then running bundle exec rake

tansaku avatar Feb 07 '20 14:02 tansaku