Have you setup ActionMailer with smtp stuff and/or are using sendgrid? On Fri, 2010-01-15 at 02:01 -0800, Simon Starr wrote: > Ah yes, thanks for pointing that out! > > Now I get the same "Connection refused" error: > > >> UserMailer.deliver_test_mail > Errno::ECONNREFUSED: Connection refused - connect(2) > > Cheers > Simon > > On Jan 15, 2:51 am, Terence Lee <[email protected]> wrote: > > For UserMailer.test_mail you'll want to use UserMailer.deliver_test_mail > > > > On Thu, 2010-01-14 at 04:26 -0800, Simon Starr wrote: > > > Hi, > > > > > I have a pretty basic app that uses Clearance (http://github.com/ > > > thoughtbot/clearance) for user auth and I've added the Sendgrid Basic > > > addon to handle mailing from Heroku. When I sign up, it tries sending > > > a confirmation mail but fails with this "Connection refused" message > > > in the logs: > > > > > Processing Clearance::UsersController#create (for 12.34.56.78 at > > > 2010-01-14 04:11:58) [POST] > > > Parameters: {"user"=>{"password_confirmation"=>"[FILTERED]", > > > "password"=>"[FILTERED]", "email"=>"[email protected]"}, "commit"=>"Sign > > > up", "action"=>"create", > > > "authenticity_token"=>"MiOGJAEngXaWjAEvC2ILJ3x4alnMf6Q9bjktuacI/tg=", > > > "controller"=>"clearance/users"} > > > Sent mail to [email protected] > > > > > Errno::ECONNREFUSED (Connection refused - connect(2)): > > > /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `initialize' > > > /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `new' > > > /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open' > > > /usr/local/lib/ruby/1.8/timeout.rb:62:in `timeout' > > > /usr/local/lib/ruby/1.8/timeout.rb:93:in `timeout' > > > /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open' > > > /usr/local/lib/ruby/1.8/net/smtp.rb:392:in `do_start' > > > /usr/local/lib/ruby/1.8/net/smtp.rb:377:in `start' > > > clearance (0.8.4) [v] lib/clearance/user.rb:187:in > > > `send_confirmation_email' > > > clearance (0.8.4) [v] app/controllers/clearance/users_controller.rb: > > > 14:in `create' > > > /home/heroku_rack/lib/static_assets.rb:9:in `call' > > > /home/heroku_rack/lib/last_access.rb:25:in `call' > > > /home/heroku_rack/lib/date_header.rb:14:in `call' > > > thin (1.0.1) lib/thin/connection.rb:80:in `pre_process' > > > thin (1.0.1) lib/thin/connection.rb:78:in `catch' > > > thin (1.0.1) lib/thin/connection.rb:78:in `pre_process' > > > thin (1.0.1) lib/thin/connection.rb:57:in `process' > > > thin (1.0.1) lib/thin/connection.rb:42:in `receive_data' > > > eventmachine (0.12.6) lib/eventmachine.rb:240:in `run_machine' > > > eventmachine (0.12.6) lib/eventmachine.rb:240:in `run' > > > thin (1.0.1) lib/thin/backends/base.rb:57:in `start' > > > thin (1.0.1) lib/thin/server.rb:150:in `start' > > > thin (1.0.1) lib/thin/controllers/controller.rb:80:in `start' > > > thin (1.0.1) lib/thin/runner.rb:173:in `send' > > > thin (1.0.1) lib/thin/runner.rb:173:in `run_command' > > > thin (1.0.1) lib/thin/runner.rb:139:in `run!' > > > thin (1.0.1) bin/thin:6 > > > /usr/local/bin/thin:20:in `load' > > > /usr/local/bin/thin:20 > > > > > Rendering /disk1/home/slugs/114284_b63c4f7_b2b3/mnt/public/500.html > > > (500 Internal Server Error) > > > > > I tried creating a mailer class for testing purposes as per the SMTP > > > docs (http://docs.heroku.com/smtp) and this didn't even get that far - > > > after pushing to Heroku and restarting for good measure, I ran 'heroku > > > console' and did the following: > > > >> UserMailer.test_mail > > > NoMethodError: undefined method `test_mail' for UserMailer:Class > > > > > This has got me tearing my hair out and I'd really appreciate any > > > advice! > > > > > Thanks > > > Simon > > > > > > > > signature.asc > > < 1KViewDownload
signature.asc
Description: This is a digitally signed message part
