【问题标题】:Is lein-heroku 0.1.1 compatible with leiningen 2?lein-heroku 0.1.1 与 leiningen 2 兼容吗?
【发布时间】:2012-11-30 02:26:39
【问题描述】:

我在使用 lein-heroku 0.1.1 和 lein 2 时遇到了一些问题。

我在 OS X Lion 上全新安装了来自 https://github.com/technomancy/leiningen/wiki/Upgrading 的 lein。

以下是重要信息:

$ lein --version
Leiningen 2.0.0-preview10 on Java 1.7.0_09 Java HotSpot(TM) 64-Bit Server VM

$ cat ~/.lein/profiles.clj 
{:user {:plugins [ 
    [lein-heroku "0.1.1"]
    [lein-difftest "2.0.0"]
    [lein-pprint "1.1.1"]
]}}

$ lein help
...
leiningen.heroku  Problem loading: Could not locate leiningen/main__init.class or leiningen/main.clj on classpath:
...

其他插件加载成功。

这是类路径:

$ lein repl
user=> (println (seq (.getURLs (java.lang.ClassLoader/getSystemClassLoader))))
(#<URL file:/Users/bnorton/.lein/self-installs/leiningen-2.0.0-preview10-standalone.jar> 
#<URL file:/Users/bnorton/.m2/repository/org/clojure/core.cache/0.6.1/core.cache-0.6.1.jar> 
#<URL file:/Users/bnorton/.m2/repository/quoin/quoin/0.1.0/quoin-0.1.0.jar> 
#<URL file:/Users/bnorton/.m2/repository/lein-heroku/lein-heroku/0.1.1/lein-heroku-0.1.1.jar> 
#<URL file:/Users/bnorton/.m2/repository/stencil/stencil/0.3.0/stencil-0.3.0.jar> 
#<URL file:/Users/bnorton/.m2/repository/lein-pprint/lein-pprint/1.1.1/lein-pprint-1.1.1.jar> 
#<URL file:/Users/bnorton/.m2/repository/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2.jar> 
#<URL file:/Users/bnorton/.m2/repository/slingshot/slingshot/0.8.0/slingshot-0.8.0.jar> 
#<URL file:/Users/bnorton/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar> 
#<URL file:/Users/bnorton/.m2/repository/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar> 
#<URL file:/Users/bnorton/.m2/repository/org/clojars/technomancy/heroku-http-apache/0.1-SNAPSHOT/heroku-http-apache-0.1-SNAPSHOT.jar> 
#<URL file:/Users/bnorton/.m2/repository/scout/scout/0.1.0/scout-0.1.0.jar> 
#<URL file:/Users/bnorton/.m2/repository/org/clojure/clojure/1.3.0/clojure-1.3.0.jar> 
#<URL file:/Users/bnorton/.m2/repository/lein-difftest/lein-difftest/2.0.0/lein-difftest-2.0.0.jar> 
#<URL file:/Users/bnorton/.m2/repository/org/clojure/tools.cli/0.2.1/tools.cli-0.2.1.jar> 
#<URL file:/Users/bnorton/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar> 
#<URL file:/Users/bnorton/.m2/repository/bultitude/bultitude/0.1.7/bultitude-0.1.7.jar> 
#<URL file:/Users/bnorton/.m2/repository/com/google/code/gson/gson/1.7.1/gson-1.7.1.jar> 
#<URL file:/Users/bnorton/.m2/repository/org/clojars/technomancy/heroku-json-gson/0.1-SNAPSHOT/heroku-json-gson-0.1-SNAPSHOT.jar> 
#<URL file:/Users/bnorton/.m2/repository/lein-newnew/lein-newnew/0.3.5/lein-newnew-0.3.5.jar> 
#<URL file:/Users/bnorton/.m2/repository/org/clojars/technomancy/heroku-api/0.1-SNAPSHOT/heroku-api-0.1-SNAPSHOT.jar> 
#<URL file:/Users/bnorton/.m2/repository/doric/doric/0.6.0/doric-0.6.0.jar>)

我错过了什么?

【问题讨论】:

    标签: heroku clojure leiningen


    【解决方案1】:

    您可能需要从 master 获取最新版本的 lein-heroku。

    提交日志显示了一些支持 Leiningen 2 的更改,但这些更改比上一个版本更新。

    查看提交:https://github.com/technomancy/lein-heroku/commits/master

    【讨论】:

    • 谢谢,我需要第二双眼睛。来自主人的lein install,一切都很好。
    【解决方案2】:

    它已针对 2.x 进行了更新,但不再维护。由于启动时间问题和不必要的重复工作,我建议改用 Heroku Toolbelt。 http://toolbelt.herokuapp.com

    【讨论】:

    • “Heroku 上的 Clojure 入门”Devcenter article 提到了 lein-template,这正是我想要的 lein-heroku 插件。 lein new heroku myapp 是一种非常方便的入门方法,但可能有更简单的方法可以使模板可用。
    猜你喜欢
    • 1970-01-01
    • 2014-11-28
    • 2012-10-07
    • 1970-01-01
    • 2012-03-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-28
    相关资源
    最近更新 更多