开发者

MySQL, RoR issues on Snow Leopard

I feel I've gone through every post on this subject, and I'm still banging my head against the wall.

I am running...

Mac OS 10.6.6

MySQL 5.1.4.4 (on MAMP) or (MySQL 5.5.8 in my /usr/ directory) both can be running and work fine

Ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10.6.0] (using RVM)

Rails 2.2.2

Gem 1.4.2

MySQL gem 2.8.1 (it says it's installed)

When I fire up the RoR app I've been developing, the mongrel appears to load fine. When I try to bring up the app in my browser I get the following error...

/!\ FAILSAFE /!\ Thu Jan 20 19:46:07 -0500 2011

Status: 500 开发者_开发问答Internal Server Error

uninitialized constant MysqlCompat::MysqlRes

then what follows are a bunch of lines like...

/Users/PJ/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:442:in `load_missing_constant'

I feel I have tired every variation of the ARCHFLAGS solutions that have been previously suggested on other posts. None have worked.

I am using MAMP and RVM as I have done other uninstalls and re-installs of MySQL, Ruby, Rails and various gems in attempts from other suggested solutions.

The app worked fine prior to my update to Snow Leopard. I am not a very sophisticated developer type, so I apologize in advance for being, well, not the brightest.


Try this AFTER making sure that Xcode is installed on your system.

gem uninstall mysql

export ARCHFLAGS="-arch i386 -arch x86_64" ; gem install --no-rdoc -- no-ri mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/ local/mysql/bin/mysql_config


I coudn't ever seem to get the 2.8.1 mysql gem to work. I downgraded it to the 2.7 version which led to a series of new errors (a DYLD_LIBRARY_PATH error), but it was eventually figured out and I am up and running again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜