我正在进行此截屏演练:http://andreapavoni.com/blog/2013/8/a-rails-4-tutorial-application-for-beginners/#.U9EkF7FouwU
似乎程序没有识别Devise方法,我已经对它进行了两次捆绑安装。
以下是错误消息:
<pre>
undefined method `devise_for' for #<ActionDispatch::Routing::Mapper:0x3fb2230>
Extracted source (around line #3):
1
2
3
4
5
6
Rails.application.routes.draw do
# Devise was getting an error message, devise_for method
devise_for :users
resources :bookmarks
# The priority is based upon order of creation: first created -> highest priority.
Rails.root: C:/Sites/rubystuff/bookmarks
Application Trace | Framework Trace | Full Trace
config/routes.rb:3:in `block in <top (required)>'
config/routes.rb:1:in `<top (required)>'
This error occurred while loading the following files:
C:/Sites/rubystuff/bookmarks/config/routes.rb
<code>
我的配置/路由/ .rb
<pre>
Rails.application.routes.draw do
# Devise was getting an error message, devise_for method
devise_for :users
resources :bookmarks
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
root 'bookmarks#index'
end
<code>
我使用的是rails 4.1.1和ruby 1.9.3。非常感谢你的帮助。