MAC Osx Lion and Ruby - [Fatal] Failed to Allocate Memory

Mac OSX Lion and Ruby - [FATAL] failed to allocate memory

It took me some time to figure it out but here is the solution:

This problem was caused by mysql2 gem, when I switched to ruby-mysql it all started working again (remember to change adapter from mysql2 to mysql in your database.yml!)

So I started thinking about differences between mac mini and iMac. Basically the mini is running Lion upgraded from Snow Leopard, which is upgraded Leopard and it has good, old Mac Ports for mysql and pgsql servers. So when gem is compiled its using port libraries.

On the other hand the iMac with fresh Lion installation has Zend Server package (apache + php + mysql binaries) and a Homebrew package 'mysql-connector-c' that has libraries needed to compile gem.

All in all it seems as if ports version of mysql works correctly whereas Homewbrew connector does not (its leaking some memory?).

Hope this helps.

rails3 app stopped working when the first access on mac

My solution at last is uninstall mysql-connector-c, reinstall mysql. and everything works fine now.

Mac OSx Lion - Cannot get RoR installed

I believe my issue is due to the fact RubyGem does not add 'rails' to the $PATH environment variable. I was able to get everything working by installing RVM and using it to update my default Ruby and install Rails

Install Ruby 1.9.2 on Mac OSX 10.6 with 32bit version

Problems compiling native gems under Snow Leopard + RVM

and the gist



Related Topics



Leave a reply



Submit