ar_sendmail - “安装时无法找到RubyGem cyu-ar_mailer”

时间:2012-10-05 15:45:01

标签: ruby-on-rails ruby gem

我正在尝试在我们的登台服务器上测试电子邮件。我们使用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'

感谢任何建议 - 最多

1 个答案:

答案 0 :(得分:0)

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

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

其中'staging'是我的暂存环境的名称。我认为它之前没有得到合适的环境,这就是为什么它会让人觉得宝石不在那里。