Search code examples
rubymerge-conflict-resolutiongemfile.lock

Gemfile.lock full of conflicts I can't resolve


I'm helping a friend with a project, but after helping him with the logic instead of merging my branch, for some reason he copied the code and added it himself. So my branch remained "behind". He kept working and now he asked me to help him with something else, but I had a bunch of conflicts to resolve before working on the new logic, I tried to resolve the conflicts manually but something must have slipped my check, because now I have a bunch of conflicts in the Gemfile.lock that I don't know how to fix. Can you guys give it a check? Thank you so much!

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (6.0.3.5)
      actionpack (= 6.0.3.5)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (6.0.3.5)
      actionpack (= 6.0.3.5)
      activejob (= 6.0.3.5)
      activerecord (= 6.0.3.5)
      activestorage (= 6.0.3.5)
      activesupport (= 6.0.3.5)
      mail (>= 2.7.1)
    actionmailer (6.0.3.5)
      actionpack (= 6.0.3.5)
      actionview (= 6.0.3.5)
      activejob (= 6.0.3.5)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (6.0.3.5)
      actionview (= 6.0.3.5)
      activesupport (= 6.0.3.5)
      rack (~> 2.0, >= 2.0.8)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actiontext (6.0.3.5)
      actionpack (= 6.0.3.5)
      activerecord (= 6.0.3.5)
      activestorage (= 6.0.3.5)
      activesupport (= 6.0.3.5)
      nokogiri (>= 1.8.5)
    actionview (6.0.3.5)
      activesupport (= 6.0.3.5)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.1, >= 1.2.0)
    activejob (6.0.3.5)
      activesupport (= 6.0.3.5)
      globalid (>= 0.3.6)
    activemodel (6.0.3.5)
      activesupport (= 6.0.3.5)
    activerecord (6.0.3.5)
      activemodel (= 6.0.3.5)
      activesupport (= 6.0.3.5)
    activestorage (6.0.3.5)
      actionpack (= 6.0.3.5)
      activejob (= 6.0.3.5)
      activerecord (= 6.0.3.5)
      marcel (~> 0.3.1)
    activesupport (6.0.3.5)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
      zeitwerk (~> 2.2, >= 2.2.2)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    aws_cf_signer (0.1.3)
    bcrypt (3.1.16)
    bcrypt (3.1.16-java)
    bindex (0.8.1)
    bootsnap (1.7.2)
      msgpack (~> 1.0)
    builder (3.2.4)
    byebug (11.1.3)
    capybara (3.35.3)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.8)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (>= 1.5, < 3.0)
      xpath (~> 3.2)
    childprocess (3.0.0)
    cloudinary (1.16.1)
      aws_cf_signer
      rest-client
    coffee-rails (5.0.0)
      coffee-script (>= 2.2.0)
      railties (>= 5.2.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.1.8)
    crass (1.0.6)
    devise (4.7.3)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0)
      responders
      warden (~> 1.2.3)
    domain_name (0.5.20190701)
      unf (>= 0.0.5, < 1.0.0)
    dotenv (2.7.6)
    dotenv-rails (2.7.6)
      dotenv (= 2.7.6)
      railties (>= 3.2)
    erubi (1.10.0)
    execjs (2.7.0)
    ffi (1.14.2)
    ffi (1.14.2-java)
    ffi (1.14.2-x64-mingw32)
    ffi (1.14.2-x86-mingw32)
    font-awesome-rails (4.7.0.7)
      railties (>= 3.2, < 7)
    geocoder (1.6.5)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    http-accept (1.7.0)
    http-cookie (1.0.3)
      domain_name (~> 0.5)
<<<<<<< HEAD
<<<<<<< HEAD
    i18n (1.8.8)
=======
    i18n (1.8.9)
>>>>>>> 9da2da0c6cdf268b2fb6f00cd4c9582ded75c683
=======
    i18n (1.8.9)
>>>>>>> 7affd3698608ea3f58db9690d3c1d32b5fce6c61
      concurrent-ruby (~> 1.0)
    jbuilder (2.11.2)
      activesupport (>= 5.0.0)
    jquery-rails (4.4.0)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    listen (3.4.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    loofah (2.9.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    mapbox-gl-rails (1.10.1)
      railties (>= 3.2)
    marcel (0.3.3)
      mimemagic (~> 0.3.2)
    method_source (1.0.0)
    mime-types (3.3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2021.0225)
    mimemagic (0.3.5)
    mini_magick (4.11.0)
    mini_mime (1.0.2)
    mini_portile2 (2.5.0)
<<<<<<< HEAD
<<<<<<< HEAD
    minitest (5.14.3)
=======
    minitest (5.14.4)
>>>>>>> 9da2da0c6cdf268b2fb6f00cd4c9582ded75c683
=======
    minitest (5.14.4)
>>>>>>> 7affd3698608ea3f58db9690d3c1d32b5fce6c61
    msgpack (1.4.2)
    msgpack (1.4.2-java)
    netrc (0.11.0)
    nio4r (2.5.5)
    nio4r (2.5.5-java)
    nokogiri (1.11.1)
      mini_portile2 (~> 2.5.0)
      racc (~> 1.4)
    nokogiri (1.11.1-java)
      racc (~> 1.4)
    nokogiri (1.11.1-x64-mingw32)
      racc (~> 1.4)
    nokogiri (1.11.1-x86-mingw32)
      racc (~> 1.4)
    nokogiri (1.11.1-x86_64-darwin)
      racc (~> 1.4)
    orm_adapter (0.5.0)
    pg (1.2.3)
    pg (1.2.3-x64-mingw32)
    pg (1.2.3-x86-mingw32)
    public_suffix (4.0.6)
    puma (4.3.7)
      nio4r (~> 2.0)
    puma (4.3.7-java)
      nio4r (~> 2.0)
    racc (1.5.2)
    racc (1.5.2-java)
    rack (2.2.3)
    rack-proxy (0.6.5)
      rack
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rails (6.0.3.5)
      actioncable (= 6.0.3.5)
      actionmailbox (= 6.0.3.5)
      actionmailer (= 6.0.3.5)
      actionpack (= 6.0.3.5)
      actiontext (= 6.0.3.5)
      actionview (= 6.0.3.5)
      activejob (= 6.0.3.5)
      activemodel (= 6.0.3.5)
      activerecord (= 6.0.3.5)
      activestorage (= 6.0.3.5)
      activesupport (= 6.0.3.5)
      bundler (>= 1.3.0)
      railties (= 6.0.3.5)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.3.0)
      loofah (~> 2.3)
    railties (6.0.3.5)
      actionpack (= 6.0.3.5)
      activesupport (= 6.0.3.5)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.20.3, < 2.0)
    rake (13.0.3)
    rb-fsevent (0.10.4)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    regexp_parser (2.1.1)
    responders (3.0.1)
      actionpack (>= 5.0)
      railties (>= 5.0)
    rest-client (2.1.0)
      http-accept (>= 1.7.0, < 2.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    rest-client (2.1.0-x64-mingw32)
      ffi (~> 1.9)
      http-accept (>= 1.7.0, < 2.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    rest-client (2.1.0-x86-mingw32)
      ffi (~> 1.9)
      http-accept (>= 1.7.0, < 2.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    rest-client (2.1.0-x86-mswin32)
      ffi (~> 1.9)
      http-accept (>= 1.7.0, < 2.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    ruby_http_client (3.5.2)
    rubyzip (2.3.0)
    sass-rails (6.0.0)
      sassc-rails (~> 2.1, >= 2.1.1)
    sassc (2.4.0)
      ffi (~> 1.9)
    sassc (2.4.0-x64-mingw32)
      ffi (~> 1.9)
    sassc-rails (2.1.2)
      railties (>= 4.0.0)
      sassc (>= 2.0)
      sprockets (> 3.0)
      sprockets-rails
      tilt
    selenium-webdriver (3.142.7)
      childprocess (>= 0.5, < 4.0)
      rubyzip (>= 1.2.2)
    sendgrid-ruby (6.4.0)
      ruby_http_client (~> 3.4)
    simple_form (5.1.0)
      actionpack (>= 5.2)
      activemodel (>= 5.2)
    social-share-button (1.2.3)
      coffee-rails
    spring (2.1.1)
    spring-watcher-listen (2.0.1)
      listen (>= 2.7, < 4.0)
      spring (>= 1.2, < 3.0)
    sprockets (4.0.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.2)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    thor (1.1.0)
    thread_safe (0.3.6)
    thread_safe (0.3.6-java)
    tilt (2.0.10)
    turbolinks (5.2.1)
      turbolinks-source (~> 5.2)
    turbolinks-source (5.2.0)
    tzinfo (1.2.9)
      thread_safe (~> 0.1)
    tzinfo-data (1.2021.1)
      tzinfo (>= 1.0.0)
    unf (0.1.4)
      unf_ext
    unf (0.1.4-java)
    unf_ext (0.0.7.7)
    unf_ext (0.0.7.7-x64-mingw32)
    unf_ext (0.0.7.7-x86-mingw32)
    warden (1.2.9)
      rack (>= 2.0.9)
    web-console (4.1.0)
      actionview (>= 6.0.0)
      activemodel (>= 6.0.0)
      bindex (>= 0.4.0)
      railties (>= 6.0.0)
    webdrivers (4.6.0)
      nokogiri (~> 1.6)
      rubyzip (>= 1.3.0)
      selenium-webdriver (>= 3.0, < 4.0)
    webpacker (4.3.0)
      activesupport (>= 4.2)
      rack-proxy (>= 0.6.1)
      railties (>= 4.2)
    websocket-driver (0.7.3)
      websocket-extensions (>= 0.1.0)
    websocket-driver (0.7.3-java)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    xpath (3.2.0)
      nokogiri (~> 1.8)
    zeitwerk (2.4.2)

PLATFORMS
  java
  x64-mingw32
  x86-mingw32
  x86-mswin32
  x86_64-darwin-17
  x86_64-darwin-19
  x86_64-darwin-20

DEPENDENCIES
  bootsnap (>= 1.1.0)
  byebug
  capybara (>= 2.15)
  cloudinary (~> 1.16.0)
  devise
  dotenv-rails
  font-awesome-rails
  geocoder
  jbuilder (~> 2.7)
  jquery-rails
  listen (~> 3.2)
  mapbox-gl-rails
  mini_magick
  pg (>= 0.18, < 2.0)
  puma (~> 4.1)
  rails (~> 6.0.3, >= 6.0.3.4)
  sass-rails (>= 6)
  selenium-webdriver
  sendgrid-ruby
  simple_form
  social-share-button
  spring
  spring-watcher-listen (~> 2.0.0)
  turbolinks (~> 5)
  tzinfo-data
  web-console (>= 3.3.0)
  webdrivers
  webpacker (~> 4.0)

RUBY VERSION
   ruby 2.6.6p146

BUNDLED WITH
   2.2.8


Solution

  • Gemfile.lock is a file generated from Gemfile. As such, instead of trying to merge the two branches, it's simpler and more accurate to generate a new one from its canonical source. This might result in slightly different versions, but these should cause no trouble; any version restrictions should be defined in your Gemfile.

    Normally one does not commit generated files, they can change in trivial ways, but Gemfile.lock is a special case where you do want this to be the same for all builds.

    Resolve any conflicts in the Gemfile. Regenerate Gemfile.lock. Add it.

    for some reason he copied the code and added it himself

    This is a good opportunity to explain to them why this is a bad practice when working with a team. It might be easy for them, but it's causing trouble for you. They might need instructing in how to update their work in progress. Or you might need to extract some changes into their own branch and get that merged.