我无法修复这个在Rails 3.2.12中,也许我错过了一些东西。路由错误 - 未初始化的常量
配置/ routes.rb中
get "home/index"
root :to => "home#index"
devise_for :users, :only => :omniauth_callbacks
match 'users/auth/:provider/callback' => 'authentications#create'
match '/auth/:provider/signout' => 'authentications#signout'
应用程序/控制器/ authentication_controller.rb
class AuthenticationsController < ApplicationController
...
end
应用/模型/ authentication.rb
class Authentication < ActiveRecord::Base
...
end
我认为它应该与我目前的知识一起工作,但有一些我错过了。
我的亲切的问题是告诉什么是错的,请。
Rounting错误
uninitialized constant AuthenticationsController
这是一个消息,在http://localhost:3000/auth/facebook/signout
哦。谢谢@alfonso。我以这种方式创建了控制器'rails g controller authentication',因此文件本身被命名为'authentication_controller.rb',也许我更改了类名称。非常感谢您回答这样一个众所周知的问题。 – Davit 2013-04-06 00:20:09
@Davit提示:在生成控制器时,您应始终使用复数形式。 – Bonifacio2 2014-03-13 18:08:05