Search code examples
ruby-on-railsrubygitbundlergemfile

How can I unlock my gemfile so I can access the rails server?


I'm trying to recover from a branch-merge disaster in Git; I couldn't merge my topic branch to the master because of a "merge conflict in gemfile.lock". While looking for solutions to this I read in a blog post that using the "bundle lock" command would help (I didn't know it was obsolete), and when I used it I was alerted that "Lock is deprecated. Your bundle is now locked whenever you run 'bundle install'".

So I ended up merging my topic branch, but when I try to access the rails server I get an error involving bundler. I'm assuming that it's because my bundle is locked. Running 'bundle unlock' doesn't do anything.

Is there anything else I can try?


Solution

  • I don't think there is an unlock anymore. You can unlock by removing the Gemfile.lock file.

    You need to resolve the Gemfile.lock in git. Do anything you need to, in order for git to accept a Gemflie.lock. Then, update to the current revision of the git branch, redo bundle install, and check in the new Gemfile.lock.