After removing macports and installing homebrew, I encountered a problem when I installed pycurl (a dependency of tornado). pycurl requires a newer version (v7.19) of libcurl than what my system (osx 10.5.8) has (v7.16). So I grabbed the curl source and installed it (./configure --with-ca-bundle=/usr/share/curl/curl-ca-bundle.crt && make && make install). With the newer curl installed in /usr/local, I tried installing pycurl again, and it failed. Checking my $PATH, I found out that /usr/local/bin is the last entry. I read the /etc/profile and the /usr/libexec/path_helper and attempted to reorganize the PATH but instead decided to remove /usr/local/bin from /etc/paths and manually add it in /etc/profile.
Rails 3 is going to require at least Ruby 1.8.7 so I decided to install Ruby Enterprise Edition on my Mac. I have OSX Leopard (10.5.8) and use macports. After installing rvm, I encountered the same problem whenever I executed my web server in my Rails app:
/usr/local/rvm/ree-1.8.7-2009.10/lib/ruby/1.8/openssl/ssl.rb:31: [BUG] Bus Error
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.8.0], MBARI 0x8770, Ruby Enterprise Edition 2009.10
The culprit is that I have two openssl installations and the eventmachine gem isn’t compiled with the same openssl as the my REE install. This issue was reported here.
So the solution is either to recompile REE to use Macport’s openssl or recompile eventmachine to use the system’s openssl lib. I chose to recompile REE.
sudo rvm install ree --configure --enable-shared=true,--with-openssl-dir=/opt/local --debug