Martin J. wrote: > Hi, > I installed the "kwatch-mysql-ruby" gem on my Debian server but when I > try to run the "db:migrate" task I get the following error: > > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute db:migrate > rake aborted! > uninitialized constant MysqlCompat::MysqlRes
I saw this, having freshly installed Rails 2.3.3, and then being told to run 'gem install mysql' because the MySQL client is no longer bundled with Rails, as of 2.2 Okay, I did that. Then I got the error message you showed in your post -- about MysqlCompat::MysqlRes not being defined. Turns out there is no such thing; this error is caused by a malfunction of the mysql-2.8.1 gem. If you install the gem by hand, chances are when you run the test you'll find that the gem's bundle doesn't actually manage to load the mysqlclient library. (On my MacOS X 10.5.8 system, it's a .dylib; under Linux it may be a .so) The error message I saw during the test phase looked like this: ./mysql.bundle: dlopen(./mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib (LoadError) Referenced from: /Users/ccullen/Projects/npapp-v2/mysql-ruby-2.8.1/mysql.bundle Reason: image not found - ./mysql.bundle from test.rb:5 >From that message you can see it's looking for the mysqlclient library in a directory one level too deep, vis-a-vis the location my libraries occupy: /usr/local/mysql/lib is right; /usr/local/mysql/lib/mysql is not. It is however pretty simple to create a 'mysql' symlink inside /usr/local/mysql/lib and point it at '.', allowing the broken mysql.bundle to locate its libraries. This is definitely a hack. I just wanted to help, since I haven't seen any answers posted, and certainly nothing to explain why this error is occurring. Best of luck! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

