推送到Heroku被拒绝

久茂

我创建了一个基于RoR的简单网站。我创建了一个Git存储库,并尝试将其部署到Heroku,但它始终失败:

    remote:        rake aborted!
    remote:        ExecJS::ProgramError: Unexpected character '#' (line: 10848, col: 0, pos: 303135)
    remote:        Error
    remote:        at new JS_Parse_Error (/tmp/execjs20151027-1005-1i4h7l5js:2359:10623)
    remote:        at js_error (/tmp/execjs20151027-1005-1i4h7l5js:2359:10842)

(为简洁起见,打破了错误)

    remote:        Tasks: TOP => assets:precompile
    remote:        (See full trace by running task with --trace)
    remote:  !
    remote:  !     Precompiling assets failed.
    remote:  !
    remote:
    remote:  !     Push rejected, failed to compile Ruby app
    remote:
    remote: Verifying deploy....
    remote:
    remote: !   Push rejected to serene-depths-4806.
    remote:
    To https://git.heroku.com/serene-depths-4806.git
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'https://git.heroku.com/serene-depths-4806.git'

难道说不应该有一个“#”吗?我不确定如何找到该行,即使给出了该行。

另外,我从sqlite更改为postgresql,并在gemfile和database.yml文件中进行了更改。然后,我删除了旧的Heroku远程分支,并按照以下说明尝试进行部署:https : //devcenter.heroku.com/articles/git#deploying-code

任何建议表示赞赏!

久茂

啊,当然,写完这篇文章后,我找到了答案(针对那些将来可能会遇到相同问题的人):

这是因为“#”错误是在我从自动coffeescript文件转换而来的.js文件中。h!我只是删除了文件顶部的注释并进行了部署。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章