0

I was trying to do a simple test to pull emails from gmail following these instructions. However, when I do this with Ruby 1.9.2p136 it throws a segmentation fault on this line:

imap = Net::IMAP.new('imap.gmail.com', 993, true)

Using 1.8.7p334 it works fine. I had been running into a similar issue where ActionMailer sending with smtp would segfault in 1.9.2 and work fine in 1.8.7. I found this article which pointed out setting enable_starttls_auto => false. However, I don't see any way to push that through to IMAP. However, it seems related.

Community
  • 1
  • 1
Mark Nadig
  • 4,901
  • 4
  • 37
  • 46
  • Seems the root problem is with macports openssl. This came down with mysql on my local dev environment. https://trac.macports.org/ticket/28582 – Mark Nadig Mar 18 '11 at 15:45

1 Answers1

3

Add the following environment variable:

export RUBYOPT=-r openssl

You can do this from within your profile or see: Setting environment variables in OS X?

Community
  • 1
  • 1
Arthur Frankel
  • 4,695
  • 6
  • 35
  • 56