pengw1nxd
pengw1nxd

Reputation: 11

rake sunspot:solr:start does not work

I'm working with my Rails app and I'm trying to start Solr but it keeps telling me that my rake aborted. Here is what shows up in my terminal:

$bundle exec rake sunspot:solr:start
rake aborted!
dlopen(/Users/shui/.rvm/gems/ruby-1.9.2-p180@rails307/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/shui/.rvm/gems/ruby-1.9.2-p180@rails307/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/shui/.rvm/gems/ruby-1.9.2-p180@rails307/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle

I've already added "require 'sunspot/rails/tasks'" and "require 'sunspot/solr/tasks'" to my Rakefile and followed all the installation instructions on https://github.com/sunspot/sunspot/wiki/Adding-Sunspot-search-to-Rails-in-5-minutes-or-less

I'm running on Mac OSX Lion trying to get Sunspot working with Rails 3. Anybody know how I can fix this problem?

Upvotes: 0

Views: 819

Answers (1)

fdsaas
fdsaas

Reputation: 714

Your issue is not with Sunspot, but rather with libmysqlclient.18.dylib.

See Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem for the solution!

Just make sure you have MySql installed and you are referencing the mysql gem correctly in your Gemfile, and that the bundle installs with the proper native extensions.

Upvotes: 1

Related Questions