【问题标题】:Heroku push rejected in Mojolicious full appHeroku 推送在 Mojolicious 完整应用程序中被拒绝
【发布时间】:2013-11-30 16:24:28
【问题描述】:

我正在创建一个完整的 Mojolicious 4.58 应用程序并尝试将其部署到 Heroku。

mojo generate app MyApp

到app的根目录,根据https://github.com/judofyr/perloku,我添加了一个Makefile.PL

#!/usr/bin/env perl                          
use ExtUtils::MakeMaker;

WriteMakefile(
    NAME      => 'myapp.pl',
    VERSION   => '0.01',
    AUTHOR    => 'Shemahmforash',
    PREREQ_PM => { 'Mojolicious' => '4.58', }
);

还有一个 Perloku 可执行文件

#!/bin/sh                                                                                                                                                                                   
/script/my_app daemon -l http://*:$PORT -m production

如果我尝试在我的机器上运行 Perloku,它可以正常工作:

$ PORT=3000 ./Perloku
Server available at http://127.0.0.1:3000

虽然,如果我尝试遵循 heroku 部署流程 https://devcenter.heroku.com/articles/git,它会拒绝我的推送:

$ git init
 Initialized empty Git repository in /home/wanderer/Code/perl/mojolicious/heroku/my_app/.git/

$ git add .

$ git commit -m "my first commit"
[master (root-commit) dd91c47] my first commit
 10 files changed, 86 insertions(+)
 create mode 100644 Makefile.PL
 create mode 100755 Perloku
 create mode 100644 lib/MyApp.pm
 create mode 100644 lib/MyApp/Example.pm
 create mode 100644 log/production.log
 create mode 100644 public/index.html
 create mode 100755 script/my_app
 create mode 100644 t/basic.t
 create mode 100644 templates/example/welcome.html.ep
 create mode 100644 templates/layouts/default.html.ep

$ heroku create
 Creating floating-scrubland-3717... done, stack is cedar
 http://floating-scrubland-3717.herokuapp.com/ | git@heroku.com:floating-scrubland-3717.git
 Git remote heroku added

$ git push heroku master
 Enter passphrase for key '/home/wanderer/.ssh/id_rsa': 
 Counting objects: 21, done.
 Delta compression using up to 4 threads.
 Compressing objects: 100% (14/14), done.
 Writing objects: 100% (21/21), 2.44 KiB, done.
 Total 21 (delta 0), reused 0 (delta 0)


 !     Push rejected, no Cedar-supported app detected

 To git@heroku.com:floating-scrubland-3717.git
 ! [remote rejected] master -> master (pre-receive hook declined)
 error: failed to push some refs to 'git@heroku.com:floating-scrubland-3717.git'

请注意,如果我尝试使用 mojolicious lite 应用程序执行相同的程序,它可以正常工作!

感谢您的帮助。

【问题讨论】:

  • 我认为你需要像这样创建你的heroku实例heroku create -s cedar --buildpack http://github.com/judofyr/perloku.git
  • 现在可以正常使用了!非常感谢您的帮助!
  • 我添加了我的评论作为答案,感谢您的回复

标签: git perl heroku mojolicious


【解决方案1】:

你需要像这样创建你的 Heroku 实例

heroku create -s cedar --buildpack http://github.com/judofyr/perloku.git

【讨论】:

    猜你喜欢
    • 2016-08-14
    • 2014-08-19
    • 2014-04-20
    • 1970-01-01
    • 2016-12-04
    • 2017-01-09
    • 2021-09-22
    • 1970-01-01
    相关资源
    最近更新 更多