New site launch for Oregon Ki Society

Oregon Ki Society screenshot

Even though I’ve started a new job, which I love by the way, my freelance work continues. Last week I launched the newly redesigned Oregon Ki Society site, and it’s now in my portfolio. This one is particularly near and dear to my heart, as I began training Aikido with the OKS 11 years ago, and still train today.

To be honest, when I first saw their site in 1996 I wanted to get my hands on it to fix it up. Little did I know they would still be using the same site in 2007, when I was finally in a position to do something about it. The new site is crisp, clean and fresh with lots of strong photography. I’m also quite proud of that since I shot most of the photos.

The content is interesting, too; there are Ki Society dojos all over the world, and so there might be one near you. If there is, it’s worth checking out. The aikido training the Ki Society offers is unparalleled.

Connecting Ruby on Rails to Oracle on an Intel Mac in Leopard (Mac OSX 10.5)

NOTE: This tutorial has been superseded by a newer version that takes advantage of the newly-released Intel Mac version of the Oracle InstantClient. The new version is much, much simpler, and causes far fewer headaches.

Updated (12/11/07): The ruby-oci8 library just went to full 1.0.0 release. I’ve updated that section to reflect the new file names.

Updated (5/5/08): The oracle adapter installation has been on-again-off-again with successive Rails releases, but there’s an easy fix for it. I’ve updated the relevant section.

At my new job, I’m using Ruby on Rails to connect to multiple databases — multiple Oracle (10g) instances, as well as MySQL and FileMaker. There’s a lot of challenges to doing this, so I’m going to post some of the less obvious solutions as they come up.

The first challenge I had was to get RoR to talk to Oracle. There isn’t a lot of information about this online, because the people who tend to use Oracle are not the people who tend to use open source software like Rails.

Upgrade Rails to version 2.0

To start out, I wanted to use the most recent release candidate of Rails: version 1.99. I figured that I might as well upgrade before writing my first application, so that the codebase is all Rails 2.0 and up. Leopard comes with both Ruby and Rails, and upgrading is actually very easy:

(Read more…)

HOWTO: Upgrade your Ruby on Rails install to version 2.0 on Leopard (Mac OSX 10.5)

This one’s real easy. Leopard ships with a default Rails installation (/usr/bin/rails), but overriding it is quite simple, since it’s just a gem.

sudo gem install rails --source http://gems.rubyonrails.org

Then, enter “y” at each prompt, to install all of the dependencies. That’s it! Check yourself with:

rails -v

Right now it will show Rails 1.99.0 which is the current release candidate. When rails goes fully 2.0, the same instructions should work to get the full release installed.

And don’t forget, you can always rake rails:freeze to lock a Rails app to a particular version of Rails by copying all of the Rails libraries into the /vendor directory.

Happy coding!

Botany Photo of the Day, again!

Really, twice. First was at the end of June: I completely forgot to note it here. I took a photo of Erythronium montanum at the top of Larch Mountain outside of Portland. It was a rainy day, which usually doesn’t make for good hiking, but we were under a thick understory for most of the hike so it worked. There were vast numbers of these very delicate avalanche lilies waiting for us near the top of the mountain, all covered with droplets. They are quite charismatic.

The second time was today, for a photo of Erigeron peregrinus ssp. callianthemus. I shot this one over this past weekend hiking up on Mt. Hood. It was a glorious day for a hike, with perfect weather and clear skies. More photos from this trip are in my Flickr stream.

As always, many thanks to Daniel Mosquin of the UBC Botanical Garden and his Botany Photo of the Day, which I really can’t recommend enough. Every day you get a beautiful photo in your feed reader, along with some understanding of the natural world that surrounds us. It really is an amazing planet.

An “else” condition for link_to_unless_current

Every time I get frustrated with an aspect of Rails, it turns out that it’s just my idiocy and not actually something to do with Rails.

Most recently, I wanted to code this algorithm:

If on the current page
  show <a href="blah1">link 1</a>
else
  show <a href="blah2>link 2</a>

(Read more…)

Botany photo of the day, take 2

Japanese maple

Once again it seems I owe my thanks to Daniel Mosquin from the UBC Botanical Garden for choosing my photo of Acer japonicum, the japanese maple, for yesterday’s photo of the day. That’s two in two months; we’ll see if I can make a third. If you read his comments I think that he’s completely right — there is something very appealing about the Japanese maples in the winter time, because of their architectural shapes. I took this photo shortly after a big rain, and the way the sunlight was catching the drops was so appealing that I couldn’t resist. I think that it makes the tree look somehow much more ancient than it really is.

Macha cukkii: green tea cookies

My upstairs neighbor gave us some macha: Japanese powdered green tea. The Japanese are the only people on the planet who still drink this stuff — it’s a very primitive form of tea, and when brewed it’s quite bitter. They eat it with sweets that are too sweet, alternating bites of too-sweet with sips of too-bitter, and it all balances out.

I like drinking macha, though; but I’d rather make delicious tasty desserts with it, like this one which I made this afternoon. The recipe is based on the “Rich roll cookies” from Joy of Cooking. (Read more…)

I’m UBC’s botany photo of the day!

Zantedeschia aethiopica (Araceae); Calla lily

Many thanks to Daniel Mosquin from the UBC Botanical Garden for choosing my photo of Zantedeschia aethiopia, also known as the calla lily, for today’s photo of the day. Woohoo!

For the record, I shot this image in western Australia, where the calla lily is highly invasive and is causing quite a bit of ecological upheaval in the tuart forests.

New page in my portfolio

Thumbnail of Claudia Tyler's site

Although this page went live a little while ago, I’ve just gotten around to writing it up. A scientist at the University of Santa Barbara contacted me about making a professional page for her. I’ve added it to my portfolio. I’m particularly happy about the image at the bottom of the page behaves: use a big screen and make your browser window wide. Very wide.

I hope that the page will help Claudia advertise her work both to other scientists as well as to potential students and field assistants.

Plant-inspired architecture

Urban cactus

I can’t resist, this is too good to be true: there is such a thing as an urban cactus. It’s a housing project in Rotterdam, based on a cactus. By placing the balconies as the architects did, every resident gets a double-height outdoor space and more sunlight than they would with a typical balcony. I think it’s brilliant.