【发布时间】:2014-03-28 02:07:50
【问题描述】:
我正在使用带有设计、管理员、声明式授权和omniauth 的Rails 4。
当我运行 rails 服务器来尝试测试我的初始设置时,我的所有初始页面都会收到一条错误消息。
当我键入 go to localhost:3000 - 我收到一个错误,显示“Invalid strategy some_external_strategy”错误将我引导到应用程序控制器 - 使用此方法:
def set_current_user
Authorization.current_user = current_user
end
对于作为生成的脚手架的一部分自动创建的每个视图,我都会遇到相同的错误。
当我尝试导航到 localhost:3000/home/index 时,我收到一条错误消息:“No route matches [GET] "/home/index"
我的路线文件在第一行有以下内容:
root :to => 'home#index'
我有一个 home_controller.rb,其中包含以下代码:
class HomeController < ApplicationController
def index
end
end
非常感谢任何有关如何解决此问题的想法或建议。
非常感谢。
【问题讨论】:
标签: ruby-on-rails devise omniauth declarative-authorization warden