Sudden MySQL errors
I'm not sure what I did to my MySQL install but after running perfectly for years and recently migrating over to Snow Leopard (and working fine for about a month or more) MySQL generates errors for both Rails 2 and 3 apps (I don't use MySQL for anything else).
$ rake db:migrate
(in /Users/x/Sites/subscriptions)
rake aborted!
dlopen(/Users/x/.rvm/gems/ruby-1.9.2-p0/gems/mysqlplus-0.1.2/lib开发者_JAVA技巧/mysql.bundle, 9): Symbol not found: _mysql_real_connect
Referenced from: /Users/x/.rvm/gems/ruby-1.9.2-p0/gems/mysqlplus-0.1.2/lib/mysql.bundle
Expected in: flat namespace
in /Users/x/.rvm/gems/ruby-1.9.2-p0/gems/mysqlplus-0.1.2/lib/mysql.bundle - /Users/x/.rvm/gems/ruby-1.9.2-p0/gems/mysqlplus-0.1.2/lib/mysql.bundle
/Users/x/Sites/subscriptions/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
It's been this way for over a few days now and it's really starting to be an issue. Any clue what might be causing this? I think I may have to recompile MySQL via macports but I'm not sure if that will actually do the trick or cause more issues. Any help is appreciated! Thanks in advance!
I upgraded to Snow Leopard and everything went to hell in my ruby environment. Here are my suggestions:
Before you do anything, make sure you have an up-to-date version of gcc. Ditch macports - homebrew is a much better package management tool and results in almost no errors. Reinstall your base ruby and then reinstall rvm
If that doesn't work, try reinstalling mysql entirely, but I would bet that your ruby got corrupted. SL introduced some major architecture changes that cause bizarre errors everywhere (I had insane errors with postgres, http, and other unfun things)
Been there. It could be you are running a 64 bit while MySQL is still 32. Try what Anthony suggested and keep an eye on the bit version
精彩评论