現在、Devise の実装をテストしています。サインアップ フォーム以外はすべて正常に動作しています。
フラッシュ メッセージ エラー:
無効なメールアドレスまたはパスワード。
次に、サインイン フォームに移動します。
どこが間違っているのかわかりません。
サインアップフォーム:
<h2>Sign Up</h2>
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'form-vertical' }) do |f| %>
<%= f.error_notification %>
<%= f.input :name, :autofocus => true %>
<%= f.input :email, :required => true %>
<%= f.input :password, :required => true %>
<%= f.input :password_confirmation, :required => true %>
<%= f.button :submit, 'Sign up', :class => 'button' %>
<% end %>
<% render 'devise/shared/links' %>
ルート:
authenticated :user do
root :to => 'home#index'
end
devise_for :users
resources :users
root :to => 'home#index'
resources :songs
get 'home/index'
match 'home/about', :to => 'home#about'
match 'home/contact', :to => 'home#contact'
Rails サーバー:
Started POST "/users/sign_in" for 127.0.0.1 at 2013-03-01 16:42:47 +1000
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"DxwF+dMC//5UIX5beKhzaBLjnB2xaJe7pQb/C3xNK1k=", "user"=>{"name"=>"test", "email"=>"asdfas@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'asdfas@gmail.com' LIMIT 1
Completed 401 Unauthorized in 2ms
Processing by Devise::SessionsController#new as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"DxwF+dMC//5UIX5beKhzaBLjnB2xaJe7pQb/C3xNK1k=", "user"=>{"name"=>"test", "email"=>"asdfas@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
Rendered /Users/thmsmxwll/.rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/app/views/devise/shared/_links.erb (0.4ms)
Rendered devise/sessions/new.html.erb within layouts/application (7.5ms)
Rendered layouts/_navigation.html.erb (0.5ms)
Rendered layouts/_messages.html.erb (0.1ms)
Rendered layouts/_footer.html.erb (0.0ms)
Completed 200 OK in 104ms (Views: 19.1ms | ActiveRecord: 0.0ms)