Archive for the 'rails' Category

Rails, bandwidth, and HTTP content encoding

Tuesday, November 13th, 2007

After moving from Dreamhost to HostingRails I noticed my bandwidth had gone up. On Dreamhost, I was averaging 40GB per month, and on HostingRails, I was averaging 60GB/month. This was a problem because I had bought the 50GB per month plan on HostingRails, and had to either pay extra or let the site go down […]

PHP includes in Rails

Monday, November 12th, 2007

This is how to include a PHP script inside a Rails template. Got this useful tidbit from Rails Forum. The equivalent of:
<?php include(”path/to/menu.php”); ?>
is
<%=`php path/to/menu.php`%>

Those are back quotes, otherwise known as a capital tilde.
You’ll obviously need PHP installed on your server for this to work.

Dreamhost not so dreamy?

Wednesday, August 29th, 2007

As you may know, userstyles.org has had uptime and performance problems in the past. Based on past discussions with Dreamhost, my current host, the problem seems to not be one of bandwidth, but of server resources to generate my dynamic pages.
Now, I don’t really think I’m doing anything too ridiculous when I generate pages, so […]

FeedTools library

Friday, January 26th, 2007

I was using FeedTools to generate the RSS and Atom feeds on userstyles.org. Recently, I noticed some major performance problems - while Rails reported the database portion took less than a second, the rendering sometimes took 15 seconds. There wasn’t a huge amount of records - 25 at the most. The problem isn’t so much […]

Vanilla + Rails = Single sign in goodness

Monday, January 22nd, 2007

I’ve set up a forum for userstyles.org so my users can discuss Stylish and the site and styles without being to confined to a single thread on mozillaZine. When deciding on a forum, the main thing I was looking for was the ability to integrate it with  the current site - a forum account and […]

Rails performance tips

Saturday, January 20th, 2007

So during the site’s down time, I started looking at performance. I’m not that concerned in squeezing out an extra tenth of a second out of page load time, but I do want the site to be able withstand a digging for as long as possible.
Eager loading
Rails lets you easily define associations between classes and […]

Adventures in development - Web standards and Firefox extensions