Okay, so I wanted to try out Ruby-1.9.1 on my Ubuntu linux box. I googled a few good sources and viola I had ruby-1.9.1 up and running. Cool. Now what can I do with it? Well, why not try the newest version of rails with the newest version of ruby? So I updated my rubygems installation and installed all of my gems with ruby-1.9.1, including rails. Bam! Rails is up and running... no real difficulties a good google search can't fix. Now I am moving along thinking of more toys to play with and hacking away at a rails app. When it occurs to me, phusion passenger would be cool to have on my laptop. I could make an entry to my virtual hosts for example.com and point it to my rails app. Then I wouldn't have to type script/server all the time. Neat.
So, now I go about installing passenger. sudo gem install passenger, and bam! passenger is installed. I then run passenger-install-apache2-module and copy the required stuff to my conf file for apache. Cool. Now passenger is up and running and I can go to example.com and see my rails app.
Bam, a strike of ruby lighting hits and I am dumbfounded. For some reason I am getting an IOError and a message saying a stream is closed. I poke around for THE WHOLE DAY and find out that its got to do with ruby-1.9.1 and the file tempfile.rb. It doesn't play nice with passenger. So I tried to find a fix, which led me to this post http://redmine.ruby-lang.org/issues/show/1494#note-10
. I thought, really? seriously? a tempfile issue? and what do you know. I opened up the tempfile.rb in question and went to line 140 of my particular file, in the unlink method where it says:
if File.exist?(@tmpname) closed? or close File.unlink(@tmpname) end
and I removed the or close
part, and viola! It worked. How annoying.