#<ActionDispatch::Routing::RoutesProxy> 的未定义方法`api_path'

问题描述

我在访问 Rails 项目中的页面时遇到以下错误 -

ActionView::Template::Error (undefined method `api_path' for #<Actiondispatch::Routing::RoutesProxy:0x00008e561044gs42>):

我在特定行上收到错误 -

- if allowed_by_plan('api_integration')
    = link_to "#{CONfig[$skey]['brand']} API",app.api_path,{ class: active_class(app.api_path),data: {parent: '#profile-nav'}}

附上错误的痕迹以供更多说明 -

 actionpack (4.2.11.3) lib/action_dispatch/routing/routes_proxy.rb:37:in `method_missing'
  engines/app/app/views/app/sidenav/_profile_menu.html.haml:11:in `_engines_app_app_views_app_sidenav__profile_menu_html_haml__3594012503633114979_69941412451100'
  actionview (4.2.11.3) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.11.3) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.11.3) lib/action_view/template.rb:337:in `instrument'
  actionview (4.2.11.3) lib/action_view/template.rb:143:in `render'
  actionview (4.2.11.3) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
  actionview (4.2.11.3) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
  actionview (4.2.11.3) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.11.3) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.11.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.11.3) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.11.3) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  actionview (4.2.11.3) lib/action_view/renderer/partial_renderer.rb:309:in `render'
  actionview (4.2.11.3) lib/action_view/renderer/renderer.rb:51:in `render_partial'
  actionview (4.2.11.3) lib/action_view/renderer/renderer.rb:25:in `render'
  actionview (4.2.11.3) lib/action_view/helpers/rendering_helper.rb:32:in `render'
  haml (5.2.1) lib/haml/helpers/action_view_mods.rb:13:in `block in render'
  haml (5.2.1) lib/haml/helpers.rb:93:in `non_haml'
  haml (5.2.1) lib/haml/helpers/action_view_mods.rb:13:in `render'
  engines/app/app/views/app/sidenav/_customer_nav.html.haml:36:in `_engines_app_app_views_app_sidenav__customer_nav_html_haml__1429088226201557624_69941420498620'
  actionview (4.2.11.3) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.2.11.3) lib/active_support/notifications.rb:166:in `instrument'
  actionview (4.2.11.3) lib/action_view/template.rb:337:in `instrument'
  actionview (4.2.11.3) lib/action_view/template.rb:143:in `render'
  actionview (4.2.11.3) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
  actionview (4.2.11.3) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
  actionview (4.2.11.3) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
  activesupport (4.2.11.3) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.11.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.11.3) lib/active_support/notifications.rb:164:in `instrument'
  actionview (4.2.11.3) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
  actionview (4.2.11.3) lib/action_view/renderer/partial_renderer.rb:309:in `render'
  actionview (4.2.11.3) lib/action_view/renderer/renderer.rb:51:in `render_partial'
  actionview (4.2.11.3) lib/action_view/renderer/renderer.rb:25:in `render'
  actionview (4.2.11.3) lib/action_view/helpers/rendering_helper.rb:32:in `render'

如果有人知道如何解决这个错误,请帮忙。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...