Ruby on rails git push heroku master无法识别我的Gemfile.lock文件

Ruby on rails git push heroku master无法识别我的Gemfile.lock文件,ruby-on-rails,git,heroku,push,gemfile,Ruby On Rails,Git,Heroku,Push,Gemfile,我第一次使用Git推送到Heroku时,收到错误消息:Gemfile.lock是必需的。请在本地运行“bundle install”并提交您的Gemfile.lock。 我已经运行了bundle安装,将文件添加到gitrepo,并提交了更改。在存储库和我的目录中都可以看到Gemfile.lock,但是当我运行命令gitpush-heroku-master时,它始终抛出该错误 我做错了什么: 这是我电脑上的git回购 $git ls-files .bundle/config .gitignore

我第一次使用Git推送到Heroku时,收到错误消息:
Gemfile.lock是必需的。请在本地运行“bundle install”并提交您的Gemfile.lock。

我已经运行了
bundle安装
,将文件添加到
git
repo,并提交了更改。在存储库和我的目录中都可以看到
Gemfile.lock
,但是当我运行命令
gitpush-heroku-master
时,它始终抛出该错误

我做错了什么:

这是我电脑上的git回购

$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 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文件?

可能是您提交到了错误的分支?您正在推送master并提交ch_ruby_intro。

我应该推送
ch_ruby_intro
到heroku吗?您应该推送到heroku包含您希望看到的更改的分支。所以我想你要么这样做,要么向师父承诺,推师父。谢谢。就这样。照着书中的例子去做太过直截了当了。
$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