'$ rake db:create' don't work!

Hey guys,
I’m new to learning RoR and I try to do a database with mysql and I
have a problem.
First I create a a folder in my desktop and after with command in the
terminal on Mac Os Mavericks I create a project:
rails new vota_prato -d mysql

after I will try to create a database with this command:

$ rake db:create

and I have this error:
MacBook-Pro-de-Romenig:vota_prato romenig$ rake db:create
rake aborted!
9): Library not loaded: libmysqlclient.18.dylib
Referenced from:
Reason: image not found -
require' /Users/romenig/.rvm/gems/ruby-2.0.0-p247/gems/mysql2-0.3.14/lib/mysql2.rb:8:in<top (required)>’
/Users/romenig/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in
require' /Users/romenig/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:inblock (2 levels) in require’
/Users/romenig/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in
each' /Users/romenig/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:inblock in require’
/Users/romenig/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in
each' /Users/romenig/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:inrequire’
/Users/romenig/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler.rb:132:in
require' /Users/romenig/Desktop/caelum_ror/vota_prato/config/application.rb:7:in<top (required)>’
/Users/romenig/Desktop/caelum_ror/vota_prato/Rakefile:4:in require' /Users/romenig/Desktop/caelum_ror/vota_prato/Rakefile:4:in<top
eval' /Users/romenig/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in
(See full trace by running task with --trace)

What I need to do for running good? Before install the RVM for RoR I
have installed the MySql who I do projects with Java.
Someone could help me with this error?
O want to continue my studies and I really like Ruby on Rails do the
things it’s exciting!

This seems to be a common issue (affects some Python users as well). The
install of libmysqlclient seems not to be on your PATH.

A stackoverflow question came up with this solution:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib

(ie, you symlink the file onto your path).

(SO link:

On Wed, Nov 27, 2013 at 1:29 PM, James Turley <

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs