0
我目前正試圖讓我的Ruby on Rails應用程序在生產環境中運行。它工作正常,但是當我一個嵌套的命名空間下添加路由它給我錯誤說在當地工作正常但不在生產中的路線
的ActionController :: RoutingError(未初始化的常數代理::客戶::的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'
我耙途徑給予妥善的路線。 任何建議如何解決這個問題?
你有一個叫代理::客戶::中的AccountController控制器:應用程序/控制器/代理/客戶/ account_controller.rb – rainkinz 2013-02-27 07:33:16
可能是一個多元化的問題:'clients/accounts#invite' vs'clients/account#invite'等等,檢查你的控制器是否被命名爲你認爲應該命名的名稱 – Brian 2013-02-27 07:45:36
你在命名空間的末尾是否有'end'塊? – Edward 2013-02-27 07:47:31