I use Pow and Nginx to service my Rails 4 application in development. A simple file download returns 500 errors, and the request does not reach the Rails controller. I assume this is because the request is not mentioned in the Rails log. Without mentioning the error, I'm not sure what is going wrong here.
I started by loading the Ajax file, but replaced it with a simple form that also doesn't work.
Tried this

and then moved on to this

Current avatar .html.erb
<%= form_for @user, html: { multipart: true }, method: "post", url: '/settings/avatar/update', class: "", id: "update_avatar" do |f| %>
<%= f.file_field :avatar, class: 'js-upload-photo-button js-change-avatar-btn', accept: 'image/png,image/gif,image/jpeg,image/jpg' %>
<%= f.submit "Upload" %>
<% end %>
Chrome request headers

extended request header section

nginx.log
127.0.0.1 - - [01/Feb/2014:11:28:26 +0530] "POST /settings/avatar/update HTTP/1.1" 500 643 "https://allotrop.dev/settings/avatar" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
pow access.log
[Sat Feb 01 2014 11:28:26 GMT+0530 (IST)] INFO [127.0.0.1] GET allotrop.dev /500.html
, Rails 500 rails 500
, Rails 3.2.13, 500
500 (Rails, Passenger, Nginx, Postgres)
, , , . , - .
1
.rb
post '/settings/avatar/update', to: 'settings#update_avatar'
2
nginx. BTW, Homebrew, /usr/local/Cellar/nginx/1.4.0/logs/error.log
Nginx/error.log
2014/02/01 13:05:54 [crit] 8787#0: *85813 open() "/usr/local/var/run/nginx/client_body_temp/0000000010" failed (13: Permission denied), client: 127.0.0.1, server: *.dev, request: "POST /settings/avatar/update HTTP/1.1", host: "allotrop.dev", referrer: "https://allotrop.dev/settings/avatar"