Mark Nadig
Mark Nadig

Reputation: 5136

Ruby on Rails IMAP segfaults with Ruby 1.9.2

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.

Upvotes: 0

Views: 277

Answers (1)

Arthur Frankel
Arthur Frankel

Reputation: 4705

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?

Upvotes: 3

Related Questions