所以我不太确定在这里做什么。
我有一个基本完成的简单应用程序,它的主要目的是收集婚礼的回复。我设置了一个简单的邮件程序,每当输入新的 RSVP 时都会通知我,这在日志中看起来是有效的。然而,每当我实际告诉它在开发中执行交付时,就会出现分段错误,并且 Rails 服务器崩溃。我在 github 上发布了 Rails 项目中的一个错误,他们说这与我与 OpenSSL 的交互有关,我认为我没有使用 OpenSSL。 (这是一个从头开始的 Rails 3.2 应用程序,没有什么特别或奇怪的配置)
config.action_mailer.default_url_options = { :host => 'gmail.com' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:domain => 'gmail.com',
:port => 587,
:user_name => '[email protected]',
:password => 'secret',
:authentication => 'plain',
:enable_starttls_auto => true }
config.action_mailer.raise_delivery_errors = true
它会生成一个巨大的日志,该日志发布在 github 上: https://github.com/rails/rails/issues/5115
所以我不知道从这里去哪里。我从 rvm 安装了 openssl 软件包,该软件包成功构建并安装,并且我还尝试按照 github 建议从配置文件中删除 enable_starttls_auto
,但它一直崩溃。
我通过 RVM 运行 Ruby 1.9.3-p0,在 OS X Lion 上运行 Rails 3.2.0
So I'm not quite sure what to do here.
I've got a simple application that's basically done, it's main purpose is to collect RSVPs for a wedding. I set up a simple Mailer to notify me whenever a new RSVP is entered, which looks like in the log it works. However whenever I actually tell it to perform deliveries in dev, there's a segmentation fault and the rails server crashes. I posted a bug in the rails project over on github, and they said it's something to do with my interaction with OpenSSL, which I didn't think I was using. (this is a from scratch rails 3.2 app, nothing special or weird configuration wise)
config.action_mailer.default_url_options = { :host => 'gmail.com' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:domain => 'gmail.com',
:port => 587,
:user_name => '[email protected]',
:password => 'secret',
:authentication => 'plain',
:enable_starttls_auto => true }
config.action_mailer.raise_delivery_errors = true
it produces a giant log, which is posted over at github: https://github.com/rails/rails/issues/5115
So I'm not sure where to go from here. I installed the openssl package from rvm, which successfully built and installed, and I also tried removing enable_starttls_auto
from the config file at the github suggestion, but it just keeps crashing.
I'm running Ruby 1.9.3-p0 through RVM, and rails 3.2.0 on OS X Lion
发布评论
评论(2)
我最终按照此处的说明操作: Lion:问题RVM 安装 rubies - 与 openssl 相关的问题,并让 ruby 与开放 SSL 一起工作。邮件发送成功,不再出现服务器崩溃的问题。万岁!
I ended up following the instructions here: Lion: Problem with RVM installing rubies - problem related to openssl and got ruby working with open SSL. The mail sent successfully and no longer has any problems with crashing the server. Hooray!
他们认为问题出在 Rails 与 OpenSSL 的交互上,这是正确的。这篇文章总结得非常好。 http://www.22ideastreet.com/debug/smtp-rb14- bug-segmentation-fault/
修复方法是将其添加到您的 .bashrc/.zshrc/.bash_profile 中
They are correct that the issues is with Rails' interaction with OpenSSL. This post sums it up amazingly well. http://www.22ideastreet.com/debug/smtp-rb14-bug-segmentation-fault/
The fix is to add this to your .bashrc/.zshrc/.bash_profile