GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I'm using railsadmin with mongoid, but when I load railsadmin it crashes with the following error:
RuntimeError - Type Moped::BSON::Binary for field :rendered_pdf in Invoice not supported:
(gem) rails_admin-0.4.6/lib/rails_admin/adapters/mongoid.rb:305:in `type_lookup'
(gem) rails_admin-0.4.6/lib/rails_admin/adapters/mongoid.rb:92:in `block in properties'
(gem) rails_admin-0.4.6/lib/rails_admin/adapters/mongoid.rb:85:in `properties'
(gem) rails_admin-0.4.6/lib/rails_admin/config/actions/dashboard.rb:29:in `block (3 levels) in <class:Dashboard>'
(gem) rails_admin-0.4.6/lib/rails_admin/config/actions/dashboard.rb:24:in `block (2 levels) in <class:Dashboard>'
(gem) actionpack-3.2.11/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
(gem) actionpack-3.2.11/lib/abstract_controller/base.rb:167:in `process_action'
(gem) actionpack-3.2.11/lib/action_controller/metal/rendering.rb:10:in `process_action'
(gem) actionpack-3.2.11/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:513:in `_run__3907890206384098903__process_action__2505316672246447833__callbacks'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks'
(gem) actionpack-3.2.11/lib/abstract_controller/callbacks.rb:17:in `process_action'
(gem) actionpack-3.2.11/lib/action_controller/metal/rescue.rb:29:in `process_action'
(gem) actionpack-3.2.11/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
(gem) activesupport-3.2.11/lib/active_support/notifications.rb:123:in `block in instrument'
(gem) activesupport-3.2.11/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
(gem) activesupport-3.2.11/lib/active_support/notifications.rb:123:in `instrument'
(gem) actionpack-3.2.11/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
(gem) actionpack-3.2.11/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
It seems to be that I'm using a binary field on one of my documents and railsadmin doesn't support that.
I've noticed that for other databases there have been issues with binary types too.
Ignore binary fields in mongoid for #1582
To reproduce: have a model that contains a binary field, then load the main rails admin URL. The rails admin dashboard never loads - I get the above error instead.
The fix for this has been merged now