WebFaction
Community site: login faq

Hi - I have a strange error at the moment - I have a basic Sinatra app set up and working. I'm trying to get it to send emails through the pony gem. Unfortunately I'm getting a Broken Pipe error. I've traced it down to the Mail gem which is throwing this error in my nginx error log:

sendmail: cannot create temporary file: No such file or diroctory
Errno::EPIPE - Broken pipe

I've stripped out the pony gem and tried to create a mail directly with the Mail gem and I'm getting the same error.

The odd thing is, I can send an email directly using something like:

mail = IO.popopen("/usr/bin/sendmail email@email.com", "w+")
mail.puts("Subject: test message")
mail.puts("\n")
mail.puts("body of email")
mail.flush
mail.close

Anyone have any ideas? Thanks

asked 25 May '12, 03:59

slapthelownote
32
accept rate: 0%


Our Rails apps work with a TMPDIR environment variable set to point to a tmp directory within your app directory, like /home/you/webapps/your_app/tmp. Check to see that the directory exists for your app, create it if it does not, and then restart your app and test to see if the problem is solved.

Hope that helps!

permanent link

answered 25 May '12, 16:46

seanf
12.2k41836
accept rate: 37%

thanks - took a while to get back to this, but the TMPDIR seems to have done the trick

(26 Jun '12, 02:50) slapthelownote
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×261
×81
×10
×9

question asked: 25 May '12, 03:59

question was seen: 2,179 times

last updated: 26 Jun '12, 02:50

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM