Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (11/11), 3.82 KiB | 1.91 MiB/s, done.
Total 11 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/NoLockfile
remote:
remote: !
remote: ! Gemfile.lock required. Please check it in.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to aqueous-reaches-83684.
remote:
To https://git.heroku.com/aqueous-reaches-83684.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/aqueous-reaches-83684.git'
我想在heroku上启动我的应用程序
我总是有一个相同的错误:
Gemfile.lock是必需的。请检入。
我按照指示做了一切!删除,下载后仍然无法使用
已使用
bundle install
仍然是相同的错误
答案 0 :(得分:1)
确保将Gemfile.lock添加到源代码管理中。
考虑到您在master分支上:
git add Gemfile.lock
git commit -m "Commit Gemfile.lock"
git push heroku master
否则:
git push heroku current_branch:master
如果它不起作用,则可能在.gitignore
文件中将其忽略了。
从您的忽略列表中删除Gemfile.lock
或*.lock
,然后重复上述命令。