Ruby session error and leaving for Utah

|

Tomorrow I'm heading off to Salt Lake City for West Mountain Ruby Conf. I always like traveling, especially on someone else's tab. We get back Sunday afternoon, and that evening I'm meeting a friend of mine in a situation which _I_ certainly consider a date. Which means I'll find a way to make a complete fool of myself.

I ran into a bizarre error today and thought I'd see if anyone else had run into it. I moved an app to a testing environment and after I got the stack configured, the app was failing with every call.

I verified that the mongrel conf file was correct, that the web server was running properly, etc, etc, and nothing was showing up in either error log. I finally looked in the application error log and after sifting through the stack trace found that the problem was occuring in /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.4/lib/action_controller/cgi_ext/pstore_performance_fix.rb.

It turned out that it was looking for the session files in app_root/tmp/sessions//ruby_sess.asdfasdfasdf. Since there was a '//' in the path it was dying, but I can't figure out where that came from. By opening up the pstore_performance_fix.rb file mentioned above and taking a "...+ '/' + ..." out of line 15 the problem went away.

When I saw that, I thought that I must have added an extra slash in the mongrel_cluster conf, but I verified that there isn't one.

Weird, especially considering the app worked perfectly in the dev environment. Anyway, by changing that line I have the stack up and running. I also made a debian package for updating the code which will make updating easier.

I may spend part of tomorrow looking at evented mongrel and swiftiply. The site with the article is the blog of Ezra Zygmuntowicz, who is the founder of Engine Yard and a Rails deployment bad-ass. I've read a lot of his stuff dealing with Nginx, and it's always a good read.

About this Entry

This page contains a single entry by Philip Ratzsch published on March 26, 2008 9:10 PM.

XSD, breakroom phosphate was the previous entry in this blog.

Mountain West Ruby Conf is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.