1

我正在尝试按照此处的说明进行操作:https ://devcenter.heroku.com/articles/clojure-web-application

一切都很好,直到我输入的步骤

(sql/with-connection (System/getenv "DATABASE_URL")
     (sql/create-table :testing [:data :text]))

进入 Leiningen 的 REPL。我收到此错误:

org.postgresql.util.PSQLException: Something unusual has occured to cause the driver to fail.  Please report this exception.  (NO_SOURCE_FILE:0)

然后,Leiningen 甚至不会执行该(exit)函数。是什么赋予了?

请帮忙,谢谢。

4

2 回答 2

2

我有同样的问题。我尝试了 Marko Topolnik 的建议,但它们对我不起作用,但这个可以:

export DATABASE_URL=postgresql://localhost/shouter
于 2012-04-12T20:03:27.957 回答
1

汉斯·恩格尔是对的。如果您连接到localhost,请使用以下两种 URL 形式之一:

jdbc:postgresql:shouter

jdbc:postgresql://localhost/shouter

并且一定要检查官方文档

于 2012-04-11T10:40:31.813 回答