Can't start Solr-Server after installation: bundle exec rake sunspot:solr:start rake aborted! undefined method `map' for :needs:Symbol

StackOverflow https://stackoverflow.com/questions/21590685

  •  07-10-2022
  •  | 
  •  

Question

After I installed sunspot_rails I'm getting this error "undefined method `map' for :needs:Symbol" if I run bundle exec rake sunspot:solr:start

I don't know how to pinpoint this error.. If you have any suggestions please let me know

Error: 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'
Was it helpful?

Solution

It seems sunspot_rails 1.2.1 doesn't work with rails 3.2.16. I get no error with last version of 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'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top