And About Time Too!

June 1, 2006

This post carries an Moderate to Extreme Geek Warning.

My site’s new backend, rewritten in Ruby on Rails, is now up and running – yay! The only thing left is for Kagi to change the URL used when sending payment data – that will probably take a day or two, but isn’t a problem as the old stuff is running side by side, forwarding requests to the Rails stuff.

People probably won’t notice much of a difference but plenty has changed. The store (Feeder example) is much better and now handles discount codes, the items on the News page are generated from the RSS feed (this needed about 10 lines of code, a template and a partial), the forms on the Support and News pages use AJAX to show success/failure messages (so the whole page doesn’t need to reload – click the submit buttons without entering anything in the form to see that work), plus registration and lost codes emails are now formatted in HTML.

I’ve also added support for PayPal’s Payment Data Transfer, so when the customer returns to my site after the payment has been made, they will see their registration codes in addition to receiving an email. This will help with those times when emails sent from my server are marked as spam (although this doesn’t happen often now that I got reverse DNS set up).

The configuration for all this was fun. Apache proxies requests to Lighttpd to serve the Rails stuff (so, for example, you see instead of and Lighttpd has Apache serve static pages in any of those directories. It all works seamlessly.

While I could find instructions out there on how to get Apache proxy to Lighttpd to serve an entire Rails application from a specific URL (e.g. this mixing and matching wasn’t documented – so I will probably put something about this on the Rails Wiki. It was quite straightforward once I had worked it all out.

I’ve had a lot of fun learning Ruby on Rails. Some of the stuff involved has been a horrible, such as the sysadmin stuff with Apache, but it’s been great to do something different and I am really pleased with the result. 😀

OK, now I’ve written all that, watch the site go down big time and take the entire internet with it. 😉


4 Responses to “And About Time Too!”

  1. purrplechick Says:

    Sorry I didn’t get further than ‘backend’ [snigger]

  2. Steve Says:

    You’re awful.

  3. Zach Hale Says:

    Hi Steve,

    I’m trying to research the possibility of running apache w/ php on the same server as lighttpd with rails and am interested to find out what your configuration was like with mod_proxy and associating sub-directories like that.

    If you wouldn’t mind, would you send me a message on AIM at zachhale or send me an email? I have a few questions about your setup. Thanks!

  4. […] wrote about this on my personal blog at the time (boring my non-geek friends in the process). From the original post: Apache proxies […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: