Multiple Rails Apps Under Passenger

My development server is on a home LAN behind a firewall, and I don’t want to make it a DNS sub-domain. I have directed my router to issue fixed IP addresses through DHCP, so I can use the IP address as part of the URL. Setting up multiple Rails applications is pretty easy, but if you want to mix the Rails environments (developement / test / production / custom), you need to use <Directory> to configure each Rails app: By using <Directory> you can change the behavior of each of your Rails applications as needed, including the ability to disable Passenger for non-Rails code (such as the blog shown in… Read More

Continue Reading

Rewind Ruby 1.9.1 (or “Put The Candle Back”)

I updated all the gems for my current Rails development project that is using Ruby 1.9.1. This also included an upgrade to Phusion Passenger 2.2.5. Then I upgraded to Ruby 1.9.1-p243, which promptly crashed Passenger when I did a session request through Authlogic 2.1.2. Ouch. So, I reinstalled Ruby 1.9.1-p129, and all is well again. Oddly enough, there is no uninstall switch in the Ruby-for-Linux tar ball Makefile. The default install location is /usr/local, so I can keep the Fedora 8 version of Ruby 1.8.6 (via the RPM package system) intact, but I wasn’t sure what would happen if I simply re-installed the older Ruby 1.9.1 version under /usr/local. As… Read More

Continue Reading

Configuring Passenger sub-URIs

Passenger sub-URIs allow you to run multiple Rails aplications under one Apache virtual host, which is great for development. Although Phusion has documented how to do this, I was having trouble. Eventually I got it to work, by doing the steps below: The Apache default DocumentRoot location is /var/www/html. I created a new directory and changed DocumentRoot to /var/www/public As root, cd /var/www/public. Add a link to each public directory of each Rails app to be accessed. On Linux, this looks like ln -s /somewhere/MyApp1/public MyApp1, where MyApp1 was created by running rails MyApp1 under the directory /somewhere Modify the Apache httpd.conf file. DocumentRoot was changed as shown in Step… Read More

Continue Reading

Goodbye Mongrel, Hello Passenger

Mongrel has been a great web server for Ruby and Rails, but with the significant changes in Ruby 1.9.1 (native threads for instance), I decided to switch to Phusion Passenger and Apache. If nothing else, this will keep me working with Apache (it is the A in LAMP, after all). The gem install passenger ran as we would expect, but passenger-install-apache2-module had a bunch of complaints. Mainly, I needed to install a number of development RPMs for Fedora Core 8 Apache. Also, passenger could not see the OpenSSL libraries. Sure enough, the mkfm.log file under ext/openssl in the Ruby 1,9.1 tree showed a number of errors that seemed to indicate… Read More

Continue Reading