1
votes

I'm a total newbie, trying to follow a Rails tutorial and have successfully run the install routine from http://railsinstaller.org/

I have also installed mysql

I have used the command> rails new simple_cms -d mysql

this appeared to run successfully

when I run rails server

this is the output below - doesn't seem to bootup WEBrick on port 3000

Many thanks

===============

/usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2.rb:9:in require': dlopen(/usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle Reason: image not found - /usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2.rb:9:in
' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in require' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in block (2 levels) in require' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in each' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in block in require' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in each' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in require' from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler.rb:119:in require' from /Users/amelrose/Sites/simple_cms/config/application.rb:7:in' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:53:in require' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:53:in block in ' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:50:in tap' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:50:in ' from script/rails:6:in require' from script/rails:6:in'

1

1 Answers

1
votes

I had the same problem. Because on Mac OS X, mysql usually installs in /usr/local/mysql, you will need to manually set the path to the libmysqlclient in /usr/lib.

Run this in a terminal:

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