There seems to be a bug in passenger-2.0.6 that makes the Apache module installation fail. I was just installing Ruby Enterprise Edition 1.8.6-20081215 and Phusion Passenger (AKA mod_rack or mod_rails), and it bailed out on me saying:
root@evidence:~# /opt/ruby-enterprise-1.8.6-20081215/bin/passenger-install-apache2-module [...] Compiling and installing Apache 2 module... cd /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/passenger-2.0.6 /opt/ruby-enterprise-1.8.6-20081215/bin/ruby -S rake clean apache2 /opt/ruby-enterprise-1.8.6-20081215/bin/ruby: No such file or directory -- rake (LoadError) -------------------------------------------- It looks like something went wrong [...]
Sucks. I was already bothering the guys in #passenger on FreeNode when Google sent me here; apparently this bug is already known and a patch seems to have been committed. The problem is that it’s using the rake that belongs to the primary Ruby installation to get things done, so it only occurs when you have more than one version of Ruby installed. I have MRI Ruby 1.8.6 installed in /usr/bin. I haven’t used that yet, so I haven’t bothered to install rake for it either, which explains why the module installer can’t find /usr/bin/rake.
Most suggestions in the Google Groups thread are pretty useless, but someone suggested
ln -s /opt/ruby-enterprise-1.8.6-20081215/bin/rake /usr/bin/rake
I don’t like symlinks that much, even if they’re only temporary, so I decided to “fix” it this way:
export PATH=/opt/ruby-enterprise-1.8.6-20081215/bin:$PATH
… and then it worked great.
At least, I think so. I still have to edit my Apache configuration and reboot the server. Actually, I don’t think I have a Rails application around to test it with… but I plan to fix that, soonish
Just thought I’d post this, seeing as other people have had the same problem.
One Comment
Worked for me too, thanks!