Leiningenで作成したアプリケーションをHerokuにDeployするとエラー
Leiningenで作成したRingを使ったアプリケーションをHerokuにDeployした際に、 このようなエラーが出てアプリケーションが起動しなくなってしまった場合の対処法です。
Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/classpath__init.class or leiningen/core/classpath.clj on classpath: (server.clj:1)
HerokuにClojure用のbuildpackを登録
$ heroku buildpack:set https://github.com/heroku/heroku-buildpack-clojure
project.cljでLeiningenのminimum versionを設定
project.cljに以下を追加
:min-lein-version "2.0.0"
Herokuにpush
この状態でherokuにpushするとエラーが解消され、問題なくアプリケーションが動くようになっているはず。