# IronRuby + actionmailer: uninitialized constant Net::InternetMessageIO::TCPsocket

**URL:** <https://www.ruby-forum.com/t/ironruby-actionmailer-uninitialized-constant-net-tcpsocket/202378>\
**Category:** IronRuby\
**Created:** [January 27, 2011, 9:07pm UTC](https://www.ruby-forum.com/t/ironruby-actionmailer-uninitialized-constant-net-tcpsocket/202378 "2011-01-27T21:07:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 27, 2011, 9:07pm UTC](https://www.ruby-forum.com/t/ironruby-actionmailer-uninitialized-constant-net-tcpsocket/202378/1 "2011-01-27T21:07:34Z")

</div>

I’m using IronRuby 1.0 to run rake jobs:work (i.e. delayed\_jobs). The  
job worker is supposed to send out email (via ActionMailer, of course).  
When this runs, I get the following error:

[Worker(host:InfowitDev2 pid:16496)] EmailHelper::CalEventRemind failed  
with NameError: uninitialized constant Net::InternetMessageIO::TCPsocket

- 0 failed attempts

I’ve run this with both rails 2.3.5 and 2.3.8, both with the same  
effect. Other uninitialized constant issues have been resolved by  
changing versions of gems I’m using…however I don’t see where/how to  
do that here (other than changing rails version, hence the above).

Any suggestions here?

My environment:  
Win XP-pro SP3  
IronRuby 1.0 (installed by ironruby-1.0v4.msi)

igem install rails --version=2.3.8 --no-ri --no-rdoc (used 2.3.5 as  
well)  
igem install rake --no-ri --no-rdoc  
igem install delayed\_job --version=2.0.5 --no-ri --no-rdoc  
igem install activerecord-sqlserver-adapter --version=2.3.8 --no-ri  
–no-rdoc (used 2.3.5 as well)

rake db:migrate

I’ve uninstalled everything and reinstalled and had the same problem.

Also, I tried installing the actionmailer-ironruby gem, hoping this  
would avoid this issue, but it had no effect. This surprised  
me…shouldn’t actionmailer-ironruby take over prior to actionmailer  
getting to the smtp layer? I assume I’m not supposed to uninstall  
actionmailer for actionmailer-ironruby to work…rails has a dependency  
of actionmailer.

The stack trace for the above error is:

C:/Program  
Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active\_support/dependencies.rb:105:in  
`const_missing'' C:/Program Files/IronRuby1.0v4/lib/ruby/1.8/net/protocol.rb:206:in`old\_open’’  
C:/Program Files/IronRuby1.0v4/lib/ruby/1.8/timeout.rb:73:in `timeout'' C:/Program Files/IronRuby1.0v4/lib/ruby/1.8/timeout.rb:105:in`timeout’’  
C:/Program Files/IronRuby1.0v4/lib/ruby/1.8/net/protocol.rb:206:in  
`old_open'' C:/Program Files/IronRuby1.0v4/lib/ruby/1.8/net/smtp.rb:392:in`do\_start’’  
C:/Program Files/IronRuby1.0v4/lib/ruby/1.8/net/smtp.rb:377:in `start'' C:/Program Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/actionmailer-2.3.8/lib/action_mailer/base.rb:682:in`perform\_d  
elivery\_smtp’’  
C:/Program  
Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/actionmailer-2.3.8/lib/action\_mailer/base.rb:523:in  
` __send__' ' C:/Program Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/actionmailer-2.3.8/lib/action_mailer/base.rb:523:in`deliver!’  
’  
C:/Program  
Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/actionmailer-2.3.8/lib/action\_mailer/base.rb:395:in  
`method_mi ssing'' D:/Perforce/Eric/Main2/Common/Rails/iwBatch/app/helpers/email_helper.rb:35:in`perform’’  
C:/Program  
Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/delayed\_job-2.0.5/lib/delayed/backend/base.rb:74:in  
`invoke_jo b'' C:/Program Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/delayed_job-2.0.5/lib/delayed/worker.rb:122:in`run’’  
C:/Program Files/IronRuby1.0v4/lib/ruby/1.8/timeout.rb:73:in `timeout'' C:/Program Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/delayed_job-2.0.5/lib/delayed/worker.rb:122:in`run’’  
C:/Program  
Files/IronRuby1.0v4/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active\_support/core\_ext/benchmark.rb:1

thanks,  
eric

---

<div class="post-metadata">

**Author:** ![eric99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a88e4f/32.png) [@eric99](https://www.ruby-forum.com/u/eric99)\
**Post date:** [May 3, 2011, 7:23am UTC](https://www.ruby-forum.com/t/ironruby-actionmailer-uninitialized-constant-net-tcpsocket/202378/2 "2011-05-03T07:23:56Z")

</div>

Hi,

I am using ‘tlsmail’ in rails 2.3.5.I configured gmail its working fine.  
Now I modify the below domain:

#setup tlsmail so we can send email through SSLed SMTP  
require ‘tlsmail’  
Net::SMTP.enable\_tls(OpenSSL::SSL::VERIFY\_NONE)  
ActionMailer::Base.delivery\_method = :smtp  
ActionMailer::Base.perform\_deliveries = true  
ActionMailer::Base.default\_charset = “utf-8”  
ActionMailer::Base.raise\_delivery\_errors = true

ActionMailer::Base.smtp\_settings = {  
#:enable\_starttls\_auto =\> true,  
:address =\> ‘[mail.ghabit.com](http://mail.ghabit.com)’,  
:port =\> 25,  
:domain =\> ‘[ghabit.com](http://ghabit.com)’,  
:authentication =\> :plain,  
:user\_name =\> ‘removed\_email\_address@domain.invalid’,  
:password =\> ‘password’  
}

I got the below error. Please anyone solve this issue help me.

Net::SMTPSyntaxError in UserController#signup

502 Unimplemented command.  
RAILS\_ROOT: E:/openwire/ghabit\_app

Application Trace | Framework Trace | Full Trace  
c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:787:in  
`check_response' c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:760:in `getok’  
c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:747:in  
`starttls' c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:478:in `do\_start’  
c:/ruby/lib/ruby/gems/1.8/gems/tlsmail-0.0.1/lib/net/smtp.rb:440:in  
`start' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:682:in `perform\_delivery\_smtp’  
c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action\_mailer/base.rb:523:in  
` __send__' c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:523:in `deliver!’  
c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action\_mailer/base.rb:429:in  
`deliver' E:/openwire/ghabit_app/app/controllers/user_controller.rb:1949:in `signup\_email’  
E:/openwire/ghabit\_app/app/controllers/user\_controller.rb:203:in  
`signup’  
Request

Parameters:

{“user”=\>{“date\_of\_birth(2i)”=\>“5”,  
“date\_of\_birth(3i)”=\>“3”,  
“country”=\>“United States”,  
“agree”=\>“1”,  
“sex”=\>“Female”,  
“first\_name”=\>“Sundhari”,  
“last\_name”=\>“Bala”,  
“user\_name”=\>“sundhari”,  
“password”=\>“sundhari”,  
“email”=\>“removed\_email\_address@domain.invalid”,  
“date\_of\_birth(1i)”=\>“1973”},  
“commit”=\>“”}  
Show session dump

Response

Headers:

{“Content-Type”=\>“”,  
“Cache-Control”=\>“no-cache”}

Regards,  
B.Sundhari
