lib/rails_erd/cli.rb in rails-erd-1.4.5 vs lib/rails_erd/cli.rb in rails-erd-1.4.6
- old
+ new
@@ -150,9 +150,10 @@
def load_application
$stderr.puts "Loading application in '#{File.basename(path)}'..."
# TODO: Add support for different kinds of environment.
require "#{path}/config/environment"
Rails.application.eager_load!
+ rescue TypeError
end
def create_diagram
$stderr.puts "Generating entity-relationship diagram for #{ActiveRecord::Base.descendants.length} models..."
file = RailsERD::Diagram::Graphviz.create(options)