Blogfolio
Sep 12 ’08
Filed in operating systems, ruby on rails
A while ago, when I upgraded to Rails 2.0, I started getting the annoying "upgrade to the real mysql library" message every time I did anything with rails from the command line. Running rake tasks, running tests, opening a console session, I'd always get the error. When I would try to install the gem (sudo gem install mysql) I'd get the following error: Read the rest …
May 05 ’08
Filed in ruby on rails
Since I posted the first version of this article, there have been a couple of changes. The biggest one is that Intel has released Intel Mac versions of the InstantClient. Woohoo! That makes the previous version rather too complicated, so I've updated it here. This tutorial assumes that you're using Rails 2.0 or greater. If you're starting from the setup we had before, and you want to fix it, start with the cleanup instructions at the bottom, and then come back here. Read the rest …
May 05 ’08
Filed in ruby on rails
I know that some people really don't like monkeypatching, and I see why. But sometimes it's just unavoidable. Recently at work we came across a situation where the standard rake db:schema:dump task just wasn't working. So I started by writing the new version of the rake task that I wanted:
namespace :db do
namespace :schema do
desc "Create a db/schema.rb file"
task :dump => :environment do
require 'active_record/schema_dumper'
puts "Creating schema:"
File.open(ENV['SCHEMA'] || "db/schema.rb", "w") do |file|
ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file)
end
end
end
end
This task as shown does exactly what the default rake task does, except for the puts line. Let's just pretend that it's a radically different and wonderful version that solves world hunger and raises your children. Now, if you drop this into a rakefile in your app's lib/tasks directory, and then you run rake db:schema:dump --trace you'll notice that the schema.rb file gets created twice. What the??? Read the rest …
Mar 25 ’08
Filed in design, web technology
Before I launch in to this, let me just say that, really, there's no universally right way to choose the ideal web designer. There is no idea web designer. There's just the best way for you, and the best web designer for you. I hope that the thoughts I lay out below help you to clear up your right way is.
What you know
Some clients approach me saying that they want a website. Some say that they want a website that looks nice. Some say they want a website that performs functions x, y and z. Some say they want a website set in 12pt Verdana with a background that's exactly this shade of green, on a 960 pixel grid. And written in PHP with a custom CMS, please.
There's nothing wrong with any of these, although the last client always tends to give me pause, for reasons I'll discuss at the end of the article. I like to think of hiring a web professional the way I would hire a contractor to work on my house. Because, really, that's what you're doing: you're hiring a contractor to work on your digital house. Not all contractors are the same. They produce work of differing quality, in different styles and at different prices.
The problem for most home owners/clients is that the sheer number of choices is overwhelming; they don't even know where to start. If you want a contractor for your house, there's a very clear geographic constraint on the choice — the contractor must be in the same place as you, so they can come to your house to do the work. But with the web, that's not true; we're all just one e-mail away from each other. (6 degrees of separation? Hah!)
Read the rest …
Mar 11 ’08
Filed in food
I wish that I had a photo of these to show; they were just too delicious, though, and didn't last long enough. The addition of a little bit of almond meal to the crust gives them a complexity of flavor that plays very nicely with the clean tartness of the lemon curd.
Lemon curd is tricky
Lemon curd is a very difficult beast. It's too easy for it to be off-balance: the butter, sugar or tartness from the lemons can easily dominate, and then it's just good, not sublime like it can be. There are no hard and fast secrets for getting the balance right, either, as it depends entirely on the particular lemons you're using. As their sugar levels vary, the amount of juice and sugar you'll need to use to balance out the curd will change. This means that you should taste the curd while it's cooking, so that you can balance it out at the last minute if it needs it.
The second tricky part to a good lemon curd is making it so that it sets properly, and doesn't have those nasty little bits of egg white that cook too soon and gum it up. I came across a discussion of lemon curds online somewhere, and one of the participants had a suggestion which worked perfectly: that's the basis of the recipe below. The secret is two-fold. Read the rest …
Mar 03 ’08
Filed in browsers
Woohoo! Today, Microsoft made the right decision about IE8. The default rendering mode will be fully standards compliant. They're not going to punish the people who know what they're doing.
Read the rest …
Feb 06 ’08
Filed in ruby on rails
Here's a neat trick I just learned from Obie Fernandez (The Rails Way, p. 30): you can see what your Rails app's HTML output is from the console. To make this work you have to fool the app into thinking that there's a request coming in by setting some environmental variables, and then call the dispatcher.
But wouldn't it be nice to have a single method call, that uses url_for syntax?
Read the rest …
Jan 31 ’08
Filed in ruby on rails
One of the more annoying things about using Subversion for source code control when using rails is that every time you start a new project, you have to go through this dance to get the new project's Subversion setup done. Really, this means that you're repeating yourself every time you start a new project, so in the interest of DRYness, it seems like you would want to script this. Even better, you could just setup one canonical project that you checkout instead of running rails my_new_project.
I've found several pages on the internets that discuss how to do a good subversion setup, and they each had their strong points. I've combined their approaches into a method for making a canonical blank app.
Read the rest …
Jan 22 ’08
Filed in browsers
Yesterday two articles appeared at A List Apart discussing a Microsoft-backed proposal to change how the web works (round-up here). The proposal, on its face, is quite simple. Developers would put a meta tag in their documents (X-UA-Compatible) stating what version of a browser the pages were coded against. The browsers would read the tag, and render the page with legacy behavior, including all of the quirks, of that browser. The goal is to "not break the web" with browser upgrades.
It sounds like a great idea, right? I mean, why should I have to worry that Microsoft released IE7? If I used this tag, and specified IE6, then my page would always render correctly in IE, even if IE was on version 28.
WRONG!!!
Read the rest …
Jan 13 ’08
Filed in food
Who doesn't love chocolate?
That's what I thought. Nobody raised their hands.
I love to make desserts that finish a meal in style, and this chocolate mousse certainly fits the bill. The best part is that it's very easy to make.Read the rest …
About the author
Brent Miller is the owner and principal web designer of Foliosus Web Design LLC in Portland, Oregon. He enjoys food, plants, and the color green. If you are interested in hiring him for web work, please contact him.
Categories
Plant of the day
Tournefortia gnaphalodes (Boraginaceae); Sicimay
Fresh photos