安装后无法启动Solr-Server:bundle exec rake sunspot:solr:start rake aborted! undefined方法`map':需要:符号

时间:2014-02-05 23:15:31

标签: ruby-on-rails-3.2 sunspot-rails

安装 sunspot_rails 后,我收到此错误“未定义方法`map”:需要:符号“如果我运行捆绑exec rake太阳黑子: solr的:开始

我不知道如何查明这个错误.. 如果您有任何建议,请告诉我

错误:  http://pastebin.com/5x8bKFKd

的Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.16'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem "sunspot_rails", "~> 1.2.1"
gem "sunspot_with_kaminari", "~> 0.1.0"
gem "jquery-ui-rails"
gem 'sqlite3'
gem "kaminari", "~> 0.12.4"
gem "devise", ">=1.4.4"
gem "dynamic_form", "~> 1.1.4"

group :development, :test do 
  gem "rspec-rails", "~> 2.6.1"
  gem "database_cleaner", "~> 0.6.7"
end

# 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 https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# 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'

1 个答案:

答案 0 :(得分:0)

似乎sunspot_rails 1.2.1不适用于rails 3.2.16。 上一版本的sunspot_rails

没有错误

的Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.16'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem "sunspot_rails"
gem "sunspot_solr"
gem "sunspot_with_kaminari"
gem "jquery-ui-rails"
gem 'sqlite3'
gem "kaminari", "~> 0.12.4"
gem "devise", ">=1.4.4"
gem "dynamic_form", "~> 1.1.4"

group :development, :test do 
  gem "rspec-rails", "~> 2.6.1"
  gem "database_cleaner", "~> 0.6.7"
end

# 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 https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# 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'