Rails 3.0.3: использование vestal_versions с globalize3
Я пытаюсь добавить vestal_versions (1.2.2) на сайт, который использует globalize3 (0.0.11) для локализации моделей.
Когда я пытаюсь отобразить версию модели следующим образом:
<% if can?(:edit, Page) then %>
<div class="edit_link"><%= link_to image_tag("appicons/edit.png", :alt => t(:edit)), edit_page_path(@page) %><br />
Version <%= @page.version %></div>
<% end %>
Я получил:
Ошибка типа в Viewer#show
Показывает /home/florian/spzwww3/app/views/viewer/show.html.erb, где поднята строка #50:
Не могу посетить Условие
Линия № 50 - это та, @page.version
Отображение версии в консоли работает нормально:
ruby-1.9.2-p0 > p = Page.find(:last)
ruby-1.9.2-p0 > p.version
=> 1
Любые идеи, что означает условие "Не удается посетить условие"?
Я никогда не видел это сообщение раньше, и Google возвращает только один несвязанный результат для этой фразы.
Заранее спасибо за любые советы.
Вот полный след:
arel (2.0.6) lib / arel / users / visitor.rb: 21: в
rescue in visit' arel (2.0.6) lib/arel/visitors/visitor.rb:15:in
посетите ' arel (2.0.6) lib/arel/ посетители /to_sql.rb:109: вvisit_Arel_Nodes_Grouping' arel (2.0.6) lib/arel/visitors/visitor.rb:15:in
посетите ' arel (2.0.6) lib/arel/ посетители /to_sql.rb:89: вblock in visit_Arel_Nodes_SelectCore' arel (2.0.6) lib/arel/visitors/to_sql.rb:89:in
map' arel (2.0.6) lib/arel/ посетители /to_sql.rb:89: вvisit_Arel_Nodes_SelectCore' arel (2.0.6) lib/arel/visitors/to_sql.rb:77:in
блок в файле visit_Arel_Nodes_SelectStatement' arel (2.0.6) lib/arel/ посетители /to_sql.rb:77: вmap' arel (2.0.6) lib/arel/visitors/to_sql.rb:77:in
visit_Arel_Nodes_SelectStatement' arel (2.0.6) lib/arel/ посетителей /sqlite.rb:7: вvisit_Arel_Nodes_SelectStatement' arel (2.0.6) lib/arel/visitors/visitor.rb:15:in
посетите ' arel (2.0.6) lib/arel/ users / visitor.rb: 5: inaccept' arel (2.0.6) lib/arel/visitors/to_sql.rb:19:in
block in accept 'activerecord (3.0.3) lib / active_record / connection_adapters / abstract / connection_pool.rb: 110: вwith_connection' arel (2.0.6) lib/arel/visitors/to_sql.rb:17:in
принять ' arel (2.0.6) lib/arel/tree_manager.rb:19: вto_sql' activerecord (3.0.3) lib/active_record/relation.rb:318:in
to_sql' activerecord (3.0.3) lib/active_record/ratio / computing.rb:207: вexecute_simple_calculation' activerecord (3.0.3) lib/active_record/relation/calculations.rb:182:in
execute_calculation 'activerecord (3.0.3) lib / active_record / ratio / computing.rb: 152: вcalculate' activerecord (3.0.3) lib/active_record/relation/calculations.rb:84:in
максимум ' activerecord (3.0.3) lib/active_record/base.rb:442: вmaximum' activerecord (3.0.3) lib/active_record/associations/association_collection.rb:443:in
блок в method_missing' activerecord (3.0.3) lib/active_record/base.rb:1121: вwith_scope' activerecord (3.0.3) lib/active_record/associations/association_proxy.rb:203:in
with_scope' activerecord (3.0.3) lib/active_record/association /association_collection.rb:439: вmethod_missing' /home/florian/.rvm/gems/ruby-1.9.2-p0/bundler/gems/vestal_versions-6273df533f85/lib/vestal_versions/reversion.rb:66:in
last_version '/home/florian/.rvm/gems/ruby-1.9.2-p0/bundler/gems/vestal_versions-6273df533f85/lib/vestal_versions/reversion.rb:10:inversion' app/views/viewer/show.html.erb:50:in
_app_views_viewer_show_html_erb___3169340765490706064_17989400_4488323425482422564 'actionpack (3.0.3) lib / action_view / template.rb: 135: вblock in render' activesupport (3.0.3) lib/active_support/notifications.rb:54:in
Инструментарий ' actionpack (3.0.3) lib/action_view/template.rb:127:inrender' actionpack (3.0.3) lib/action_view/render/rendering.rb:59:in
блок в _render_template' activesupport (3.0.3) lib/active_support/notifications.rb:52:inblock in instrument' activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:in
Инструмент 'activesupport (3.0.3) lib / active_support / notifications.rb: 52: ininstrument' actionpack (3.0.3) lib/action_view/render/rendering.rb:56:in
_render_template 'actionpack (3.0.3) lib / action_view / render /dering.rb: 26: inrender' actionpack (3.0.3) lib/abstract_controller/rendering.rb:114:in
_render_template 'actionpack (3.0.3) lib / abstract_controller / render.rb: 108: inrender_to_body' actionpack (3.0.3) lib/action_controller/metal/renderers.rb:47:in
render_to_body 'actionpack (3.0.3) lib / action_controller / metal / compatibility.rb: 55: inrender_to_body' actionpack (3.0.3) lib/abstract_controller/rendering.rb:101:in
render_to_string 'actionpack (3.0.3) lib / abstract_controller / render.rb: 92: inrender' actionpack (3.0.3) lib/action_controller/metal/rendering.rb:17:in
render 'actionpack (3.0.3) lib / action_controller / metal / instrumentation.rb: 40: inblock (2 levels) in render' activesupport (3.0.3) lib/active_support/core_ext/benchmark.rb:5:in
блок в ms '/home/florian/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/benchmark.rb:309:inrealtime' activesupport (3.0.3) lib/active_support/core_ext/benchmark.rb:5:in
ms 'actionpack (3.0.3) lib / action_controller / metal / instrumentation.rb: 40: inblock in render' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:78:in
cleanup_view_runtime 'activerecord (3.0.3) lib / active_record / railties / controller_runtime.rb: 15: incleanup_view_runtime' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:39:in
render 'actionpack (3.0.3) lib / action_controller / metal / implicit_render.rb: 10: indefault_render' actionpack (3.0.3) lib/action_controller/metal/implicit_render.rb:5:in
send_action 'actionpack (3.0.3) lib / abstract_controller / base.rb: 151: inprocess_action' actionpack (3.0.3) lib/action_controller/metal/rendering.rb:11:in
action_action' actionpack (3.0.3) lib/abstract_controller/callbacks.rb:18:inblock in process_action' activesupport (3.0.3) lib/active_support/callbacks.rb:450:in
запустите_2100642650872989332__process_action_2749632540183314212_callbacks 'activesupport (3.0.3) lib / active_support / callbacks.rb: 409: в_run_process_action_callbacks' activesupport (3.0.3) lib/active_support/callbacks.rb:93:in
Пакет действий run_callbacks (3.0.3) lib/abstract_controller/callbacks.rb:17:inprocess_action' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:30:in
блок в process_action' activesupport (3.0.3) lib/active_support/notifications.rb:52:inblock in instrument' activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:in
Инструмент 'activesupport (3.0.3) lib / active_support / notifications.rb: 52: ininstrument' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:29:in
action_action' actionpack (3.0.3) lib/action_controller/metal/rescue.rb:17:inprocess_action' actionpack (3.0.3) lib/abstract_controller/base.rb:120:in
процесс 'actionpack (3.0.3) lib / abstract_controller / render.rb: 40: inprocess' actionpack (3.0.3) lib/action_controller/metal.rb:138:in
dispatch 'actionpack (3.0.3) lib / action_controller / metal / rack_delegation.rb: 14: indispatch' actionpack (3.0.3) lib/action_controller/metal.rb:178:in
блок в действии 'actionpack (3.0.3) lib / action_dispatch / routing / route_set.rb: 62: incall' actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:62:in
dispatch 'actionpack (3.0.3) lib / action_dispatch / routing / route_set.rb: 27: incall' rack-mount (0.6.13) lib/rack/mount/route_set.rb:148:in
блок в call 'монтируется в стойку (0.6.13) lib / rack / mount / code_generation.rb: 93: inblock in recognize' rack-mount (0.6.13) lib/rack/mount/code_generation.rb:264:in
optimized_each 'стойку (0.6.13) lib/rack/mount/code_generation.rb:92:inrecognize' rack-mount (0.6.13) lib/rack/mount/route_set.rb:139:in
вызов ' actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:492: вcall' warden (1.0.2) lib/warden/manager.rb:35:in
блок в call' warden (1.0.2) lib/warden/manager.rb:34:incatch' warden (1.0.2) lib/warden/manager.rb:34:in
вызов 'actionpack (3.0.3) lib / action_dispatch / middleware / best_standards_support.rb: 17: incall' actionpack (3.0.3) lib/action_dispatch/middleware/head.rb:14:in
call 'rack (1.2.1) lib / rack / metadoverride.rb:24:incall' actionpack (3.0.3) lib/action_dispatch/middleware/params_parser.rb:21:in
вызов 'actionpack (3.0.3) lib / action_dispatch / middleware / flash.rb: 182: incall' actionpack (3.0.3) lib/action_dispatch/middleware/session/abstract_store.rb:149:in
call 'actionpack (3.0.3) lib / action_dispatch / middleware / cookies.rb: 295: вcall' /home/florian/.rvm/gems/ruby-1.9.2-p0/bundler/gems/rails-ckeditor-49cb3b60b3ed/lib/ckeditor/middleware.rb:15:in
call 'activerecord (3.0.3) lib / active_record / query_cache.rb: 32: inblock in call' activerecord (3.0.3) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in
cache 'activerecord (3.0.3) lib / active_record / query_cache.rb: 12: incache' activerecord (3.0.3) lib/active_record/query_cache.rb:31:in
call 'activerecord (3.0.3) lib / active_record / connection_adapters / abstract / connection_pool.rb: 353: вcall' actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:46:in
блок в вызове ' activesupport (3.0.3) lib/active_support/callbacks.rb:415: в_run_call_callbacks' actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in
call' rack (1.2.1) lib/rack/sendfile.rb:107:incall' actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in
вызов 'actionpack (3.0.3) lib / action_dispatch / middleware / show_exceptions.rb: 46: incall' railties (3.0.3) lib/rails/rack/logger.rb:13:in
call 'rack (1.2.1) lib / rack / runtime.rb: 17: incall' activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in
call 'rack (1.2.1) lib / rack / lock.rb: 11: inblock in call' <internal:prelude>:10:in
синхронизировать 'rack (1.2.1) lib / rack / lock.rb: 11: incall' actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in
call 'railties (3.0.3) lib / rails / application.rb: 168: incall' railties (3.0.3) lib/rails/application.rb:77:in
method_missing 'railties (3.0.3) lib / rails / rack / log_tailer.rb: 14: вcall' rack (1.2.1) lib/rack/content_length.rb:13:in
call' rack (1.2.1) lib/rack/handler/webrick.rb:52:inservice' /home/florian/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:111:in
служба ' /home/florian/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:70:inrun' /home/florian/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/server.rb:183:in
блок в start_thread '