Rake and email injection
Added by David Horth about 14 years ago
So I run this command
/opt/bitnami/apps/redmine/log# rake --trace /opt/bitnami/apps/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=... username=... paswword=...
and I get the following error
(in /opt/bitnami/apps/redmine)- Invoke /opt/bitnami/apps/redmine/Rakefile (first_time, not_needed)
- Invoke redmine:email:receive_imap (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute redmine:email:receive_imap
rake aborted!
undefined method `[]' for nil:NilClass
/usr/lib/ruby/1.8/net/imap.rb:1162:in `search_internal'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/net/imap.rb:1156:in `search_internal'
/usr/lib/ruby/1.8/net/imap.rb:681:in `search'
/opt/bitnami/apps/redmine/lib/redmine/imap.rb:32:in `check'
/opt/bitnami/apps/redmine/lib/tasks/email.rake:133
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28
Since I only get this after sending a new email I believe the imap service is properly configured.
my mail message looks something like this
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: -------@-----.com
Subject: creating a new issue via email
Content-Type: multipart/alternative;
boundary="------------030305010803050706060700"
This is a multi-part message in MIME format.
--------------030305010803050706060700
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Project: oneofficedesk |
Tracker: Tasks Category:function Priority: Low Status: Open Subject: Redmine Document Description: Analyse the redmine documents from redmine website |
--------------030305010803050706060700
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Project: oneofficedesk
Tracker: Tasks
Category:function
Priority: Low
Status: Open
Subject: Redmine Document
Description: Analyse the redmine documents from redmine website
</body>
</html>
--------------030305010803050706060700--
My rails env
root@linux:/opt/bitnami/apps/redmine/log# RAILS_ENV="production" rake -T redmine (in /opt/bitnami/apps/redmine)
rake redmine:email:read # Read an email from standard input.
rake redmine:email:receive_imap # Read emails from an IMAP server.
rake redmine:email:receive_pop3 # Read emails from an POP3 server.
rake redmine:fetch_changesets # Fetch changesets from the repositories
rake redmine:load_default_data # Load Redmine default configuration data.
rake redmine:migrate_from_mantis # Mantis migration script
rake redmine:migrate_from_trac # Trac migration script
rake redmine:plugins:hook_list # Enumerate all Redmine plugin hooks and their context parameters
rake redmine:send_reminders # Send reminders about issues due in the next days.
rake redmine:watchers:prune # Removes watchers from what they can no longer view.
The strange thing is I'm not seeing anything in the production.log, shouldn't I see at least a failure message?