首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么在DoorKeeper中出现“语句无效”错误?

为什么在DoorKeeper中出现“语句无效”错误?
EN

Stack Overflow用户
提问于 2016-11-27 04:33:30
回答 1查看 85关注 0票数 0

当我在rails应用程序中使用时,我得到了一个奇怪的错误。下面是我的doorkeeper.rb文件的样子:

代码语言:javascript
复制
  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时,它会抛出以下错误:

代码语言:javascript
复制
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

为什么会出现这样的错误?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-11-27 04:57:57

我真傻!我忘记运行安装门卫LOL时所需的迁移。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40825769

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档