Florestan Korp Florestan Korp - 3 months ago 31
HTML Question

Ruby on Rails random code inserted in static pages, tests RED

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.


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.