The Wayback Machine - https://web.archive.org/web/20200906110338/https://github.com/ClosureTree/closure_tree/issues/362/
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

Warning of hierarchy class constant already defined #362

Open
ryanb opened this issue Apr 24, 2020 · 2 comments
Open

Warning of hierarchy class constant already defined #362

ryanb opened this issue Apr 24, 2020 · 2 comments

Comments

@ryanb
Copy link

@ryanb ryanb commented Apr 24, 2020

I'm seeing warnings in the log when reloading a page in development after altering a model that has closure_tree added.

/Users/rbates/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/closure_tree-7.1.0/lib/closure_tree/support.rb:36: warning: already initialized constant CategoryHierarchy
/Users/rbates/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/closure_tree-7.1.0/lib/closure_tree/support.rb:36: warning: previous definition of CategoryHierarchy was here

I've tested this in a new Rails app and confirmed it happens in the latest version of Rails (6.0.2.2).

I haven't noticed any other issues, but it would be nice to remove these warnings.

@jimhj
Copy link

@jimhj jimhj commented Jun 20, 2020

facing the same warning:
rails 6.0.0
closure_tree 7.1.0

@phlegx
Copy link

@phlegx phlegx commented Jul 9, 2020

I have the same warnings.

ruby: 2.7.1
rails: 6.0.3.2
closure_tree: 7.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.