0
我的路由在一臺機器上完美工作,但在另一臺機器上,它們失敗了,我很難弄清楚什麼是錯誤的。在發生故障的機器它/返回下列錯誤的GET /組/我和組分別rails在路由上添加「static_content」
No route matches {:controller=>"groups/owner/static_content", :topic=>"general"}
No route matches {:controller=>"groups/static_content", :topic=>"general"}
我不知道在哪裏
static_controller
和
:topic =>「general」
來自,因爲他們沒有出現在我的路線文件中的任何地方。基本上我有一條路線,如
namespace :groups , :as => nil do
root :to => 'groups#index'
resources :groups, :only => [:show, :new, :create], :path => '' do
collection do
get :search
get 'my' => 'owner/groups#my', :as => :my
end
member do
post :subscribe
end
... other resources within a group
end
end
任何想法我做錯了或我失蹤了?我在rvm上使用rails 3.2.2和ruby 1.9.3
嘗試運行'rake routes',它可能會闡明一些你的路由問題。 'static_content'和':topic =>「general」'從視圖中被調用,你應該在那裏尋找任何線索。 – Vikko
我做過了,它顯示了我期望它們的路徑。 /groups/my(.:format)和/groups(.:format)都使用GET – serengeti12
而':root =>「?#?」'?它是否在耙路線中列出?你也許想看看index.html.erb,看看是否有某種'<%= link_to> Something「general_groups_static_content_path%>'或什麼的。 – Vikko