Project

General

Profile

Actions

Defect #5235

closed

undefined local variable or method `usage' for #<RedmineMailHandler:0x6c14d34bb0a0> (NameError)

Added by Fred Tranfield about 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
2010-04-02
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Somewhere during an upgrade to RM I lost the ability to have RM receive email. It was running just beautifully on 8.5.

Some while back I upgraded and was not using the receive email feature for some time. At 9.2 and, now, 0.9.3.stable.3625, I'm getting an error in the procmail.log file:

undefined local variable or method `usage' for #<RedmineMailHandler:0x6c14d34bb0a0> (NameError)

I have a SVN install and used it, just tonight, to update the the 9.3 stable version. I walked through all the upgrade steps and everything seems to work fine, except for this.

In rdm-redminehandler.rb I commented out the offending 'usage' line and got another error:

422 Unprocessable Entity
Actions #1

Updated by Fred Tranfield about 15 years ago

Bump. Anyone?

Actions #2

Updated by Fred Tranfield almost 15 years ago

Seriously, its been well over a month and I still have this problem. Is there Nobody in the community who's seen this problem??? Or has an idea of how to attack it?

Actions #3

Updated by Felix Schäfer almost 15 years ago

1. Seriously, if you want someone to whine at and that jumps when you say jump, get paid support, 2. make sure all your gems are up-to-date, I'd wager rdoc isn't, 3. provide a trace.

Actions #4

Updated by Fred Tranfield almost 15 years ago

Hmm. Ignored for 7 weeks. Then flamed.

You lost your wager. Updating my gems was one of the first things I did.

I'll be glad to collaborate and work on a fix, as I do with 5 other open source projects. I need a little courtesy and accountability to make it worth my while.

Actions #5

Updated by Felix Schäfer almost 15 years ago

Well, blame it on my english skills, but I interpret the first sentence of your reply as "my toy's broken, help me mend it, now!" whining. Anyway, I don't want to loose time in word fights, moving on.

Felix Schäfer wrote:

3. provide a trace.

By that I mean we need something to work on, the error you provided is nigh useless. See SubmittingBugs for more info on what would be helpful, but for the most part, any sort of error in the redmine log and responses from the mailhandler called with -v is.

I wasn't able to reproduce the error concerning the usage part, so either the file wasn't upgraded correctly, or something else is fishy (not up-to-date enough whatever on the way, the gems not in the PATH when the script is called by the mail server, you name it). I was however able to make the script throw a 422, called with -v it yields "Request was denied by your Redmine server. Possible reasons: email is sent from an invalid email address or is missing some information.", additionally there is some stuff in the redmine log, though production mode doesn't yield much more in this case.

Actions #6

Updated by Fred Tranfield almost 15 years ago

This is useful and helpful. Thank you.

I do suspect this has something to do with my own install, which is a normal install on Dreamhost and may have something to do with the peculiarities of that environment...

Up against multiple deadlines this week. Will post trace info at the end of the week.

Cheers.

Actions #7

Updated by Fred Tranfield almost 15 years ago

Okay, I've spent 4 hours on this today, and still no love.

I reinstalled my whole Ruby environment and, after repeated errors, gave up and am now using the Dreamhost native version.

Here are the specs:

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /home/ftran/manage.fredtranfield.com
Environment               development
Database adapter          mysql
Database schema version   20100221100219

About your Redmine plugins
Advanced roadmap plugin   0.0.6
Redmine Bugcloud plugin   0.0.2.1

I don't know why this insists that I'm running in Development mode. My environment.rb and dispatch.fcgi both have ENV['RAILS_ENV'] = 'production'. Bizarre.

I've followed this advice http://wiki.dreamhost.com/Ruby_on_Rails#Rails_2.3.5_-_Rack_1.0_already_activated_.28fix.29 and still could not get Rack 1.0.1 working.


_When filling a bug report, please give the following information with the description of your problem:_

    * your database version (eg. Postgresql 8.2): MySQL 5.0.32
    * your Redmine version Redmine 0.9.4.stable.3739 (MySQL)

When I send a mail from RM, I get a nice log message and the mail comes through beautifully. However when I reply to the message, the process dies at the .promail step. Here is the log:

procmail: [24866] Fri May 21 14:08:33 2010
procmail: Assigning "LOGABSTRACT=all" 
procmail: Assigning "PMDIR=/home/fctredmine/procmail" 
procmail: Assigning "SHELL=/bin/sh" 
procmail: Assigning "MAILDIR=/home/fctredmine/Maildir" 
procmail: Assigning "LASTFOLDER=/home/fctredmine/procmail/rdm-mailhandler.rb --url http://myurl.com --key secretkey --verbose --allow-override=tracker --help" 
procmail: Notified comsat: "fctredmine@:/home/fctredmine/procmail/rdm-mailhandler.rb --url http://myurl.com --key secretkey --verbose --allow-override=tracker --help" 
From email@gmail.com  Fri May 21 14:08:33 2010
 Subject: Re: [ProjectTopic - Feature Development #204] test
  Folder: /home/fctredmine/procmail/rdm-mailhandler.rb --url http://ma      13846
procmail: Executing "/home/fctredmine/procmail/rdm-mailhandler.rb,--url,http://manage.fredtranfield.com,--key,secretkey,--verbose,--allow-override=tracker,--help" 
/home/fctredmine/procmail/rdm-mailhandler.rb:102:in `initialize': undefined local variable or method `usage' for #<RedmineMailHandler:0x6b5588f7def8> (NameError)
    from /usr/lib/ruby/1.8/getoptlong.rb:613:in `each'
    from /usr/lib/ruby/1.8/getoptlong.rb:610:in `loop'
    from /usr/lib/ruby/1.8/getoptlong.rb:610:in `each'
    from /home/fctredmine/procmail/rdm-mailhandler.rb:95:in `initialize'
    from /home/fctredmine/procmail/rdm-mailhandler.rb:164:in `new'
    from /home/fctredmine/procmail/rdm-mailhandler.rb:164


Any ideas would be gratefully accepted. I really need this feature for my clients to actually want to use this.
Actions #8

Updated by Fred Tranfield almost 15 years ago

  • Status changed from New to Resolved

Finally figured it out. I had a --help declaration in the .procmail file which was doing it.

Actions #9

Updated by Eric Davis almost 15 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF