gemhome / rails-erd

retired fork, DO NOT USE. see https://github.com/voormedia/rails-erd
MIT License
0 stars 0 forks source link

No entities found; create your models first! #5

Open bf4 opened 10 years ago

bf4 commented 10 years ago

Issue by dmytro Sunday Feb 24, 2013 at 00:44 GMT Originally opened as https://github.com/voormedia/rails-erd/issues/42


I am having the same problem as #6 but answers given there didn't help, I am not using kaminari, using Rails 3.2.12

Here's output of commands

 $ rails c                               
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
Loading development environment (Rails 3.2.12)
[1] pry(main)> Rails.application.config.eager_load_paths
=> ["/Users/dmytro/Development/app/assets",
 "/Users/dmytro/Development/app/controllers",
 "/Users/dmytro/Development/app/helpers",
 "/Users/dmytro/Development/app/mailers",
 "/Users/dmytro/Development/app/models"]
[2] pry(main)>

and trace

$  rake erd filetype=dot --trace                               U feature/user_sms_opt_in:intilligent_saas/.
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
** Invoke erd (first_time)
** Invoke erd:generate (first_time)
** Invoke erd:options (first_time)
** Execute erd:options
** Invoke erd:load_models (first_time)
** Execute erd:load_models
Loading application environment...
** Invoke environment (first_time)
** Execute environment
Loading code in search of Active Record models...
** Execute erd:generate
Generating Entity-Relationship Diagram for 12 models...
rake aborted!
No entities found; create your models first!
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:159:in `block in filtered_entities'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:152:in `tap'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:152:in `filtered_entities'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:128:in `generate'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:119:in `create'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:74:in `create'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/gems/rails-erd-1.1.0/lib/rails_erd/tasks.rake:41:in `block (2 levels) in <top (required)>'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/dmytro/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:187:in `block in invoke_prerequisites'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:185:in `each'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:185:in `invoke_prerequisites'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
/Users/dmytro/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/bin/rake:19:in `load'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374@global/bin/rake:19:in `<main>'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `eval'
/Users/dmytro/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => erd => erd:generate
bf4 commented 10 years ago

Comment by rolftimmermans Monday Feb 25, 2013 at 11:11 GMT


Thanks for reporting. Issues like this are nearly impossible to troubleshoot without having access to the application or at least the models. Is it possible to send/host your app somewhere, or at least the most relevant bits of your domain models?

bf4 commented 10 years ago

Comment by dgilperez Wednesday Mar 13, 2013 at 15:14 GMT


Hi! I'm having the same problem with the last version of rails-erd and Rails 3.2.12. I'm not using Kaminari and eager loaded paths look good ... unfortunatelly I cannot paste neither models nor Gemfile, any idea on how to debug and find the problem?

bf4 commented 10 years ago

Comment by rolftimmermans Tuesday Mar 19, 2013 at 12:23 GMT


For anyone running into this problem, please check the following:

Troubleshooting applications without having complete access to them is nearly impossible. If anyone can provide me a complete application that fails to generate useful diagrams when fully migrated and with associations present I can be of more help.

bf4 commented 10 years ago

Comment by dmytro Thursday Mar 21, 2013 at 01:07 GMT


Hi Rolf,

Thank you for answer and debugging tips. Will try to find the culprit and let you know.

Best regards, Dmytro

Dmytro Kovalov http://dmytro.github.com

2013/3/19 Rolf Timmermans notifications@github.com

For anyone running into this problem, please check the following:

  • Do you have associations between your models? Disconnected models are not normally included (change with disconnected=true).
  • Is the database in the environment you are running rake erd in (typically development) fully migrated?
  • Copy your database schema/migrations and models into an empty application. Are you able to generate a diagram?
  • If so, what is the difference between this "bare bones" application and your original application?

Troubleshooting applications without having complete access to them is near impossible. If anyone can provide me a complete application that fails to generate useful diagrams when fully migrated and with associations present I can be of more help.

— Reply to this email directly or view it on GitHubhttps://github.com/voormedia/rails-erd/issues/42#issuecomment-15111168 .

bf4 commented 10 years ago

Comment by phlegx Wednesday Apr 17, 2013 at 07:47 GMT


Dmytro,

Did you find a solution? I opened a bug report on the same issue. rolftimmermans referenced to it.

best p

bf4 commented 10 years ago

Comment by dmytro Wednesday Apr 17, 2013 at 08:09 GMT


No. Still in the dark. Although I didn't spend too much time with it.

Dmytro Kovalov http://dmytro.github.com

2013/4/17 Phlegx Systems notifications@github.com

Dmytro,

Did you find a solution? I opened a bug report on the same issue. rolftimmermans referenced to it.

best p

— Reply to this email directly or view it on GitHubhttps://github.com/voormedia/rails-erd/issues/42#issuecomment-16491597 .

bf4 commented 10 years ago

Comment by espinosa Monday Jun 03, 2013 at 13:52 GMT


Hi,

Have same error: No entities found; create your models first!

Resovlved by replacing line 154 in diagram.rb -- options.only && entity.model && ![options.only].flatten.include?(entity.name.to_sym) or ++ !options.only.empty? && entity.model && ![options.only].flatten.include?(entity.name.to_sym) or

Regards,

bf4 commented 10 years ago

Comment by phlegx Wednesday Jun 05, 2013 at 14:03 GMT


espinosa, I can confirm this works for me as well! Thank you for finding out!

I created a pull request: https://github.com/voormedia/rails-erd/pull/55

bf4 commented 10 years ago

Comment by mleszcz Wednesday Sep 18, 2013 at 09:43 GMT


+1 "espinosa, I can confirm this works for me as well! Thank you for finding out!"

mark-jordalew commented 8 years ago

+1 "espinosa, I can confirm this works for me as well! Thank you for finding out!" - great work!