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

Ruby 1.9.1 (Entry 1)

I installed Ruby 1.9.1 from the Ruby site. I did the default “configure ; make ; make test ; make install” dance as root using gcc 4.1.2. This puts all the Ruby 1.9.1 files under /usr/local. The Ruby 1.8.6 version is a standard RPM for Fedora Core 8, and it’s all under /usr. I decided to switch between the two Ruby versions by constructing shell aliases to change the $PATH variable, as shown below. The syntax is the bash shell. [cwl@Fedorahost ~]$ alias old_ruby alias old_ruby=’export PATH=/usr/kerberos/bin:/usr/lib/ccache: \ /usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/games:/home/cwl/bin’ [cwl@Fedorahost ~]$ old_ruby [cwl@Fedorahost ~]$ ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux] [cwl@Fedorahost ~]$ gem env RubyGems Environment: – RUBYGEMS… Read More

Continue Reading

The Costs of Blogging

My wife got a glimpse of the blog yesterday. “So, how much to set up a blog for me?”, she asks. Good question. There a zillion ISPs out there, but I’ll go with what I know – the services offered by NearlyFreeSpeech.NET (NFSN). I have had my web site running with them since September 2004. They are a no-frills, metered-service ISP. Here’s the cost breakdown, and the steps to set up a blog: Register and fund a bandwidth account – registration is free. You can deposit as little as 25 cents to start a bandwidth account. My web site has been costing me $15 to $20 a year to run.… Read More

Continue Reading

Grand Opening

After a long hiatus, I am ready to start blogging again, this time with WordPress. I hadn’t done much with my web site for awhile, so as preliminaries, I upgraded to MySQL 5.0. WordPress installed without a hitch, but I had to get the good folks at NearlyFreeSpeech.net to change my DNS/canonical name settings to get the redirects to behave. Today, I finally settled on a WP theme, and promptly customized the CSS and HTML This will be an ongoing tweak for a bit longer, I’m sure. Now I’m too tired to write anything, but at least I’m back on the air. Cheers!

Continue Reading