无法解决Gemfile.lock合并错误

时间:2014-10-25 12:45:43

标签: ruby-on-rails-4 gemfile.lock

我尝试运行捆绑安装,但这种情况发生了,我无法修复它。我不认为我的宝石文件中有任何合并冲突,我还没有解决..但我仍然无法摆脱这个错误。我怎么能这样做?

您的Gemfile.lock包含合并冲突。

首先运行git checkout HEAD -- Gemfile.lock以获得干净的锁定。

这是我的宝石文件:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.8'

group :test, :development do
    gem 'rspec-rails'
end

group :test do
    gem 'capybara'
    #gem 'selenium-webdriver'
end

# Use sqlite3 as the database for Active Record
group(:development, :test) do
    gem 'sqlite3'
end

group :production do
    gem 'pg'
    gem 'rails_12factor'
end

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'

# add bootstrap gem
gem 'bootstrap-sass'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

gem 'rubyzip', '0.9.9'

1 个答案:

答案 0 :(得分:0)

实际上非常简单。这篇文章解释了gemfile和gemfile.lock之间的区别。 (您可以编辑Gemfile.lock以手动删除冲突)

http://rubyinrails.com/2013/12/what-is-gemfile-lock/