2016-11-27 33 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