Search code examples
ruby-on-railsdeviseopenid

Rails/Devise Errno::ENOENT on lockfile after server crash


I've got a Rails 3.2.5 app using Devise, with OpenID for authentication (Google), running on nginx/unicorn.

Today, my server crashed. I restarted. Now sign-in is not working. Here's what happens:

  • Signed-out user accesses app
  • Signed-out user redirected to /users/sign_in
  • User clicks 'Sign-in with GMail' button
  • 500 error. In the log file, I see:

    Started GET "/users/auth/google" for ...
    Errno::ENOENT (No such file or directory - /tmp/temp/tmp20120801-4155-1scxc9o.lock):
    

How can I resolve this error? I'm not even sure where to begin.


Solution

  • It was an access issue. Not sure of the root cause, but no doubt it has something to do with some mistake I made when configuring the app.

    To resolve:

    $ cd /tmp
    $ chmod 777 temp
    $ chmod 777 associations
    $ chmod 777 nonces