将Amber部署到Heroku

时间:2018-09-11 15:31:38

标签: heroku amber-framework

TL; DR 琥珀色(Granite ORM)在确定用于Postgres模式的驱动程序时遇到问题。


我有一个最近部署到Heroku的应用程序。遵循这些文档,我可以将默认的脚手架应用程序部署到Heroku。

进一步构建应用程序,我在数据库中添加了一个数据库。为了部署它,我意识到我必须以某种方式将DATABASE_URL添加到Amber中。为此,我运行amber e对生产细节进行加密,将带有ENV["DATABASE_URL"]的数据库URL添加到Yaml文件中,然后将加密的生产数据库上传到Heroku。

加载应用程序时,出现以下错误?有什么想法吗?

ERROR: no driver was registered for the schema "", did you maybe forget to require the database driver? (ArgumentError)
  from ???
  from /tmp/crystal/share/crystal/src/hash.cr:152:5 in 'database'
  from /tmp/build_7b930c5cce776ceed341783001cb3a8d/lib/db/src/db/query_methods.cr:38:7 in '->'
  from /tmp/build_7b930c5cce776ceed341783001cb3a8d/lib/granite/src/granite/collection.cr:255:3 in 'call'
  from /tmp/crystal/share/crystal/src/http/server/handler.cr:24:7 in 'call'
  from /tmp/crystal/share/crystal/src/http/server/handler.cr:24:7 in 'call'
  from /tmp/crystal/share/crystal/src/http/server/handler.cr:24:7 in 'call'
  from /tmp/crystal/share/crystal/src/http/server/handler.cr:24:7 in 'call'
  from /tmp/crystal/share/crystal/src/http/server/handler.cr:24:7 in 'call'
  from /tmp/crystal/share/crystal/src/http/server/handler.cr:24:7 in '???'
  from /tmp/crystal/share/crystal/src/http/server/handler.cr:24:7 in 'call_next'
  from /tmp/build_7b930c5cce776ceed341783001cb3a8d/lib/amber/src/amber/pipes/powered_by_amber.cr:6:9 in '???'
  from /tmp/crystal/share/crystal/src/http/server/request_processor.cr:39:11 in 'process'
  from /tmp/crystal/share/crystal/src/fiber.cr:255:3 in '???'
  from ???

我当前正在使用

  • Amber CLI(amberframework.org)-v0.9.0
  • 水晶0.26.1(2018-08-27)
  • LLVM:6.0.1
  • 默认目标:x86_64-apple-macosx

0 个答案:

没有答案