Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 6.1 support #363

Closed
AlecRust opened this issue Dec 11, 2020 · 6 comments
Closed

Rails 6.1 support #363

AlecRust opened this issue Dec 11, 2020 · 6 comments

Comments

@AlecRust
Copy link

My ERB Rake task (the default generated by this gem) is running fine on Rails 6.0.3 but on Rails 6.1 I get:

Loading application environment...
Loading code in search of Active Record models...
Generating Entity-Relationship Diagram for 136 models...
rails aborted!
NoMethodError: undefined method `parent' for MyApplication::Application:Class
Did you mean?  present?
/Users/alec/projects/my-application/bin/rails:12:in `<top (required)>'
/Users/alec/projects/my-application/bin/spring:10:in `require'
/Users/alec/projects/my-application/bin/spring:10:in `block in <top (required)>'
/Users/alec/projects/my-application/bin/spring:7:in `tap'
/Users/alec/projects/my-application/bin/spring:7:in `<top (required)>'
Tasks: TOP => erd => erd:generate
(See full trace by running task with --trace)
@guapolo
Copy link

guapolo commented Dec 12, 2020

Hello, a possible cause is: domain.rb:52 won't work anymore (Module::parent is deprecated on Rails 6.1 https://edgeguides.rubyonrails.org/6_1_release_notes.html#active-support-removals)

This was referenced Dec 12, 2020
@guapolo
Copy link

guapolo commented Dec 12, 2020

I needed to finish my Rails version bump fast and continue working, so I just created a quick patch for this issue, at least it should provide a pointer to the maintainers of the project to solve this (I'm sure that they'll do it in a more elegant manner). Cheers 🍻

@guapolo
Copy link

guapolo commented Dec 12, 2020

Just saw that this is a duplicate of #358, better solution in that thread. Will close my PR.

@0bserver07
Copy link

0bserver07 commented Feb 13, 2021

a quick hack here until someone responds to the PR:


mkdir lib/rails_erd/

touch lib/rails_erd/domain.rb

copy the commit content from this file here to below file:

ib/rails_erd/domain.rb

@lulalala
Copy link

Can confirm the newly released 1.6.1 fixes this issue

@kerrizor
Copy link
Collaborator

@lulalala thanks for the confirmation!
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants