我试图重新创建部署在Heroku上的舞者应用程序的最小示例,如deploying-a-dancer-app-on-heroku.md
所示。不幸的是,我的部署失败了,安装了cpanm
,特别是{{1 }}
以下是我在Strawberry Perl 5.18.2,Windows 7上运行的确切命令:
version
cd C:\tmp
+ myheroku + myheroku\bin + myheroku\bin\app.pl + myheroku\MANIFEST.SKIP + myheroku\public + myheroku\public\404.html + myheroku\public\images + myheroku\public\dispatch.cgi + myheroku\public\css + myheroku\public\css\error.css + myheroku\public\css\style.css + myheroku\public\500.html + myheroku\public\javascripts + myheroku\public\javascripts\jquery.js + myheroku\public\dispatch.fcgi + myheroku\Makefile.PL + myheroku\t + myheroku\t\001_base.t + myheroku\t\002_index_route.t + myheroku\views + myheroku\views\layouts + myheroku\views\layouts\main.tt + myheroku\views\index.tt + myheroku\lib myheroku\lib + myheroku\lib\myheroku.pm + myheroku\config.yml + myheroku\environments + myheroku\environments\production.yml + myheroku\environments\development.yml
然后在Git Bash中,我执行以下操作:
dancer -a myheroku
cd myheroku/
git init
git add .
git update-index --chmod=+x bin/app.pl
[master (root-commit) ced2e50] Dancer on Heroku 22 files changed, 813 insertions(+) create mode 100644 MANIFEST create mode 100644 MANIFEST.SKIP create mode 100644 Makefile.PL create mode 100755 bin/app.pl create mode 100644 config.yml create mode 100644 environments/development.yml create mode 100644 environments/production.yml create mode 100644 lib/myheroku.pm create mode 100644 public/404.html create mode 100644 public/500.html create mode 100644 public/css/error.css create mode 100644 public/css/style.css create mode 100644 public/dispatch.cgi create mode 100644 public/dispatch.fcgi create mode 100644 public/favicon.ico create mode 100644 public/images/perldancer-bg.jpg create mode 100644 public/images/perldancer.jpg create mode 100644 public/javascripts/jquery.js create mode 100644 t/001_base.t create mode 100644 t/002_index_route.t create mode 100644 views/index.tt create mode 100644 views/layouts/main.tt Miller@NEWTON /c/tmp/myheroku (master)
git commit -a -m "Dancer on Heroku"
(link to buildpack)Creating serene-mountain-6144... done, stack is cedar BUILDPACK_URL=http://github.com/damog/heroku-buildpack-perl.git http://serene-mountain-6144.herokuapp.com/ | git@heroku.com:serene-mountain-6144.git Git remote heroku added Miller@NEWTON /c/tmp/myheroku (master)
heroku create --stack cedar --buildpack http://github.com/damog/heroku-buildpack-perl.git
Enter passphrase for key '/c/Users/Miller/.ssh/id_rsa': Initializing repository, done. Counting objects: 34, done. Delta compression using up to 4 threads. Compressing objects: 100% (30/30), done. Writing objects: 100% (34/34), 40.71 KiB, done. Total 34 (delta 3), reused 0 (delta 0) -----> Fetching custom git buildpack... done -----> Perl/PSGI Dancer! app detected -----> Bootstrapping cpanm Successfully installed version-0.9908 (upgraded from 0.77) ! Installing the dependencies failed: Installed version (0.77) of version is not in range '0.87' ! Bailing out the installation for Module-Metadata-1.000019. Successfully installed Scalar-List-Utils-1.38 (upgraded from 1.21) Successfully installed JSON-PP-2.27203 Successfully installed Test-Simple-1.001003 (upgraded from 0.92) Successfully installed CPAN-Meta-YAML-0.012 Successfully installed Parse-CPAN-Meta-1.4414 (upgraded from 1.39) Successfully installed CPAN-Meta-Requirements-2.125 ! Installing the dependencies failed: Installed version (1.21) of List::Util is not in range '1.33', Installed version (0.77) of version is not in range'0.88' ! Bailing out the installation for CPAN-Meta-2.140640. Successfully installed Perl-OSType-1.007 Successfully installed ExtUtils-CBuilder-0.280216 (upgraded from 0.2602) Successfully installed ExtUtils-ParseXS-3.24 (upgraded from 2.2002) ! Installing the dependencies failed: Module 'Module::Metadata' is not installed, Module 'CPAN::Meta' is not installed, Installed version (0.77) of version is not in range '0.87' ! Bailing out the installation for Module-Build-0.4205. ! Installing the dependencies failed: Installed version (0.340201) of Module::Build is not in range '0.36' ! Bailing out the installation for App-cpanminus-1.7001. 10 distributions installed -----> Installing dependencies /tmp/buildpack_24863d3e-f650-49e3-b75b-3ec1285e3ded/bin/compile: 30: ./local/bin/cpanm: not found -----> Installing Starman /tmp/buildpack_24863d3e-f650-49e3-b75b-3ec1285e3ded/bin/compile: 33: ./local/bin/cpanm: not found -----> Discovering process types Procfile declares types -> (none) Default types for Perl/PSGI Dancer! -> web -----> Compressing... done, 428K -----> Launching... done, v5 http://serene-mountain-6144.herokuapp.com/ deployed to Heroku To git@heroku.com:serene-mountain-6144.git * [new branch] master -> master Miller@NEWTON /c/tmp/myheroku (master)
正如您在上述结果中所看到的那样,cpanm会尝试升级git push heroku master
,声称它已成功,但后来立即声称它没有成功, barfs。 compile directives的相关行是:
version
如果有人能帮我弄清楚这个最小版本包的错误,或者我可以找到一些安装Dancer App的不同工作说明,我将不胜感激。谷歌还没有收到任何其他选择。
答案 0 :(得分:0)
我怀疑在cpanm新安装的系统之前检测到系统的Perl模块。查看cpanm模块的安装位置,并在运行“git push heroku master”之前设置环境变量PERL5LIB以首先尝试这些目录。