0

I am just getting started with ruby on rails, and created a rails project in the command line. I can't start the server and get the following message (on a mac):

/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle:     dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
  Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
    from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2.rb:9
    from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
    from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
    from /Users/callofdutyfans9/Sites/simple_cms/config/application.rb:7
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.10/lib/rails/commands.rb:53:in `require'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.10/lib/rails/commands.rb:53
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.10/lib/rails/commands.rb:50:in `tap'
    from /Library/Ruby/Gems/1.8/gems/railties-3.2.10/lib/rails/commands.rb:50
    from script/rails:6:in `require'
    from script/rails:6
Prakash Murthy
  • 12,923
  • 3
  • 46
  • 74
Evan Mosseri
  • 374
  • 2
  • 9
  • Check out http://stackoverflow.com/a/5509692/429758 – Prakash Murthy Jan 13 '13 at 06:25
  • check these out [http://stackoverflow.com/questions/10557507/rails-mysql-on-osx-library-not-loaded-libmysqlclient-18-dylib][1] [http://stackoverflow.com/questions/4546698/library-not-loaded-libmysqlclient-16-dylib-error-when-trying-to-run-rails-serv][2] HTH [1]: http://stackoverflow.com/questions/10557507/rails-mysql-on-osx-library-not-loaded-libmysqlclient-18-dylib [2]: http://stackoverflow.com/questions/4546698/library-not-loaded-libmysqlclient-16-dylib-error-when-trying-to-run-rails-serv – sameera207 Jan 13 '13 at 06:40
  • possible duplicate of [rails server fails to start with mysql2 using rvm & ruby 1.9.2-p0 on OSX 10.6.5](http://stackoverflow.com/questions/4512362/rails-server-fails-to-start-with-mysql2-using-rvm-ruby-1-9-2-p0-on-osx-10-6-5) – Anand Shah Jan 13 '13 at 06:47
  • Thanks for the links i thought that i looked through everything. the issue is resolved. I used homebrew to install a 2nd copy of mysql. – Evan Mosseri Jan 13 '13 at 07:28
  • don't polute the system ruby on your Mac. It' better to install a custom ruby with rvm, and build your RoR app on it – Miguel Prz Jan 13 '13 at 08:56

0 Answers0