2011-11-07 227 views
0

但是我遇到了「新用戶」註冊表的問題。Ruby on Rails路由錯誤?

有人可以解釋這個錯誤嗎?

我在註冊頁面得到這個錯誤:

No Method Error 

undefined method `users_path' for #<#<Class:0x104b06c60>:0x104b018f0> 

Extracted source (around line #6): 

3: <br /> 
4: 
5: <div> 
6: <%= form_for(@user, :id => 'registration_form') do |f| %> 
7:  <h2>Get started!</h2> 
8:  <%= render 'shared/error_messages', :object => f.object %> 
9:  <table> 

回答

0

你錯過了用戶的路線。該錯誤與Mongo無關 - 請檢查您的routes.rb並確保您已定義正確的路由。

0

users_path方法由您的routes.rb文件生成。只要確保你有這個在那裏:

resources :users