Я пытаюсь добавить 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: in rescue in visit'
arel (2.0.6) lib/arel/visitors/visitor.rb:15:in
visit '
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 / users / 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: в accept'
arel (2.0.6) lib/arel/visitors/to_sql.rb:19: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
accept '
arel (2.0.6) lib / arel / tree_manager.rb: 19: in 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:in version'
app/views/viewer/show.html.erb:50:in
_app_views_viewer_show_html_erb ___ 31693 0644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 484 644 644 644 644 644 644 644 484 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 644 4ееБАЙДЖАНДЖБИЛДЖИ /.
actionpack (3.0.3) lib / action_view / template.rb: 135: в block in render'
activesupport (3.0.3) lib/active_support/notifications.rb:54:in
instrument '
actionpack (3.0.3) lib / action_view / template.rb: 127: в render'
actionpack (3.0.3) lib/action_view/render/rendering.rb:59:in
блоке в _render_template '
activesupport (3.0.3) lib / active_support / notifications.rb: 52: в block in instrument'
activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:in
instrument '
activesupport (3.0.3) lib / active_support / notifications.rb: 52: в instrument'
actionpack (3.0.3) lib/action_view/render/rendering.rb:56:in
_render_template '
actionpack (3.0.3) lib / action_view / render / render.ring: 26: in render'
actionpack (3.0.3) lib/abstract_controller/rendering.rb:114:in
_render_template '
actionpack (3.0.3) lib / abstract_controller / render.rb: 108: в render_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: в render_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: в render'
actionpack (3.0.3) lib/action_controller/metal/rendering.rb:17:in
render '
actionpack (3.0.3) lib / action_controller / metal / instrumentation.rb: 40: в block (2 levels) in render'
activesupport (3.0.3) lib/active_support/core_ext/benchmark.rb:5:in
блоке в мс '
/home/florian/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/benchmark.rb:309:in realtime'
activesupport (3.0.3) lib/active_support/core_ext/benchmark.rb:5:in
мс '
actionpack (3.0.3) lib / action_controller / metal / instrumentation.rb: 40: в block 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: в cleanup_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: in default_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: in process_action'
actionpack (3.0.3) lib/action_controller/metal/rendering.rb:11:in
process_action '
actionpack (3.0.3) lib / abstract_controller / callbacks.rb: 18: in block in process_action'
activesupport (3.0.3) lib/active_support/callbacks.rb:450:in
run _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 '
actionpack (3.0.3) lib / abstract_controller / callbacks.rb: 17: в process_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: в block in instrument'
activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:in
instrument '
activesupport (3.0.3) lib / active_support / notifications.rb: 52: в instrument'
actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:29:in
process_action 'actionpack (3.0.3) lib / action_controller / metal / rescue.rb: 17: в process_action'
actionpack (3.0.3) lib/abstract_controller/base.rb:120:in
process '
actionpack (3.0.3) lib / abstract_controller / render.rb: 40: in process'
actionpack (3.0.3) lib/action_controller/metal.rb:138:in
dispatch '
actionpack (3.0.3) lib / action_controller / metal / rack_delegation.rb: 14: блок dispatch'
actionpack (3.0.3) lib/action_controller/metal.rb:178:in
в действии '
actionpack (3.0.3) lib / action_dispatch / routing / route_set.rb: 62: в call'
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: в call'
rack-mount (0.6.13) lib/rack/mount/route_set.rb:148:in
блоке в вызове '
монтирование в стойку (0.6.13) lib / rack / mount / code_generation.rb: 93: в block 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: в recognize'
rack-mount (0.6.13) lib/rack/mount/route_set.rb:139:in
call '
actionpack (3.0.3) lib / action_dispatch / routing / route_set.rb: 492: в call'
warden (1.0.2) lib/warden/manager.rb:35:in
блоке в вызове '
warden (1.0.2) lib / warden / manager.rb: 34: в catch'
warden (1.0.2) lib/warden/manager.rb:34:in
call '
actionpack (3.0.3) lib / action_dispatch / middleware / best_standards_support.rb: 17: в call'
actionpack (3.0.3) lib/action_dispatch/middleware/head.rb:14:in
call '
rack (1.2.1) lib / rack / metadoverride.rb: 24: в call'
actionpack (3.0.3) lib/action_dispatch/middleware/params_parser.rb:21:in
call '
actionpack (3.0.3) lib / action_dispatch / middleware / flash.rb: 182: в call'
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: в block in call'
activerecord (3.0.3) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in
кэш '
activerecord (3.0.3) lib / active_record / query_cache.rb: 12: в cache'
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: в call'
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: в call'
railties (3.0.3) lib/rails/rack/logger.rb:13:in
call '
rack (1.2.1) lib / rack / runtime.rb: 17: in call'
activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in
call '
rack (1.2.1) lib / rack / lock.rb: 11: в block in call'
<internal:prelude>:10:in
синхронизировать '
rack (1.2.1) lib / rack / lock.rb: 11: в call'
actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in
вызов '
railties (3.0.3) lib / rails / application.rb: 168: в call'
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
вызов '
rack (1.2.1) lib / rack / handler / webrick.rb: 52: в service'
/home/florian/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:111:in
service '
/home/florian/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:70:in run'
/home/florian/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/server.rb:183:in
блок в start_thread '