Foliosus Web Design LLC: Your website done right

Posts in "ruby on rails"

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

Nov 19 ’07

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.

Read the rest …

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

Nov 13 ’07

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.

Read the rest …

An "else" condition for link_to_unless_current

Apr 18 ’07

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
Read the rest …

Ruby on Rails has the same appeal as the MacOS

Aug 05 ’06

Why do people flip out over RoR? Primarily, because it's fast. It's so fast to develop new applications in RoR. But why? What separates RoR from any of the other frameworks out there? The approach that defines RoR is "convention over configuration," and that's where much of the speed comes from. I had an epiphany this morning: "convention over configuration" sounds familliar. That's why I use a Mac. Read the rest …

HOWTO: Lighttpd with SSL, Rails, PHP and MySQL on OSX 10.4 (Tiger)

Apr 04 ’06

I've run Apache on my Mac for as long as I've had OSX, using either the built-in version or the ServerLogistics package, which they don't make anymore. It always worked great, and when I started learning PHP, it was easy to install and make work. Getting SSL to work was a little bit more of a challenge, but once I found the right instructions it was a breeze.

But now I need to serve Rails as well. Getting Apache to do RoR with fcgi can be a hassle, and it's apparently slow as well, so I decided to switch to lighttpd, or lighty as it's called.

For development purposes, using the standard script/server is a no-brainer; however I want a "production" environment as well. One that can serve Rails, and legacy PHP, and do SSL for authentication, while talking to MySQL. I discovered that lighty can do all of these things, but how? Read the rest …

Lighttpd url rewrites are funny

Mar 20 ’06

Since I've been playing around with RoR I've found the

script/server

trick for development to be fantastically useful. It's quick to use, the server itself is fast, and it's everything I could want. That is, until it's time to go in to production mode. I've been running Apache, using OSX's built-in build, but I'm considering switching my whole setup over to lighty because of the funkiness of Apache and Ruby's fcgi. So I tried it. Building lighty was really easy. Getting lighty to then serve my static pages was also very easy. Then I tried getting it to serve my ruby apps, and that's where the problems hit. Read the rest …

RoR caching and routing

Mar 15 ’06

I've been trying to learn Ruby on Rails. So far I've found it to be a very elegant solution to the problem of writing web apps. Until now I've used Tango or PHP, but I hope that I never have to use them again.

I recently had a rather interesting problem, however. My first teaching project was a little app to generate a bookmarks page, and it allows me to categorize bookmarks. Relatively straightforward, right? Well, I got the code to handle logging in, the categories, subcategories and bookmarks done just fine with no hitches, but then I wanted to test out caching.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

Tournefortia gnaphalodes (Boraginaceae); Sicimay

Fresh photos