dcparker / ruby-gmail

A Rubyesque interface to Gmail. Connect to Gmail via IMAP and manipulate emails and labels. Send email with your Gmail account via SMTP. Includes full support for parsing and generating MIME messages.
http://dcparker.github.com/ruby-gmail
792 stars 123 forks source link

deadlock on gmail.inbox.emails #45

Closed mcpenchel closed 11 years ago

mcpenchel commented 11 years ago

Hey guys.

Here's my code:

Gmail.new('email', 'password') do |gmail| gmail.inbox.emails(:unread).each do |e| ... end end

I can't pass from gmail.inbox.emails, I always get the following errors:

deadlock 0xb5825108: sleep:- - /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/monitor.rb:231 deadlock 0xb77b91b8: sleep:- (main) - /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/monitor.rb:102 INTERNAL ERROR!!! Thread(0xb77b91b8): deadlock /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/monitor.rb:102:in stop' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/monitor.rb:102:inwait' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/imap.rb:995:in get_tagged_response' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/imap.rb:1055:insend_command' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/monitor.rb:242:in synchronize' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/imap.rb:1040:insend_command' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/imap.rb:398:in select' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/monitor.rb:242:insynchronize' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/imap.rb:396:in select' /home/maino/.rvm/gems/ruby-1.8.7-p352@rails2311/gems/ruby-gmail-0.3.0/lib/gmail.rb:119:inin_mailbox' /home/maino/.rvm/gems/ruby-1.8.7-p352@rails2311/gems/ruby-gmail-0.3.0/lib/gmail/mailbox.rb:56:in emails' /home/maino/fontes/comexnfe/app/models/user.rb:49:ininitialize' /home/maino/fontes/comexnfe/app/models/user.rb:49:in initialize' /home/maino/fontes/comexnfe/app/models/user.rb:47:innew' /home/maino/fontes/comexnfe/app/models/user.rb:47:in checa_emails_para_importacao' /home/maino/fontes/comexnfe/app/models/user.rb:45:ineach' /home/maino/fontes/comexnfe/app/models/user.rb:45:in checa_emails_para_importacao' (irb):5:inirb_binding' /home/maino/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'

Any ideas?

wengzilla commented 11 years ago

Hey mcpenchel, I'm having some difficulty recreating the error.... The code you posted is working for me. Is your repository public?

mcpenchel commented 11 years ago

Sorry for abandoning this thread, I'm somewhat new to Github.. I'm still getting used to it. The repository that I was working at the time wasn't public, anyway. I remember that I found out that the problem was related to some incompatibility with my Ruby or Rails version. I was using Ruby 1.8.7 and Rails 2.3.17.