Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Tony Arkles's Profile

GitHub User: tonyarkles

Comments by Tony Arkles

Avatar

It's been my experience that understanding the inner workings of frameworks is exceptionally valuable for figuring out why things aren't behaving the way you expect them to.

Avatar

I'm a little confused about these line:

ruby
  old_pid = "#{server.config[:pid]}.oldbin"
  if File.exists?(old_pid) && server.pid != old_pid 

Wouldn't that set the old_pid variable to the filename of the unicorn.pid.oldpid file, and then compare that filename with the pid of the new server? For example, it would expand to:

ruby
if File.exists?('/tmp/unicorn.pid.oldpid') && 13274 != '/tmp/unicorn.pid.oldpid'

Or am I misunderstanding something?