views:

345

answers:

1

I'm on Ubuntu 10.04 x64, ruby version 1.8.7 (2010-01-10 patchlevel 249)

I've read this thread first: http://stackoverflow.com/questions/1332207/uninitialized-constant-mysqlcompatmysqlres-using-mms2r-gem and tried everything that people suggested:

apt-get install libmysqlclient-dev

export ARCHFLAGS="-arch x86_64"; sudo gem install --no-rdoc --no-ri -v=2.7 mysql -- --with-mysql-dir=/usr/bin/mysql --with-mysql-config=/etc/mysql

I've also tried installing v2.7 and v 2.8.1 gems reinstalling mysql-server package.

Nothing worked. Still on Rails3 (beta 3) projects I get the error uninitialized constant MysqlCompat::MysqlRes. Rails 2 projects, however work fine. Any ideas?

A: 

OK, solved: gem that Rails 3 is using was installed in the home dir using bundler. I had to manually set the version of the MySQL gem (2.7) in the Gemfile, then run bundle install.

snitko