当我在rails应用程序中使用时,我得到了一个奇怪的错误。下面是我的doorkeeper.rb文件的样子:
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为什么会出现这样的错误?
发布于 2016-11-27 04:57:57
我真傻!我忘记运行安装门卫LOL时所需的迁移。
https://stackoverflow.com/questions/40825769
复制相似问题