2016-11-27 71 views
0

在我的rails应用程序中使用Doorkeeper时出现一个特殊错误。这里是我的doorkeeper.rb文件看起来是这样的:声明在DoorKeeper错误中无效

Doorkeeper.configure do 
    # Change the ORM that doorkeeper will use (needs plugins) 
    orm :active_record 

    # This block will be called to check whether the resource owner is authenticated or not. 
    resource_owner_authenticator do |routes| 
    # Put your resource owner authentication logic here. 
    # Example implementation: 
    User.find_by_id(session[:user_id]) || redirect_to(routes.login_url) 
    end 

end 

当我去的路线localhost:3000/oauth/authorize我登录的用户,它抛出这个错误:

ActiveRecord::StatementInvalid in Doorkeeper::AuthorizationsController#new 
     Could not find table oauth_application 
     def table_structure(table_name) 
      structure = exec_query("PRAGMA table_info(#{quote_table_name(table_name)})", 'SCHEMA') 
      raise(ActiveRecord::StatementInvalid, "Could not find table '#{table_name}'") if structure.empty? 
      table_structure_with_collation(table_name, structure) 
     end 

谁能告诉我为什么这个错误可能发生?感谢提供帮助。

回答

0

傻傻的我!我忘了安装门卫LOL