0

我正在尝试在我们的登台服务器上测试电子邮件。我们使用 ar_sendmail,我确信它过去曾在此服务器上运行过。现在虽然它抱怨实际上存在的丢失的宝石:

$ sudo /etc/init.d/ar_sendmail start
Starting ar_sendmail: /usr/lib/ruby/1.8/rubygems.rb:827:in `report_activate_error': Could not find RubyGem cyu-ar_mailer (>= 0) (Gem::LoadError)
    from /usr/lib/ruby/1.8/rubygems.rb:261:in `activate'
    from /usr/lib/ruby/1.8/rubygems.rb:68:in `gem'
    from /usr/local/bin/ar_sendmail:18

$ gem list | grep ar_mailer
cyu-ar_mailer (1.4.8.1, 1.4.7)

什么?有人知道这里可能出了什么问题吗?我尝试重新安装 gem 以防万一并得到相同的错误。这是正在爆炸的文件的内容(/usr/local/bin/ar_sendmail)

  1 #!/usr/bin/ruby
  2 #
  3 # This file was generated by RubyGems.
  4 #
  5 # The application 'cyu-ar_mailer' is installed as part of a gem, and
  6 # this file is here to facilitate running it.
  7 #
  8 
  9 require 'rubygems'
 10 
 11 version = ">= 0"
 12 
 13 if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
 14   version = $1
 15   ARGV.shift
 16 end
 17 
 18 gem 'cyu-ar_mailer', version
 19 load 'ar_sendmail'

感谢任何建议 - 最大

4

1 回答 1

0

我通过像这样启动它来解决这个问题:

/opt/ruby-enterprise-1.8.7-2010.02/bin/ruby /usr/local/bin/ar_sendmail -e staging -d --batch-size 100 --delay 150

其中“暂存”是我的暂存环境的名称。我认为它之前没有得到正确的环境,这就是为什么它认为宝石不存在而爆炸的原因。

于 2012-10-08T10:05:46.333 回答