You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:570:in `retrieve_connection': No connection pool for Hierarchy (ActiveRecord::ConnectionNotEstablished)
from /usr/local/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
from /usr/local/lib/ruby/gems/2.2.0/gems/activerecord-4.2.5.1/lib/active_record/connection_handling.rb:87:in `connection'
from /usr/local/lib/ruby/gems/2.2.0/gems/closure_tree-6.0.0/lib/closure_tree/support_attributes.rb:60:in `quoted_hierarchy_table_name'
from /usr/local/lib/ruby/gems/2.2.0/gems/closure_tree-6.0.0/lib/closure_tree/model.rb:14:in `block in <module:Model>'
from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/concern.rb:120:in `class_eval'
from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/concern.rb:120:in `append_features'
from /usr/local/lib/ruby/gems/2.2.0/gems/closure_tree-6.0.0/lib/closure_tree/has_closure_tree.rb:25:in `include'
from /usr/local/lib/ruby/gems/2.2.0/gems/closure_tree-6.0.0/lib/closure_tree/has_closure_tree.rb:25:in `has_closure_tree'
Do you maybe know how can I fix it? I will be very appreciate :)
The text was updated successfully, but these errors were encountered:
Yep, fortunately :)
Please take a look at my gem: Monarchy
I cannot initialize closure_tree during gem loading cuz of no database connection, so I moved the part with acts_as_tree to an app folder, which is automatically merged with project's app folder.
hm... this is already in the app directory tree, not being packaged by a gem.
i did a bit of troubleshooting late yesterday -- a my original proof-of-concept code worked (but was a sinatra app, it's now a CLI app). I got the new app working when I added sinatra-activerecord to the Gemfile. Presumably that's adding some necessary initialization, haven't figured out what that might be, yet.
Hi @mceachen,
Im working on Hierarchical access management system with roles inheritance gem and I want to use your solution. But...
When I have sth like (example bellow) inside my gem's model file
I always get:
Do you maybe know how can I fix it? I will be very appreciate :)
The text was updated successfully, but these errors were encountered: