So far today has been one of those days where I can't get anything to work. For the past three hours, I have been trying to require tmail library, and trying to connect to my mail server with imap. Here is a brief session illustrating my frustration.
irb(main):001:0> require 'net/smtp'
=> true
irb(main):002:0> require 'rubygems'
=> false
irb(main):003:0> require 'hpricot'
=> true
irb(main):004:0> require 'open-uri'
=> true
irb(main):005:0> require 'net/imap'
=> true
irb(main):006:0> require 'tmail'
LoadError: no such file to load -- tmail
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):6
from ^C:0
irb(main):007:0> $ sudo gem install tmail
Errno::EBADF: Bad file descriptor
from (irb):7:in `write'
irb(main):008:0> imap = Net::IMAP.new('smtp-server.cfl.rr.com')
Errno::ETIMEDOUT: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2)
from C:/Ruby/lib/ruby/1.8/net/imap.rb:886:in `initialize'
from C:/Ruby/lib/ruby/1.8/net/imap.rb:886:in `open'
from C:/Ruby/lib/ruby/1.8/net/imap.rb:886:in `initialize'
from (irb):8:in `new'
from (irb):8
from ^C:0
irb(main):009:0> imap = Net::IMAP.new('pop-server.cfl.rr.com')
Errno::ETIMEDOUT: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2)
from C:/Ruby/lib/ruby/1.8/net/imap.rb:886:in `initialize'
from C:/Ruby/lib/ruby/1.8/net/imap.rb:886:in `open'
from C:/Ruby/lib/ruby/1.8/net/imap.rb:886:in `initialize'
from (irb):9:in `new'
from (irb):9
from ^C:0
I have Ruby 186-27, and I have downloaded a Tmail .gem, .tgz, AND a zip folder, all of which I have put in my rubygems folder. Why won't Tmail load, and why can't I connect to my email server? pop-server.cfl.rr.com is my the outgoing server, and smtp-server.cfl.rr.com is the incoming server. PLEASE help, all I am trying to do is be able to read incoming emails. I have already written code that sends emails, so I know I can write something that receives emails. Any advice would be GREATLY appreciated :)
Thanks,
Matt