开发者

Gem mysql2 with Passenger on Mac Snow Leopard

I can a simple new Rails 3 site with 'rails s' using mysql2 in bundler. I have Passenger too but with mysql2 I get:

Error message: dlopen(/Users/riccardotacconi/.rvm/gems/ree-1.8.7-2011.03/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysql.16.dylib Referenced from: /Users/riccardotacconi/.rvm/gems/ree-1.8.7-2011.03/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle Reason: image not found - /Users/riccardotacconi/.rvm/gems/ree-1.8.7-2011.03/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle

There are similar questions but none with Passenger. I think Passeng开发者_如何学运维er needs some environment path to work fine. I run apache with my same user and PassengerRuby is the same as the one I use in the shell and I run 'rails s'


Looks like it can't pick up mysql libraries from your system. You can use brew to install them. In the vast majority of cases it's better to use brew stuff as opposed to dmg packages.

If you need a list of bash commands for installing all that (rvm + passenger + ruby with mysql), you can find it here: http://www.glebm.com/2012/01/mac-os-x-ruby-19x-with-rvm-passenger.html

You'll need to do gem uninstall mysql2 and then bundle again to make sure it doesn't pick up the cached version.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜