#解決したい事
・正常に保存されていないことは分かったものの、ここからの修正方法が見当つきません。
⇩merge、git pushする前
⇩merge,git push後
#ソースコード
ec2-user:~/environment/sample_app (rails-flavored-ruby) $ git init Reinitialized existing Git repository in /home/ec2-user/environment/sample_app/.git/ $ git add -A $ git commit -m "Finish layout and routes" [rails-flavored-ruby 15cc683] Finish layout and routes 17 files changed, 217 insertions(+), 54 deletions(-) create mode 100644 app/assets/images/kitten.jpg create mode 100644 app/assets/images/rails.png create mode 100644 app/assets/stylesheets/custom.scss create mode 100644 app/views/layouts/_footer.html.erb copy app/views/layouts/{application.html.erb => _head.html.erb} (62%) create mode 100644 app/views/layouts/_header.html.erb create mode 100644 app/views/layouts/_shim.html.erb rewrite app/views/layouts/application.html.erb (85%) rewrite app/views/static_pages/home.html.erb (100%) create mode 100644 test/helpers/application_helper_test.rb create mode 100644 test/integration/site_layout_test.rb $ git checkout master Switched to branch 'master' Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) $ git merge filling-in-layout merge: filling-in-layout - not something we can merge $ rails test 0 failures, 0 errors, 0 skips $ git push Counting objects: 6, done. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 1.21 KiB | 1.21 MiB/s, done. Total 6 (delta 4), reused 0 (delta 0) To bitbucket.org:babi0105/sample_app.git 06772fa..79ce12f master -> master $ git push heroku
#起っている事
・herokuへのpushは正常にできているみたいでした。
・ただ、git addを行う前にローカルのブランチで表示できていた、ものとは異なる、以前作成したサイトが表示されました。
#考えられる原因
・余計なコマンドを打ってしまったためなのか、mergeまたgitへのpushが正常にできていない
→git initが必要無かったのかと。
#試したこと
・もう一度、もといたブランチ(filling-in-layout)へ戻り、herokuへpushしたところ結果は変わらずでした。
ec2-user:~/environment/sample_app (master) $ git checkout -b filling-in-layoutSwitched to a new branch 'filling-in-layout' ec2-user:~/environment/sample_app (filling-in-layout) $ git add -A ec2-user:~/environment/sample_app (filling-in-layout) $ git commit -m "Finish layout and routes" [filling-in-layout c19d09f] Finish layout and routes 1 file changed, 17 insertions(+) create mode 100644 test/integration/site_layout_test.rb ec2-user:~/environment/sample_app (filling-in-layout) $ git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'. ec2-user:~/environment/sample_app (master) $ git merge filling-in-layout Updating 79ce12f..c19d09f Fast-forward test/integration/site_layout_test.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/integration/site_layout_test.rb ec2-user:~/environment/sample_app (master) $ git push Counting objects: 5, done. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 648 bytes | 648.00 KiB/s, done. Total 5 (delta 2), reused 0 (delta 0) To bitbucket.org:babi0105/sample_app.git 79ce12f..c19d09f master -> master ec2-user:~/environment/sample_app (master) $ git push heroku ・ ・省略 ・ ec2-user:~/environment/sample_app (master) $ git checkout -b filling-in-layoutfatal: A branch named 'filling-in-layout' already exists. ec2-user:~/environment/sample_app (master) $ git checkout filling-in-layoutSwitched to branch 'filling-in-layout' ec2-user:~/environment/sample_app (filling-in-layout) $ git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. ec2-user:~/environment/sample_app (master) $ rails t Running via Spring preloader in process 17685 /home/ec2-user/environment/sample_app/db/schema.rb doesn't exist yet. Run `rails db:migrate` to create it, then try again. If you do not intend to use a database, you should instead alter /home/ec2-user/environment/sample_app/config/application.rb to limit the frameworks that will be loaded. Started with run options --seed 47000 ERROR["test_full_title_helper", ApplicationHelperTest, 0.006054255001799902] test_full_title_helper#ApplicationHelperTest (0.01s) NameError: NameError: undefined local variable or method `full_title' for #<ApplicationHelperTest:0x0000000003321a60> test/helpers/application_helper_test.rb:5:in `block in <class:ApplicationHelperTest>' FAIL["test_layout_links", SiteLayoutTest, 0.29685982999944827] test_layout_links#SiteLayoutTest (0.30s) Expected exactly 2 elements matching "a[href="/"]", found 0.. Expected: 2 Actual: 0 test/integration/site_layout_test.rb:10:in `block in <class:SiteLayoutTest>' 6/6: [=================================] 100% Time: 00:00:00, Time: 00:00:00 Finished in 0.33757s 6 tests, 9 assertions, 1 failures, 1 errors, 0 skips
#補足
情報が足りないかもしれません。
また、その際はご指摘いただきたいです。
返信お待ちしております。
よろしくお願いします.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/01/11 04:04