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

Mongoid 7 support #3013

Closed
flvrone opened this issue Apr 17, 2018 · 2 comments
Closed

Mongoid 7 support #3013

flvrone opened this issue Apr 17, 2018 · 2 comments

Comments

@flvrone
Copy link

flvrone commented Apr 17, 2018

Here's an error I'm getting on Mongoid 7:

undefined method `macro' for #<Mongoid::Association::Referenced::BelongsTo:0x00007efea4728220>

rails_admin (1.3.0) lib/rails_admin/adapters/mongoid/association.rb:105:in `macro'
rails_admin (1.3.0) lib/rails_admin/adapters/mongoid/association.rb:48:in `foreign_key'
rails_admin (1.3.0) lib/rails_admin/config/fields/factories/association.rb:6:in `block (2 levels) in <main>'
rails_admin (1.3.0) lib/rails_admin/config/fields/factories/association.rb:6:in `each'
rails_admin (1.3.0) lib/rails_admin/config/fields/factories/association.rb:6:in `detect'
rails_admin (1.3.0) lib/rails_admin/config/fields/factories/association.rb:6:in `block in <main>'
rails_admin (1.3.0) lib/rails_admin/config/fields.rb:54:in `block (2 levels) in factory'
rails_admin (1.3.0) lib/rails_admin/config/fields.rb:54:in `each'
rails_admin (1.3.0) lib/rails_admin/config/fields.rb:54:in `detect'
rails_admin (1.3.0) lib/rails_admin/config/fields.rb:54:in `block in factory'
rails_admin (1.3.0) lib/rails_admin/config/fields.rb:50:in `each'
rails_admin (1.3.0) lib/rails_admin/config/fields.rb:50:in `factory'
rails_admin (1.3.0) lib/rails_admin/config/has_fields.rb:130:in `_fields'
rails_admin (1.3.0) lib/rails_admin/config/has_fields.rb:133:in `_fields'
rails_admin (1.3.0) lib/rails_admin/config/has_fields.rb:108:in `all_fields'
rails_admin (1.3.0) lib/rails_admin/config/has_fields.rb:83:in `fields'
rails_admin (1.3.0) app/controllers/rails_admin/main_controller.rb:123:in `get_collection'
rails_admin (1.3.0) app/controllers/rails_admin/main_controller.rb:37:in `list_entries'
rails_admin (1.3.0) lib/rails_admin/config/actions/index.rb:30:in `block (2 levels) in <class:Index>'
rails_admin (1.3.0) app/controllers/rails_admin/main_controller.rb:22:in `instance_eval'
rails_admin (1.3.0) app/controllers/rails_admin/main_controller.rb:22:in `index'
actionpack (5.2.0) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (5.2.0) lib/abstract_controller/base.rb:194:in `process_action'
actionpack (5.2.0) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.2.0) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (5.2.0) lib/active_support/callbacks.rb:132:in `run_callbacks'
actionpack (5.2.0) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (5.2.0) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (5.2.0) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (5.2.0) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.0) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
activesupport (5.2.0) lib/active_support/notifications.rb:168:in `instrument'
actionpack (5.2.0) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack (5.2.0) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
actionpack (5.2.0) lib/abstract_controller/base.rb:134:in `process'
actionview (5.2.0) lib/action_view/rendering.rb:32:in `process'
actionpack (5.2.0) lib/action_controller/metal.rb:191:in `dispatch'
actionpack (5.2.0) lib/action_controller/metal.rb:252:in `dispatch'
actionpack (5.2.0) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
actionpack (5.2.0) lib/action_dispatch/routing/route_set.rb:34:in `serve'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:52:in `block in serve'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:35:in `each'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:35:in `serve'
actionpack (5.2.0) lib/action_dispatch/routing/route_set.rb:840:in `call'
railties (5.2.0) lib/rails/engine.rb:524:in `call'
railties (5.2.0) lib/rails/railtie.rb:190:in `public_send'
railties (5.2.0) lib/rails/railtie.rb:190:in `method_missing'
actionpack (5.2.0) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
actionpack (5.2.0) lib/action_dispatch/routing/mapper.rb:48:in `serve'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:52:in `block in serve'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:35:in `each'
actionpack (5.2.0) lib/action_dispatch/journey/router.rb:35:in `serve'
actionpack (5.2.0) lib/action_dispatch/routing/route_set.rb:840:in `call'
rack-pjax (1.0.0) lib/rack/pjax.rb:12:in `call'
rack (2.0.4) lib/rack/method_override.rb:22:in `call'
rack (2.0.4) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.4) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.2.0) lib/action_dispatch/middleware/cookies.rb:670:in `call'
remotipart (1.3.1) lib/remotipart/middleware.rb:32:in `call'
rack (2.0.4) lib/rack/etag.rb:25:in `call'
rack (2.0.4) lib/rack/conditional_get.rb:25:in `call'
rack (2.0.4) lib/rack/head.rb:12:in `call'
actionpack (5.2.0) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (5.2.0) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (5.2.0) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (5.2.0) lib/action_dispatch/middleware/executor.rb:14:in `call'
rollbar (2.15.5) lib/rollbar/middleware/rails/rollbar.rb:24:in `block in call'
rollbar (2.15.5) lib/rollbar.rb:145:in `scoped'
rollbar (2.15.5) lib/rollbar/middleware/rails/rollbar.rb:22:in `call'
actionpack (5.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
rollbar (2.15.5) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
actionpack (5.2.0) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.0) lib/rails/rack/logger.rb:28:in `call'
actionpack (5.2.0) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.0) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.4) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.0) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.0) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.4) lib/rack/sendfile.rb:111:in `call'
railties (5.2.0) lib/rails/engine.rb:524:in `call'
puma (3.11.3) lib/puma/configuration.rb:225:in `call'
puma (3.11.3) lib/puma/server.rb:624:in `handle_request'
puma (3.11.3) lib/puma/server.rb:438:in `process_client'
puma (3.11.3) lib/puma/server.rb:302:in `block in run'
puma (3.11.3) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
@byteg
Copy link

byteg commented Jun 19, 2018

Facing the same problem on 2.5.1, Rails 5.2, Mongoid 7.0.1, RailsAdmin 1.3.

@pilotbena
Copy link

Hello, I have the same problem with Mongoid 7.1.0, RailsAdmin 1.3.0 and Rails 5.2.0.

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

3 participants