Question: rails_admin ActionView::Template::Error Only generation of json objects or arrays allowed

Question

rails_admin ActionView::Template::Error Only generation of json objects or arrays allowed

Answers 0
Added at 2016-11-11 06:11
Tags
Question

I added this new migration on a really-working-well-with-no-errors rails_admin app

add_column :my_table, :json_field, :json, null: false, default: '{}'
# add_column :my_table, :json_field, :jsonb, null: false, default: '{}' \\I tried this one too and same results...!

and when go add a record from /admin/my_table/new HTML Page (or to edit), I get this error

ActionView::Template::Error: only generation of JSON objects or arrays allowed
{"status":500,"error":"Internal Server Error","exception":"#\u003cActionView::Template::Error: only generation of JSON objects or arrays allowed\u003e","traces":{"Application Trace":[],"Framework Trace":[{"id":0,"trace":"E:/Ruby/ruby/lib/ruby/2.2.0/json/common.rb:285:in `generate'"},{"id":1,"trace":"E:/Ruby/ruby/lib/ruby/2.2.0/json/common.rb:285:in `pretty_generate'"},{"id":2,"trace":"rails_admin (1.0.0) lib/rails_admin/config/fields/types/json.rb:13:in `block in \u003cclass:Json\u003e'"},{"id":3,"trace":"rails_admin (1.0.0) lib/rails_admin/config/configurable.rb:66:in `instance_eval'"},{"id":4,"trace":"rails_admin (1.0.0) lib/rails_admin/config/configurable.rb:66:in `block in register_instance_option'"},{"id":5,"trace":"rails_admin (1.0.0) lib/rails_admin/config/fields/base.rb:332:in `form_value'"},{"id":6,"trace":"rails_admin (1.0.0) app/views/rails_admin/main/_form_text.html.haml:1:in `_____uby_ruby_lib_ruby_gems_______gems_rails_admin_______app_views_rails_admin_main__form_text_html_haml___534120177_82264128'"},{"id":7,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:158:in `block in render'"},{"id":8,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:166:in `instrument'"},{"id":9,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:348:in `instrument'"},{"id":10,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:156:in `render'"},{"id":11,"trace":"actionview (5.0.0.1) lib/action_view/renderer/partial_renderer.rb:343:in `render_partial'"},{"id":12,"trace":"actionview (5.0.0.1) lib/action_view/renderer/partial_renderer.rb:311:in `block in render'"},{"id":13,"trace":"actionview (5.0.0.1) lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'"},{"id":14,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `block in instrument'"},{"id":15,"trace":"activesupport (5.0.0.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'"},{"id":16,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `instrument'"},{"id":17,"trace":"actionview (5.0.0.1) lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'"},{"id":18,"trace":"actionview (5.0.0.1) lib/action_view/renderer/partial_renderer.rb:310:in `render'"},{"id":19,"trace":"actionview (5.0.0.1) lib/action_view/renderer/renderer.rb:47:in `render_partial'"},{"id":20,"trace":"actionview (5.0.0.1) lib/action_view/renderer/renderer.rb:21:in `render'"},{"id":21,"trace":"actionview (5.0.0.1) lib/action_view/helpers/rendering_helper.rb:32:in `render'"},{"id":22,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:10:in `block in render_with_haml'"},{"id":23,"trace":"haml (4.0.7) lib/haml/helpers.rb:89:in `non_haml'"},{"id":24,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:10:in `render_with_haml'"},{"id":25,"trace":"rails_admin (1.0.0) lib/rails_admin/config/fields/base.rb:227:in `block in \u003cclass:Base\u003e'"},{"id":26,"trace":"rails_admin (1.0.0) lib/rails_admin/config/configurable.rb:66:in `instance_eval'"},{"id":27,"trace":"rails_admin (1.0.0) lib/rails_admin/config/configurable.rb:66:in `block in register_instance_option'"},{"id":28,"trace":"rails_admin (1.0.0) lib/rails_admin/config/proxyable/proxy.rb:27:in `method_missing'"},{"id":29,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:73:in `field_for'"},{"id":30,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:58:in `block in input_for'"},{"id":31,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:39:in `block in capture'"},{"id":32,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'"},{"id":33,"trace":"haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'"},{"id":34,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:39:in `capture'"},{"id":35,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'"},{"id":36,"trace":"actionview (5.0.0.1) lib/action_view/helpers/tag_helper.rb:107:in `content_tag'"},{"id":37,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:69:in `content_tag_with_haml'"},{"id":38,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:57:in `input_for'"},{"id":39,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:46:in `block in field_wrapper_for'"},{"id":40,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:39:in `block in capture'"},{"id":41,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'"},{"id":42,"trace":"haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'"},{"id":43,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:39:in `capture'"},{"id":44,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'"},{"id":45,"trace":"actionview (5.0.0.1) lib/action_view/helpers/tag_helper.rb:107:in `content_tag'"},{"id":46,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:69:in `content_tag_with_haml'"},{"id":47,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:44:in `field_wrapper_for'"},{"id":48,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:35:in `block (2 levels) in fieldset_for'"},{"id":49,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:35:in `collect'"},{"id":50,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:35:in `block in fieldset_for'"},{"id":51,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:39:in `block in capture'"},{"id":52,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'"},{"id":53,"trace":"haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'"},{"id":54,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:39:in `capture'"},{"id":55,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'"},{"id":56,"trace":"actionview (5.0.0.1) lib/action_view/helpers/tag_helper.rb:107:in `content_tag'"},{"id":57,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:69:in `content_tag_with_haml'"},{"id":58,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:31:in `fieldset_for'"},{"id":59,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:16:in `block (2 levels) in generate'"},{"id":60,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:15:in `collect'"},{"id":61,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:15:in `block in generate'"},{"id":62,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:131:in `without_field_error_proc_added_div'"},{"id":63,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/form_builder.rb:7:in `generate'"},{"id":64,"trace":"rails_admin (1.0.0) app/views/rails_admin/main/new.html.haml:2:in `block in _____uby_ruby_lib_ruby_gems_______gems_rails_admin_______app_views_rails_admin_main_new_html_haml___490903078_80338356'"},{"id":65,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:137:in `call'"},{"id":66,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:137:in `block (2 levels) in form_for_with_haml'"},{"id":67,"trace":"haml (4.0.7) lib/haml/helpers.rb:278:in `with_tabs'"},{"id":68,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:137:in `block in form_for_with_haml'"},{"id":69,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:39:in `block in capture'"},{"id":70,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:203:in `with_output_buffer'"},{"id":71,"trace":"haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'"},{"id":72,"trace":"actionview (5.0.0.1) lib/action_view/helpers/capture_helper.rb:39:in `capture'"},{"id":73,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'"},{"id":74,"trace":"actionview (5.0.0.1) lib/action_view/helpers/form_helper.rb:450:in `form_for'"},{"id":75,"trace":"haml (4.0.7) lib/haml/helpers/action_view_mods.rb:139:in `form_for_with_haml'"},{"id":76,"trace":"haml (4.0.7) lib/haml/helpers/action_view_xss_mods.rb:28:in `form_for_with_haml_xss'"},{"id":77,"trace":"rails_admin (1.0.0) app/helpers/rails_admin/main_helper.rb:9:in `rails_admin_form_for'"},{"id":78,"trace":"rails_admin (1.0.0) app/views/rails_admin/main/new.html.haml:1:in `_____uby_ruby_lib_ruby_gems_______gems_rails_admin_______app_views_rails_admin_main_new_html_haml___490903078_80338356'"},{"id":79,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:158:in `block in render'"},{"id":80,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:166:in `instrument'"},{"id":81,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:348:in `instrument'"},{"id":82,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:156:in `render'"},{"id":83,"trace":"actionview (5.0.0.1) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'"},{"id":84,"trace":"actionview (5.0.0.1) lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'"},{"id":85,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `block in instrument'"},{"id":86,"trace":"activesupport (5.0.0.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'"},{"id":87,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `instrument'"},{"id":88,"trace":"actionview (5.0.0.1) lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'"},{"id":89,"trace":"actionview (5.0.0.1) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'"},{"id":90,"trace":"actionview (5.0.0.1) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'"},{"id":91,"trace":"actionview (5.0.0.1) lib/action_view/renderer/template_renderer.rb:52:in `render_template'"},{"id":92,"trace":"actionview (5.0.0.1) lib/action_view/renderer/template_renderer.rb:14:in `render'"},{"id":93,"trace":"actionview (5.0.0.1) lib/action_view/renderer/renderer.rb:42:in `render_template'"},{"id":94,"trace":"actionview (5.0.0.1) lib/action_view/renderer/renderer.rb:23:in `render'"},{"id":95,"trace":"actionview (5.0.0.1) lib/action_view/rendering.rb:103:in `_render_template'"},{"id":96,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/streaming.rb:217:in `_render_template'"},{"id":97,"trace":"actionview (5.0.0.1) lib/action_view/rendering.rb:83:in `render_to_body'"},{"id":98,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/rendering.rb:52:in `render_to_body'"},{"id":99,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/renderers.rb:144:in `render_to_body'"},{"id":100,"trace":"actionpack (5.0.0.1) lib/abstract_controller/rendering.rb:26:in `render'"},{"id":101,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/rendering.rb:36:in `render'"},{"id":102,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'"},{"id":103,"trace":"activesupport (5.0.0.1) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'"},{"id":104,"trace":"E:/Ruby/ruby/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'"},{"id":105,"trace":"activesupport (5.0.0.1) lib/active_support/core_ext/benchmark.rb:12:in `ms'"},{"id":106,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:44:in `block in render'"},{"id":107,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'"},{"id":108,"trace":"activerecord (5.0.0.1) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'"},{"id":109,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:43:in `render'"},{"id":110,"trace":"remotipart (1.3.1) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart'"},{"id":111,"trace":"rails_admin (1.0.0) lib/rails_admin/config/actions/new.rb:28:in `block (4 levels) in \u003cclass:New\u003e'"},{"id":112,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/mime_responds.rb:201:in `call'"},{"id":113,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/mime_responds.rb:201:in `respond_to'"},{"id":114,"trace":"rails_admin (1.0.0) lib/rails_admin/config/actions/new.rb:27:in `block (2 levels) in \u003cclass:New\u003e'"},{"id":115,"trace":"rails_admin (1.0.0) app/controllers/rails_admin/main_controller.rb:22:in `instance_eval'"},{"id":116,"trace":"rails_admin (1.0.0) app/controllers/rails_admin/main_controller.rb:22:in `new'"},{"id":117,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'"},{"id":118,"trace":"actionpack (5.0.0.1) lib/abstract_controller/base.rb:188:in `process_action'"},{"id":119,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/rendering.rb:30:in `process_action'"},{"id":120,"trace":"actionpack (5.0.0.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'"},{"id":121,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:126:in `call'"},{"id":122,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:126:in `call'"},{"id":123,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'"},{"id":124,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:455:in `call'"},{"id":125,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:455:in `call'"},{"id":126,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:101:in `__run_callbacks__'"},{"id":127,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'"},{"id":128,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'"},{"id":129,"trace":"actionpack (5.0.0.1) lib/abstract_controller/callbacks.rb:19:in `process_action'"},{"id":130,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/rescue.rb:20:in `process_action'"},{"id":131,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'"},{"id":132,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `block in instrument'"},{"id":133,"trace":"activesupport (5.0.0.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'"},{"id":134,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `instrument'"},{"id":135,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'"},{"id":136,"trace":"actionpack (5.0.0.1) lib/action_controller/metal/params_wrapper.rb:248:in `process_action'"},{"id":137,"trace":"activerecord (5.0.0.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'"},{"id":138,"trace":"actionpack (5.0.0.1) lib/abstract_controller/base.rb:126:in `process'"},{"id":139,"trace":"actionview (5.0.0.1) lib/action_view/rendering.rb:30:in `process'"},{"id":140,"trace":"actionpack (5.0.0.1) lib/action_controller/metal.rb:190:in `dispatch'"},{"id":141,"trace":"actionpack (5.0.0.1) lib/action_controller/metal.rb:262:in `dispatch'"},{"id":142,"trace":"actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'"},{"id":143,"trace":"actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:32:in `serve'"},{"id":144,"trace":"actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:39:in `block in serve'"},{"id":145,"trace":"actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:26:in `each'"},{"id":146,"trace":"actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:26:in `serve'"},{"id":147,"trace":"actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:725:in `call'"},{"id":148,"trace":"railties (5.0.0.1) lib/rails/engine.rb:522:in `call'"},{"id":149,"trace":"railties (5.0.0.1) lib/rails/railtie.rb:193:in `public_send'"},{"id":150,"trace":"railties (5.0.0.1) lib/rails/railtie.rb:193:in `method_missing'"},{"id":151,"trace":"actionpack (5.0.0.1) lib/action_dispatch/routing/mapper.rb:17:in `block in \u003cclass:Constraints\u003e'"},{"id":152,"trace":"actionpack (5.0.0.1) lib/action_dispatch/routing/mapper.rb:46:in `call'"},{"id":153,"trace":"actionpack (5.0.0.1) lib/action_dispatch/routing/mapper.rb:46:in `serve'"},{"id":154,"trace":"actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:39:in `block in serve'"},{"id":155,"trace":"actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:26:in `each'"},{"id":156,"trace":"actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:26:in `serve'"},{"id":157,"trace":"actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:725:in `call'"},{"id":158,"trace":"rack-pjax (1.0.0) lib/rack/pjax.rb:12:in `call'"},{"id":159,"trace":"rack (2.0.1) lib/rack/method_override.rb:22:in `call'"},{"id":160,"trace":"remotipart (1.3.1) lib/remotipart/middleware.rb:32:in `call'"},{"id":161,"trace":"rack (2.0.1) lib/rack/etag.rb:25:in `call'"},{"id":162,"trace":"rack (2.0.1) lib/rack/conditional_get.rb:25:in `call'"},{"id":163,"trace":"rack (2.0.1) lib/rack/head.rb:12:in `call'"},{"id":164,"trace":"activerecord (5.0.0.1) lib/active_record/migration.rb:552:in `call'"},{"id":165,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'"},{"id":166,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:97:in `__run_callbacks__'"},{"id":167,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'"},{"id":168,"trace":"activesupport (5.0.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'"},{"id":169,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in `call'"},{"id":170,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'"},{"id":171,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'"},{"id":172,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'"},{"id":173,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'"},{"id":174,"trace":"railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'"},{"id":175,"trace":"railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'"},{"id":176,"trace":"activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'"},{"id":177,"trace":"activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'"},{"id":178,"trace":"activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'"},{"id":179,"trace":"railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'"},{"id":180,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'"},{"id":181,"trace":"rack (2.0.1) lib/rack/runtime.rb:22:in `call'"},{"id":182,"trace":"activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'"},{"id":183,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'"},{"id":184,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'"},{"id":185,"trace":"rack (2.0.1) lib/rack/sendfile.rb:111:in `call'"},{"id":186,"trace":"rack-cors (0.4.0) lib/rack/cors.rb:80:in `call'"},{"id":187,"trace":"rack-cors (0.4.0) lib/rack/cors.rb:80:in `call'"},{"id":188,"trace":"railties (5.0.0.1) lib/rails/engine.rb:522:in `call'"},{"id":189,"trace":"puma (3.6.0) lib/puma/configuration.rb:225:in `call'"},{"id":190,"trace":"puma (3.6.0) lib/puma/server.rb:578:in `handle_request'"},{"id":191,"trace":"puma (3.6.0) lib/puma/server.rb:415:in `process_client'"},{"id":192,"trace":"puma (3.6.0) lib/puma/server.rb:275:in `block in run'"},{"id":193,"trace":"puma (3.6.0) lib/puma/thread_pool.rb:116:in `call'"},{"id":194,"trace":"puma (3.6.0) lib/puma/thread_pool.rb:116:in `block in spawn_thread'"}],"Full Trace":[{"id":0,"trace":"E:/Ruby/ruby/lib/ruby/2.2.0/json/common.rb:285:in `generate'"},{"id":1,"trace":"E:/Ruby/ruby/lib/ruby/2.2.0/json/common.rb:285:in `pretty_generate'"},{"id":2,"trace":"rails_admin (1.0.0) lib/rails_admin/config/fields/types/json.rb:13:in `block in \u003cclass:Json\u003e'"},{"id":3,"trace":"rails_admin (1.0.0) lib/rails_admin/config/configurable.rb:66:in `instance_eval'"},{"id":4,"trace":"rails_admin (1.0.0) lib/rails_admin/config/configurable.rb:66:in `block in register_instance_option'"},{"id":5,"trace":"rails_admin (1.0.0) lib/rails_admin/config/fields/base.rb:332:in `form_value'"},{"id":6,"trace":"rails_admin (1.0.0) app/views/rails_admin/main/_form_text.html.haml:1:in `_____uby_ruby_lib_ruby_gems_______gems_rails_admin_______app_views_rails_admin_main__form_text_html_haml___534120177_82264128'"},{"id":7,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:158:in `block in render'"},{"id":8,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:166:in `instrument'"},{"id":9,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:348:in `instrument'"},{"id":10,"trace":"actionview (5.0.0.1) lib/action_view/template.rb:156:in `render'"},{"id":11,"trace":"actionview (5.0.0.1) lib/action_view/renderer/partial_renderer.rb:343:in `render_partial'"},{"id":12,"trace":"actionview (5.0.0.1) lib/action_view/renderer/partial_renderer.rb:311:in `block in render'"},{"id":13,"trace":"actionview (5.0.0.1) lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'"},{"id":14,"trace":"activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `block in instrument'"},{"id":15,"trace":"activesupport (5.0.0.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'"},{16...177},{"id":178,"trace":"activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'"},{"id":179,"trace":"railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'"},{"id":180,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'"},{"id":181,"trace":"rack (2.0.1) lib/rack/runtime.rb:22:in `call'"},{"id":182,"trace":"activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'"},{"id":183,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'"},{"id":184,"trace":"actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'"},{"id":185,"trace":"rack (2.0.1) lib/rack/sendfile.rb:111:in `call'"},{"id":186,"trace":"rack-cors (0.4.0) lib/rack/cors.rb:80:in `call'"},{"id":187,"trace":"rack-cors (0.4.0) lib/rack/cors.rb:80:in `call'"},{"id":188,"trace":"railties (5.0.0.1) lib/rails/engine.rb:522:in `call'"},{"id":189,"trace":"puma (3.6.0) lib/puma/configuration.rb:225:in `call'"},{"id":190,"trace":"puma (3.6.0) lib/puma/server.rb:578:in `handle_request'"},{"id":191,"trace":"puma (3.6.0) lib/puma/server.rb:415:in `process_client'"},{"id":192,"trace":"puma (3.6.0) lib/puma/server.rb:275:in `block in run'"},{"id":193,"trace":"puma (3.6.0) lib/puma/thread_pool.rb:116:in `call'"},{"id":194,"trace":"puma (3.6.0) lib/puma/thread_pool.rb:116:in `block in spawn_thread'"}]}}

I found that json support has been added on Feb 2014 from this SO post, but is this error occuring due to the lack of support for json fields? How do I solve it?

Answers to

rails_admin ActionView::Template::Error Only generation of json objects or arrays allowed

Source Show
◀ Wstecz