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
Simplest Way to Send Raw Byte-Arrays Using Ruby's Tcpsocket-Class
Stop Loading Page Watir-Webdriver
Ruby.Metaprogramming. Class_Eval
How to Change the Default Value of a Struct Attribute
Getting a List of Classes That Include a Module
How to Stop Rails' Built-In Server from Listening on 0.0.0.0 by Default
Cannot Assign Requested Address - Bind(2) (Errno::Eaddrnotavail)
Mismatched Bundler Version - Bundler 2, Ruby 2.6
Which Equality Test Does Ruby's Hash Use When Comparing Keys
Errno::Eaccess: Permission Denied @ Dir_S_Mkdir
Declaring an Integer Range with Step != 1 in Ruby
Why Aren't Global (Dollar-Sign $) Variables Used
How Can Bundler/Gemfile Be Configured to Use Different Gem Sources During Development
How to Render File in Rails 5 API