Archive of posts from 2010

Rails 3 Table with Fields Using Calculated Data

I have a table in my app, called entries. Entries belongs_to :users and has a field (decimal) called hours. There is another decimal field called cost. Cost is not entered by the user, but is calculated by multiplying the value in hours with the value in users named rate. To get this to work properly, I had to do the following.

Downloading Spreadsheet from Rails

I have a rails app that needs to provide a spreadsheet of all the data in one of the tables. Specifically, we have a simple signup form for an event. I need to be able to let a subset of users download a spreadsheet of the current people signed up with the information given on the signup form. Here’s what I did.

Rails3, ldap and authlogic

I have an openldap server running and wanted to use it for authentication on a rails 3 application.

Mac OS X Server and WordPress

I have to say that I’m not at all happy with Mac OS X as a web server. My immediate complaint is that it’s not serving up WordPress themes correctly. I know I have them working properly, but when I go to other computers, I see that they’re not correct. I guess it’s time for me to move back to linux where I know things work properly.

Rails3 and Gemfile

I’ve had some problems with the new bundle install in rails 3. Specifically, on my laptop, in the development environment, I use sqlite. But in production, I use mysql. I was getting all sorts of errors on my laptop about the mysql gem not working and on the production server the errors were about a problem with the sqlite gem. Ideally, I wanted the development server to ignore mysql and the production server to ignore sqlite. Here’s how it was done.

Fullfilling a Promise (from Google Cache)

Originally posted on July 27, 2008

My House Style (from Google Cache)

Originally posted August 3, 2008

Best.Corn.Ever (from Google Cache)

Originally posted August 20, 2008

Rails and params hash (from Google Cache)

Originally posted January 7, 2010

Perhaps This is Stupid (from Google Cache)

Originally posted August 21, 2008

iPhone Update (from Google Cache)

Originally posted June 28, 2009

The Little House All Alone (from Google Cache)

Originally posted June 6, 2009

Happy New Year and New Year Spamassassin Issues (from Google Cache)

Originally posted January 1, 2010

Blown Power Supply (from Google Cache)

Originally posted October 14, 2009

RubyGems Notes (from Google Cache)

Originally posted October 15, 2009

Working with httpd.conf (from Google Cache)

Originally posted October 16, 2009

Comcast, SurfBoard SB6120 and Airport Extreme (from Google Cache)

Originally posted Nov. 28, 2009.

My First Solar Image (from Google Cache)

Originally posted March 3, 2010.

Business is Open!

I got my first consulting work check today. It wasn’t much, but it was something. I’ll have to build on this to get the business going.

A New Coldandheartless

It might be a bit obvious now, but my coldandheartless server died a painful death last week. I finally got around to seeing if I could fix anything and found that the system drive had completely failed. I tried rescuing files from the drive and it didn’t work. The good news is that I had the webpages on a separate disk which was still fine. So I could copy all of those files to my new server. Unfortunately, my wordpress database was not backed up (my bad) and I was unable to restore any of the files. The good news is that I did find one old backup (from sometime in 2008) that I could use to get back some of my posts. So there is now about a two-year gap in the blog. Oh well. Lesson learned. Now, I have to devise a new backup scheme. I haven’t yet decided how to do it, but I’m sure I’ll come up with something.