Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-Fatal- failed to allocate memory - Rails 3.1 and Mysql2 Gem

I'm having a strange problem with the latest 'mysql2' gem and Rails 3.1 I can run mysql fine from the IRB when I include the gem, but with rails whenever I attempt to save to the database in the console, or even load up the page when the server starts, i get [FATAL] Failure to Allocate Memory.

There don't seem to be any mysql logs available, and that is the only error Rails shows. Interestingly enough, when I do start a connection in the Rails console and just run a count query e.g. User.count, it works fine, but when I try to exit the console it hangs indefinitely. All the guy I'm pairing with is using the same codebase and database structure and gets no issues ...

Anyone else had this kind of issue? I tried uninstalling and reinstalling homebrew and mysql yesterday and it still happens.

like image 741
redroot Avatar asked Nov 05 '22 14:11

redroot


1 Answers

If you are on OS X Lion with mysql installed with homebrew, you can try with https://stackoverflow.com/a/9555979/1248228

like image 90
nolith Avatar answered Nov 09 '22 08:11

nolith