Ruby on rails 3.2 谷歌计算引擎配置rails3 actionMailer超时

Ruby on rails 3.2 谷歌计算引擎配置rails3 actionMailer超时,ruby-on-rails-3.2,google-compute-engine,Ruby On Rails 3.2,Google Compute Engine,获得: Timeout::Error (execution expired): app/controllers/acts_controller.rb:192:in `send_message' GCE需要sendgrid,随后我根据将端口调整为“2525”。因此environment.rb文件是 require File.expand_path('../application', __FILE__) Paperclip.options[:command_path] = "/usr/bin

获得:

Timeout::Error (execution expired):
  app/controllers/acts_controller.rb:192:in `send_message'
GCE需要sendgrid,随后我根据将端口调整为“2525”。因此environment.rb文件是

require File.expand_path('../application', __FILE__)

Paperclip.options[:command_path] = "/usr/bin/"

ActionMailer::Base.smtp_settings = {
  :user_name => ENV["SENDGRID_USERNAME"],
  :password => ENV["SENDGRID_PASSWORD"],
  :domain => ENV["DOMAIN"],
  :address => 'smtp.sendgrid.net',
  :port => 2525,
  :authentication => :plain,
  :enable_starttls_auto => true
}

# Initialize the rails application
Myapp::Application.initialize!
环境变量在yaml文件中定义,带有

SENDGRID_USERNAME:  'my_username'
SENDGRID_PASSWORD:  'pswd'
DOMAIN:  'domain.tld'
这仍处于开发模式,development.rb定义

  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default_url_options = { :host => 'smtp.sendgrid.net' }
超时的来源可能是什么

编辑: 关于坏连接的假设

telnet smtp.sendgrid.net 2525
Trying 5.153.47.202...
Connected to smtp.sendgrid.net.

在development.rb中,尝试将config.action\u mailer.default\u url\u选项修改为:

config.action_mailer.default_url_options = {
  :host => 'smtp.sendgrid.net',
  :port => 2525
}

规则集为源范围:0.0.0.0/0 tcp:2525不幸的是,行为保持不变。谢谢!我使用的是587端口,改为2525工作!