0

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?

pengw1nxd
  • 11
  • 2

1 Answers1

1

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.

Community
  • 1
  • 1
fdsaas
  • 714
  • 4
  • 10
  • 1
    If this answered your question, please mark as 'answered' or let us know if you need more information. – fdsaas Aug 08 '12 at 04:52