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

I am not familiar with Tmail, but I am familiar with the issue of those who try to program Ruby on Rails in Windows. You will have great pains and woes trying to program in Windows(trust me, I already made that mistake.) What you need to do is make a partition or designate an entire drive for Ubuntu which is an amazing free Operating System which is great for RoR developing purposes and personal use. I use it mainly for developing, but I may start to use it more and more for personal stuff. Please read the forums sticky on RoR. You can always submit an issue over at github about tmail. I am assuming that's where that gem is hosted, since basically almost every gem is hosted at Github.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.