kamilc / email_verifier

Helper validation utility for checking if given email address is real.
MIT License
214 stars 72 forks source link

Not working on heroku #4

Closed Hareramrai closed 11 years ago

Hareramrai commented 11 years ago

I have tried to use it on heroku and it is not working.But works fine in my local machine. I am using it inside a model and code of model is below

class User < ActiveRecord::Base attr_accessible :email validates_email_realness_of :email end

Errors in log of heroku application was

 Started POST "/publics/check" for 203.129.204.133 at 2013-03-27 07:13:00 +0000
2013-03-27T07:13:00+00:00 app[web.1]: Processing by PublicsController#check as HTML
2013-03-27T07:13:00+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"dzbG3EPTpIHIKELLK/kJkYAz41lqQR37x1klfafXH5Q=", "email"=>"212asas@gmail.com", "commit"=>"Submit"}
2013-03-27T07:13:00+00:00 app[web.1]: script/rails: No such file or directory - host -t MX gmail.com
2013-03-27T07:13:00+00:00 app[web.1]: Completed 500 Internal Server Error in 11ms
2013-03-27T07:13:00+00:00 app[web.1]: 
2013-03-27T07:13:00+00:00 app[web.1]: NoMethodError (undefined method `scan' for nil:NilClass):
2013-03-27T07:13:00+00:00 app[web.1]:   app/controllers/publics_controller.rb:8:in `check'
kamilc commented 11 years ago

It seems that Heroku doesn't provide a 'host' command line utility.. Thanks for letting me know.

sheng103 commented 11 years ago

I faced same error

kamilc commented 11 years ago

The newer version has just been pushed to RubyGems. The gem now uses pure Ruby check for MX records. I'm closing the issue.