私のherokuのデプロイメントが私のローカルRails4レポと同じではない理由を理解しようとしています。特に、いくつかのマイグレーションはコピーされず、リモートでアプリケーションを実行するとさまざまな問題が発生します。なぜherokuアプリがローカルのマスターブランチの内容と一致しないのかを調べる
ls db/migrate/
20160402152001_create_users.rb 20160403231740_add_many_fields_to_record.rb
20160402214410_create_records.rb 20160403233848_rename_release_field_in_record.rb
20160402214520_add_attachment_file_upload_to_records.rb 20160407172018_create_contact_forms.rb
20160403000621_change_cas_user_id_to_user_name_in_records.rb
しかし、私は次のコマンドを実行したとき、私はすべての移行はHerokuの上に表示されていない参照してください:ここで
されているすべての私の移行は(私は私の地元のアプリのルートからコマンドを実行している)
をgit config --list | grep heroku
remote.heroku.url=https://git.heroku.com/voices-dev.git
remote.heroku.fetch=+refs/heads/*:refs/remotes/heroku/*
branch.master.remote=https://git.heroku.com/voices-dev.git
# make some local changes
touch a
git add .
git commit -m "add dummy file"
# push changes and check the contents of db/migrate on remote host
git push -uf https://git.heroku.com/voices-dev.git master
heroku run bash
ls db/migrate
20160402152001_create_users.rb 20160402214410_create_records.rb 20160402214520_add_attachment_file_upload_to_records.rb
私のローカルファイルのいくつかが英雄に表示されない原因を知っていますか?私は他人が提供できるどんな助けでも感謝しています!
ありがとうございました。しかし、マイグレーションの一部を書き込む前に私の '.gitignore'ファイルに' db/'を追加したため、一部のマイグレーションがherokuにコピーされないという問題がありました。以前はローカルの支店にこれらを追加していないことに気付かなかったのですが、これは私のローカル移行リポジトリとリモート/英雄ホスト移行リポジトリの対称性の説明です。 – duhaime
驚くばかり!あなたはそれを把握してうれしい:) – Cacauzen