pls help me , mysql2 error

/Users/JasonJiang/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/JasonJiang/RubymineProjects/untitled6/script/rails server -b 0.0.0.0 -p 3000 -e development
/Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2.rb:9:in `require': dlopen(/Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
  Referenced from: /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle
  Reason: image not found - /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2.rb:9:in `<top (required)>'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/runtime.rb:68:in `require'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/runtime.rb:66:in `each'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/runtime.rb:66:in `block in require'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/runtime.rb:55:in `each'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler/runtime.rb:55:in `require'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.rc/lib/bundler.rb:128:in `require'
    from /Users/JasonJiang/RubymineProjects/untitled6/config/application.rb:7:in `<top (required)>'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:52:in `require'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:52:in `block in <top (required)>'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:49:in `tap'
    from /Users/JasonJiang/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:49:in `<top (required)>'
    from /Users/JasonJiang/RubymineProjects/untitled6/script/rails:6:in `require'
    from /Users/JasonJiang/RubymineProjects/untitled6/script/rails:6:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1

1 comment

sudo vi /etc/launchd.conf

the file may not exist.

add/insert the following:

setenv DYLD_LIBRARY_PATH=/usr/local/mysql/lib

you may need to adjust the path.

reboot your mac.

0

Please sign in to leave a comment.