使用monogid 6.0.0和rails 5
这是我的控制者:
def index
@images = Image.page(7).per(50).padding(3)
end
并查看:
<% @images.each do |image| %>
<tr>
<td><%= image.image %></td>
<td><%= image.mime %></td>
<td><%= image.user_id %></td>
<td><%= image.product_ids %></td>
<td><%= image.updated_at %></td>
<td><%= image.created_at %></td>
<td><%= link_to 'Show', image %></td>
<td><%= link_to 'Edit', edit_image_path(image) %></td>
<td><%= link_to 'Destroy', image, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
<%= paginate @images %>
追踪:
actionview(5.0.1)lib / action_view / template.rb:159:在
block in render' activesupport (5.0.1) lib/active_support/notifications.rb:166:in
工具&#39;的ActionView (5.0.1)lib / action_view / template.rb:354:在instrument' actionview (5.0.1) lib/action_view/template.rb:157:in
渲染&#39; actionview(5.0.1) lib / action_view / renderer / template_renderer.rb:54:在block (2 levels) in render_template' actionview (5.0.1) lib/action_view/renderer/abstract_renderer.rb:42:in
块中 仪器&#39; activesupport(5.0.1) lib / active_support / notifications.rb:164:inblock in instrument' activesupport (5.0.1) lib/active_support/notifications/instrumenter.rb:21:in
instrument&#39; activesupport(5.0.1)lib / active_support / notifications.rb:164:ininstrument' actionview (5.0.1) lib/action_view/renderer/abstract_renderer.rb:41:in
仪器&#39; actionview(5.0.1)lib / action_view / renderer / template_renderer.rb:53:inblock in render_template' actionview (5.0.1) lib/action_view/renderer/template_renderer.rb:61:in
render_with_layout&#39; actionview(5.0.1) lib / action_view / renderer / template_renderer.rb:52:在render_template' actionview (5.0.1) lib/action_view/renderer/template_renderer.rb:14:in
渲染&#39; actionview(5.0.1)lib / action_view / renderer / renderer.rb:42:inrender_template' actionview (5.0.1) lib/action_view/renderer/renderer.rb:23:in
渲染&#39; actionview(5.0.1) lib / action_view / rendering.rb:103:在_render_template' actionpack (5.0.1) lib/action_controller/metal/streaming.rb:217:in
_ render_template&#39; actionview(5.0.1) lib / action_view / rendering.rb:83:在render_to_body' actionpack (5.0.1) lib/action_controller/metal/rendering.rb:52:in
render_to_body&#39; actionpack(5.0.1)lib / action_controller / metal / renderers.rb:142:inrender_to_body' actionpack (5.0.1) lib/abstract_controller/rendering.rb:26:in
渲染&#39; actionpack(5.0.1) lib / action_controller / metal / rendering.rb:36:在render' actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:44:in
块中(2 渲染&#39; activesupport(5.0.1) lib / active_support / core_ext / benchmark.rb:12:inblock in ms' /home/draf/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:in
实时&#39; activesupport(5.0.1) lib / active_support / core_ext / benchmark.rb:12:在ms' actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:44:in
块中渲染&#39; actionpack(5.0.1) LIB / action_controller /金属/ instrumentation.rb:87:在cleanup_view_runtime' actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:43:in
渲染&#39; actionpack(5.0.1) lib / action_controller / metal / implicit_render.rb:36:在default_render' actionpack (5.0.1) lib/action_controller/metal/basic_implicit_render.rb:4:in
块中 send_action&#39; actionpack(5.0.1) lib / action_controller / metal / basic_implicit_render.rb:4:在tap' actionpack (5.0.1) lib/action_controller/metal/basic_implicit_render.rb:4:in
send_action&#39; actionpack(5.0.1) lib / abstract_controller / base.rb:188:在process_action' actionpack (5.0.1) lib/action_controller/metal/rendering.rb:30:in
process_action&#39; actionpack(5.0.1) lib / abstract_controller / callbacks.rb:20:inblock in process_action' activesupport (5.0.1) lib/active_support/callbacks.rb:126:in
call&#39; activesupport(5.0.1)lib / active_support / callbacks.rb:506:inblock (2 levels) in compile' activesupport (5.0.1) lib/active_support/callbacks.rb:455:in
call&#39; activesupport(5.0.1) lib / active_support / callbacks.rb:101:在__run_callbacks__' activesupport (5.0.1) lib/active_support/callbacks.rb:750:in
_ run_process_action_callbacks&#39; activesupport(5.0.1) lib / active_support / callbacks.rb:90:在run_callbacks' actionpack (5.0.1) lib/abstract_controller/callbacks.rb:19:in
process_action&#39; actionpack(5.0.1)lib / action_controller / metal / rescue.rb:20:inprocess_action' actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:32:in
阻止 process_action&#39; activesupport(5.0.1) lib / active_support / notifications.rb:164:inblock in instrument' activesupport (5.0.1) lib/active_support/notifications/instrumenter.rb:21:in
instrument&#39; activesupport(5.0.1)lib / active_support / notifications.rb:164:ininstrument' actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:30:in
process_action&#39; actionpack(5.0.1) lib / action_controller / metal / params_wrapper.rb:248:process_action' actionpack (5.0.1) lib/abstract_controller/base.rb:126:in
进程&#39; actionview(5.0.1)lib / action_view / rendering.rb:30:在process' actionpack (5.0.1) lib/action_controller/metal.rb:190:in
发送&#39; actionpack(5.0.1)lib / action_controller / metal.rb:262:在dispatch' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:50:in
发送&#39; actionpack(5.0.1) lib / action_dispatch / routing / route_set.rb:32:在serve' actionpack (5.0.1) lib/action_dispatch/journey/router.rb:39:in
块中的服务&#39; actionpack(5.0.1)lib / action_dispatch / journey / router.rb:26:ineach' actionpack (5.0.1) lib/action_dispatch/journey/router.rb:26:in
serve&#39; actionpack(5.0.1)lib / action_dispatch / routing / route_set.rb:725:incall' rack (2.0.1) lib/rack/etag.rb:25:in
呼叫&#39;机架(2.0.1) lib / rack / conditional_get.rb:25:incall' rack (2.0.1) lib/rack/head.rb:12:in
来电&#39;机架(2.0.1) lib / rack / session / abstract / id.rb:222:context' rack (2.0.1) lib/rack/session/abstract/id.rb:216:in
来电&#39; actionpack(5.0.1) lib / action_dispatch / middleware / cookies.rb:613:在call' actionpack (5.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in
块中 叫&#39; activesupport(5.0.1)lib / active_support / callbacks.rb:97:in__run_callbacks__' activesupport (5.0.1) lib/active_support/callbacks.rb:750:in
_ run_call_callbacks&#39; activesupport(5.0.1)lib / active_support / callbacks.rb:90:inrun_callbacks' actionpack (5.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in
呼叫&#39; ActionPack的 (5.0.1)lib / action_dispatch / middleware / executor.rb:12:在call' actionpack (5.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in
电话&#39; actionpack(5.0.1) lib / action_dispatch / middleware / debug_exceptions.rb:49:incall' web-console (3.4.0) lib/web_console/middleware.rb:135:in
call_app&#39; web-console(3.4.0)lib / web_console / middleware.rb:28:inblock in call' web-console (3.4.0) lib/web_console/middleware.rb:18:in
catch&#39; web-console(3.4.0)lib / web_console / middleware.rb:18:incall' actionpack (5.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in
call&#39; railties(5.0.1)lib / rails / rack / logger.rb:36:incall_app' railties (5.0.1) lib/rails/rack/logger.rb:24:in
阻止通话&#39;的ActiveSupport (5.0.1)lib / active_support / tagged_logging.rb:69:在block in tagged' activesupport (5.0.1) lib/active_support/tagged_logging.rb:26:in
标记的&#39; activesupport(5.0.1) lib / active_support / tagged_logging.rb:69:intagged' railties (5.0.1) lib/rails/rack/logger.rb:24:in
来电&#39;链轮导轨(3.2.0) lib / sprockets / rails / quiet_assets.rb:13:incall' actionpack (5.0.1) lib/action_dispatch/middleware/request_id.rb:24:in
call&#39;机架(2.0.1) lib / rack / method_override.rb:22:call' rack (2.0.1) lib/rack/runtime.rb:22:in
来电&#39; activesupport(5.0.1) LIB / active_support /缓存/策略/ local_cache_middleware.rb:28:在call' actionpack (5.0.1) lib/action_dispatch/middleware/executor.rb:12:in
呼叫&#39; ActionPack的 (5.0.1)lib / action_dispatch / middleware / static.rb:136:在call' rack (2.0.1) lib/rack/sendfile.rb:111:in
电话&#39;铁路(5.0.1) lib / rails / engine.rb:522:在call' puma (3.7.0) lib/puma/configuration.rb:226:in
来电&#39;美洲狮(3.7.0) lib / puma / server.rb:578:在handle_request' puma (3.7.0) lib/puma/server.rb:415:in
process_client&#39;美洲狮(3.7.0) lib / puma / server.rb:275:在spawn_thread的block in run' puma (3.7.0) lib/puma/thread_pool.rb:120:in
块中&#39;