1

After getting through the first five chapters of Michael Hartl's Ruby on Rails Tutorial book, I ran my test as usual before doing my GitHub and Heroku push, but got RED.

I checked my static pages and all of them had 'HEAD =========>>>>>>>rails-flavored-ruby' inserted into them at random places in the HTML.

Not only that, my static_pages_controller and routes.rb was mangled in the same way. 'rails-flavored-ruby' was one of the git branches I created for the tutorial, so I have a suspicion that one of my git commands would have altered my files, if that is even possible.

Does anyone else have this problem going through the tutorial, where did I go wrong and what can I do to fix this app I have been building for the last three chapters.

Florestan Korp
  • 662
  • 2
  • 12
  • 24

2 Answers2

3

That just means you had git conflicts. That is, you changed the same files on different unmerged branches. When you finally merged it's telling you where the conflicts are. You need to resolve all of the conflicts. HEAD shows where the code is for the current branch. The other section is from the previous branch. Choose which code you'd like to keep and remove all the << symbols and references to HEAD and you should be fine.

toddmetheny
  • 4,405
  • 1
  • 22
  • 39
  • Thanks @toddmetheny ,but how do I know what other files were 'infected' and what files I have to change in order to get back to green? – Florestan Korp Nov 17 '16 at 07:44
  • 1
    When you first merged you would get a conflicts list. But at this point just search for '<<<' and then thoroughly look through those files. – toddmetheny Nov 17 '16 at 12:54
1

Here is some more information and another answer to my question

Rails messing up my code

Community
  • 1
  • 1
Florestan Korp
  • 662
  • 2
  • 12
  • 24