Gemfile syntax error: <<<<<<< HEAD when trying to start localhost

I try to start my localhost:3000 RoR app.
What is happening in Terminal:

[omrails]$rails s
Gemfile syntax error:
<<<<<<< HEAD

I tried searching on Google and on Stackoverflow, but didn’t see any problems similar to mine. I assume something is wrong with ny Gemfile, but I have no idea what exactly.

  • RubyMine doesn't recognize gem from git repository
  • What does this sha number in the git path of a gem in a Gemfile mean?
  • Gem is not checked out. Please run `bundle install` in Heroku
  • Can I force a gem's dependencies in gemfile?
  • Why do I get “error: failed to push some refs” when pushing to Heroku?
  • Bundler: always use latest revision of git branch in Gemfile
  • My Gemfile looks like this:

    source ''
    gem 'rails', '3.2.8'
    gem 'bootstrap-sass'
    gem 'devise'
    gem 'omniauth'
    # Bundle edge Rails instead:
    # gem 'rails', :git => 'git://'
    group :development do
    gem 'sqlite3'
    # Gems used only for assets and not required
    # in production environments by default.
    group :assets do
    gem 'sass-rails',   '~> 3.2.3'
    gem 'coffee-rails', '~> 3.2.1'
    # See for more supported runtimes
    # gem 'therubyracer', :platforms => :ruby
    gem 'uglifier', '>= 1.0.3'
    gem 'jquery-rails'
    group :production do
    gem 'pg', '0.12.2'
    # To use ActiveModel has_secure_password
    # gem 'bcrypt-ruby', '~> 3.0.0'
    # To use Jbuilder templates for JSON
    # gem 'jbuilder'
    # Use unicorn as the app server
    # gem 'unicorn'
    # Deploy with Capistrano
    # gem 'capistrano'
    # To use debugger
    # gem 'debugger'

    Any suggestions what might be wrong in my Gemfile?
    Should you have any additional questions or reqs, do not hesitate to ask me.

  • Github- How can I find unpublished branches on my local machine?
  • Merge multiple old commits in git which have already been pushed?
  • Git server allowing pull and push without private key
  • How to migrate gitlab backups to new server which has latest gitlab version
  • Oauth Cloning on github not working (fatal: Authentication failed)
  • How to include modified configuration files in a docker image?
  • 3 Solutions collect form web for “Gemfile syntax error: <<<<<<< HEAD when trying to start localhost”

    This region:

    <<<<<<< HEAD
    group :development do
    gem 'sqlite3'
    # gem 'sqlite3'
    >>>>>>> 154ef24b95ea600ced834457e146c2fb27a18156

    Is a git merge conflict. It says that there was a change in both the current version (HEAD) and another commit that you pulled (154ef24b95ea600ced834457e146c2fb27a18156). The contents of the file that differ are presented in each region for your perusal.

    When you get a conflict like this (usually by running git merge or git rebase, or git pull), then you are supposed to actually fix the conflict before doing git add to mark it as resolved. You do this by looking at the two regions separated by the ======= and decided which one to keep.

    Sometimes you have to decide how to merge the two into one that does what both changes did, but in this case you probably just want to throw away the commented-out part. If you trim out the line starting with <<<<<<<, and everything between the ======== and >>>>>>>> lines, inclusive, then you should be good to go.

    It might not hurt to study up on git merge and rebase procedures in general – they’re powerful but can be a bit complex if you aren’t familiar.

    You have committed the result of a merge conflict in Git.

    You need to remove those lines, and pay special attention to make sure the code is what you expect.

    <<<<<<< HEAD
    group :development do
    gem 'sqlite3'
    # gem 'sqlite3'
    >>>>>>> 154ef24b95ea600ced834457e146c2fb27a18156

    You can see what is in your current HEAD and what was in 154ef24b at the time of the merge. Choose how you want to resolve it by removing the conflict markers and keeping/modifying the chunks either side.

    As Alex said, you’ve committed the results of a merge conflict in git. You need more details on what he means when he says to pay close attention that the code is what you expect. You don’t want to just remove the conflict markers (the <<<<<<, ==========, and >>>>>>>>>>>), you need to actually resolve the conflict.

    HEAD had the following when you did the merge:

    group :development do  
    gem 'sqlite3'

    And in the branch containing the commit you merged in (154ef24b95) you had:

    # gem 'sqlite3'

    This (appears to) mean that when the merge was done HEAD was using sqlite in development and commit 154ef24b95 had decided not to. You definitely want to figure out which version you actually want in your project here. Don’t just delete the conflict markers.

    Git Baby is a git and github fan, let's start git clone.