Got this error while fetching IMAP email via Gmail
/Work/cashboard/site/trunk/vendor/rails/railties/lib/commands/runner.rb:45: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/imap.rb:288:in shutdown': Socket is not connected (Errno::ENOTCONN) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/imap.rb:288:indisconnect'
from /Work/cashboard/site/trunk/vendor/plugins/fetcher/lib/fetcher/imap.rb:69:in close_connection' from /Work/cashboard/site/trunk/vendor/plugins/fetcher/lib/fetcher/base.rb:33:infetch'
from (eval):9
from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:284:in lock' from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:inattempt'
from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:in catch' from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:inattempt'
... 7 levels...
from /Work/cashboard/site/trunk/vendor/rails/railties/lib/commands/runner.rb:45
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire'
from script/runner:3
Changing the "close_connection" method in imap.rb fixes the error.
# Delete messages and log out
def close_connection
@connection.expunge
@connection.logout
@connection.disconnect unless @connection.disconnected?
end
Got this error while fetching IMAP email via Gmail
/Work/cashboard/site/trunk/vendor/rails/railties/lib/commands/runner.rb:45: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/imap.rb:288:in
shutdown': Socket is not connected (Errno::ENOTCONN) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/imap.rb:288:in
disconnect' from /Work/cashboard/site/trunk/vendor/plugins/fetcher/lib/fetcher/imap.rb:69:inclose_connection' from /Work/cashboard/site/trunk/vendor/plugins/fetcher/lib/fetcher/base.rb:33:in
fetch' from (eval):9 from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:284:inlock' from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:in
attempt' from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:incatch' from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:in
attempt' ... 7 levels... from /Work/cashboard/site/trunk/vendor/rails/railties/lib/commands/runner.rb:45 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
require' from script/runner:3Changing the "close_connection" method in imap.rb fixes the error.