路线在当地工作正常但不在生产中

时间:2013-02-27 06:58:47

标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1 ruby-on-rails-3.2

我目前正在尝试让我的Ruby on Rails应用程序在生产环境中运行。它工作正常,但是当我在嵌套命名空间下添加路由时,它给出了错误说

  

ActionController :: RoutingError(未初始化的常量Agent :: Clients :: AccountController)

此路由在我的本地计算机上正常运行,路由如下所示

namespace :agent do
root                     :to => redirect('url')
match 'dashboard',       :to => 'dashboard#index'
match 'account',         :to => 'account#edit'
match 'account/update',  :to => 'account#update'

namespace :clients do
  root              :to => redirect('url')

**# This part I added and is giving routing error**   
  match 'accounts/invite', :to => 'clients/account#invite'
  match 'accounts/sendinvite', :to => 'clients/account#send_invitation'

我的佣金路线正确地给出了路线。 有关如何解决此问题的任何建议吗?

1 个答案:

答案 0 :(得分:0)

所以你要么想做

match 'accounts/invite', :to => 'clients/accounts#invite'
match 'accounts/sendinvite', :to => 'clients/accounts#send_invitation'

或者

match 'accounts/invite', :to => 'agent/account#invite'
match 'accounts/sendinvite', :to => 'agent/account#send_invitation'