混帐推Heroku的高手是不会认Gemfile.lock的文件(git push heroku ma

2019-10-17 07:48发布

我第一次推向Heroku的使用Git,我得到的错误信息: Gemfile.lock is required. Please run "bundle install" locally and commit your Gemfile.lock. Gemfile.lock is required. Please run "bundle install" locally and commit your Gemfile.lock.

我已经跑了bundle install ,添加文件到git回购,COMMITED的变化。 见Gemfile.lock在仓库中,我的目录既但是当我运行命令git push heroku master它始终抛出错误。

我究竟做错了什么:

这是我的电脑上的混帐回购协议

$git ls-files
.bundle/config
.gitignore
.rspec
Gemfile
Gemfile.lock
README
Rakefile
app/assets/images/rails.png
app/assets/javascripts/application.js
app/assets/stylesheets/application.css
..<snip>..

这里是回购的git的状态。

$git status
# On branch ch_ruby_intro
# Your branch is ahead of 'origin/ch_ruby_intro' by 6 commits.
#
nothing to commit (working directory clean)

当我尝试部署错误。

$git push heroku master
Counting objects: 239, done.
Compressing objects: 100% (140/140), done.
Writing objects: 100% (239/239), 50.30 KiB, done.
Total 239 (delta 74), reused 215 (delta 67)

-----> Heroku receiving push
-----> Ruby/Rails app detected
 !
 !     Gemfile.lock is required. Please run "bundle install" locally
 !     and commit your Gemfile.lock.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

为什么没有看到Gemfile.lock的文件吗?

Answer 1:

也许它是你犯的错误的分支? 你推大师和承诺ch_ruby_intro。



文章来源: git push heroku master will not recognize my Gemfile.lock file