1

几天前我才开始使用红宝石。我不完全理解 gemfile 的概念。我的 Gemfile 看起来像:

source 'http://rubygems.org'

gem 'sunspot_solr', github: 'sunspot/sunspot', branch: 'master'
gem 'sunspot_rails', github: 'sunspot/sunspot', branch: 'master'

但是在运行“捆绑安装”时。

Bundler could not find compatible versions for gem "builder":
  In Gemfile:
    sunspot_rails (>= 0) ruby depends on
      builder (~> 2.1.2) ruby

    sunspot_rails (>= 0) ruby depends on
      builder (3.2.2)

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    sunspot_rails (>= 0) ruby depends on
      bundler (~> 1.0.0) ruby

  Current Bundler version:
    bundler (1.3.5)

This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

我应该安装哪个版本的构建器,因为存在冲突,

4

2 回答 2

2

删除 Gemfile.lock 并运行 bundle install,让 Bundler 从头开始​​解析所有依赖项。

于 2013-09-16T11:24:46.057 回答
1

利用

source 'http://rubygems.org'

gem 'sunspot_rails'

gem 'sunspot_solr' 是可选的,如此处所述

于 2013-09-17T10:23:10.550 回答