Rails Heroku Gemfile.lock错误 - 推送拒绝(开源)

时间:2013-11-10 09:48:02

标签: ruby-on-rails ruby git heroku

我正在尝试将我的开源RoR应用程序推送到Heroku,但我在初始推送时遇到了问题。我有read many similar questions,但这些答案都没有帮助解决我的问题。我曾多次尝试bundle updatebundle install。我也试过删除然后重新提交我的Gemfile.lock文件,但是我仍然得到同样的错误......

$ git push heroku master 
Counting objects: 5199, done.
Compressing objects: 100% (3086/3086), done.
Writing objects: 100% (5199/5199), 4.57 MiB | 131 KiB/s, done.
Total 5199 (delta 3418), reused 3152 (delta 1962)

-----> Removing .DS_Store files
-----> Ruby app detected
-----> Compiling Ruby/NoLockfile
 !
 !     Gemfile.lock required. Please check it in.
 !

 !     Push rejected, failed to compile Ruby app

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

由于我的应用程序将MongoDB与MongoMapper一起使用,我怀疑我的配置不正确。我的code can be found here on Github(我目前正在处理 heroku 分支)。随意克隆我们的存储库并自己尝试。

如果有人有任何可以帮我解决这个问题的见解,我会非常感激!

2 个答案:

答案 0 :(得分:3)

或者更好的只是运行

git push heroku heroku:master

这会将你的heroku分支推送到heroku上的master分支,这是heroku使用的(Heroku忽略除了主分支之外的所有东西)。

答案 1 :(得分:2)

请先阅读this article

此命令将忽略除了master之外推送到Heroku的分支。如果您在本地处理另一个分支,则可以在推送之前合并到主服务器,或者指定要将本地分支推送到远程主服务器。要推送除master之外的分支,请使用以下语法:

$ git push heroku yourbranch:master
相关问题