Gitを使用してHerokuに初めてプッシュすると、エラーメッセージが表示されます。Gemfile.lock is required. Please run "bundle install" locally and commit your Gemfile.lock.
実行しbundle install
、ファイルをgit
リポジトリに追加し、変更をコミットしました。Gemfile.lock
リポジトリとディレクトリの両方でを参照してください。ただし、コマンドを実行するgit push heroku master
と、常にそのエラーがスローされます。
私は何を間違っていますか:
これが私のPCの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ステータスは次のとおりです。
$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ファイルが表示されないのはなぜですか?