March 17, 2012 node - 0 comments

NodeJS seems to be all the rage these days so I thought I'd try to test-drive an app, then deploy it on my CentOS server.

In this post I'll describe how I set the server up for a very simplistic deployment with Apache and Forever.

March 13, 2012 gems - 2 comments

At Broadstripes we have a handful of gems that we use internally, but we don't want to publish them on a public site like RubyGems.org. In this post, I'll describe how I setup a simple, static gem server with basic auth and a simple capistrano recipe I added to our gems in order to publish them.

March 13, 2012 oracle - 0 comments

In this post I'll describe how you can get setup to develop an app backed by an Oracle database using Ruby on a Mac. Specifically I'll cover:

  • How to install and configure a pre-built VM with Oracle running
  • How to install the Oracle instant client on OSX Lion
  • How to compile a 32-bit version of Ruby 1.9.2 w/ RVM
  • How to connect your Ruby app to the Oracle database using ruby-oci8
November 29, 2011 - 0 comments

I recently wanted to some blog comments through Akismet's spam filter. I noticed that there were a number of plugins and gems on Github, but it seemed to me that it was overkill to add a gem dependency to my app just to make a simple http call. In this post I'll describe how to interact with the Akismet api with a simple, home-rolled Ruby client.

November 28, 2011 - 0 comments

I recently wrote a background job that looped over thousands of ActiveRecord objects, and it took about 45 minutes to run. In this post I'll describe how I cut that down to 1 minute by using hash lookups.

November 26, 2011 haml - 0 comments

I recently decided to revive this blog, but I didn't want to continue using Mephisto for my blogging platform. I wanted to be able to write my blog posts in markdown or Haml, and store all meta-data about the posts in the Haml template. In addition I wanted to have an ActiveRecord-esque interface for blog post meta-data. In this post, I'll describe how I used Haml filters and ActiveHash to create this blogging platform.

July 5, 2008 cache rails - 0 comments

Rails.cache rocks, but it can be tricky to set it up for development mode. For my purposes I need to:

  • Keep config.cache_classes to false so that I don't have to restart my server while I develop
  • Cache all kinds of objects, not just strings
  • Be able to invalidate the cache easily from cron scripts or other offline processes
  • Test caching locally before deploying
July 5, 2008 - 0 comments

I recently discovered how easy it is to view my local development websites on multiple OS's using VMWare. I use this primarily to see how awful my apps look in IE. Here's how you can do it too:

May 29, 2008 rails tutorials - 0 comments

There's a new effort underway to add tutorials to the Rails API documentation. Here's the first draft of a tutorial I just wrote describing how to create plugins.

May 20, 2008 demo - 0 comments

I love demo apps. When coutenay came out with his rails demo app I learned a lot. I've since created a few feature-specific demo apps and I hope that others can learn something from them:

May 5, 2008 tips - 0 comments

Here is a list of quick tips that I find helpful using Ruby and Rails, inspired by the Railscasts Contest

May 4, 2008 capistrano ferret railsmachine - 0 comments

I like using Ferret and acts_as_ferret to add full-text search to my models in Rails in a database-independent way. I've had a very difficult time getting this to work smoothly with my deployment process because the ferret server needs to be run in a separate process.

May 1, 2008 core rails - 0 comments

It took me a while to figure out how to try to contribute to Rails now that it's on Lighthouse / Github. Here's what I do now, and it seems to work:

April 29, 2008 migrations rails - 0 comments

If you are running Rails Edge from github, you can now get Super Sexy Migrations, like this:

April 29, 2008 acts_as_state_machine gems plugins - 0 comments

I was very pleased to learn earlier tonight that acts_as_state_machine has become infinitely hipper.

April 5, 2008 - 0 comments

A few weeks ago I was hired to build a simple event registration form. The requirements were that users needed to be able to:

  • Register multiple attendees for the same organization in one step
  • Specify a meal preference for each attendee, using radio buttons
April 5, 2008 plugins - 0 comments

In this post I will describe a plugin that extends the functionality of Rails labels.

March 25, 2008 cycle-of-doom - 0 comments

I've seen it time and time again - it all starts with a 70-page RFP from a non-profit that wants donor-relation management, content management, events management, complete real-time integration with their legacy systems, web services integration with their partners, mass-email capabilities, online donations and an online store, real-time tracking of the work they are doing in the field updated from satellites. They want a quote, and they want it now. The cheaper the better.

March 23, 2008 - 0 comments

I just ran across a problem that I'm sure very few other people will encounter, but if I can help just one googler....

March 16, 2008 - 0 comments

I recently needed to build a page that had a paginated list of items. I immediately did what I always do for pagination and grabbed the will_paginate plugin (also released as a gem). 2 lines of code later and pagination was working.

March 10, 2008 capistrano git railsmachine - 0 comments

In a previous post I wrote about how to get git installed on CentOS. Now that git is installed it's time to actually set up a remote repository with git. In this tutorial I'll explain how to:

  • create a git user on the remote server and configure the new git user correctly
  • configure the deploy user correctly
  • create a rails app locally and push it to the remote git server
  • set up capistrano for deploying the app using git
March 8, 2008 bootstrap_your_app - 0 comments

This is the first in a series called "Bootstrap Your App" where I'll detail how I've set up my local development environment to get new rails sites up and running quickly using "sake":http://errtheblog.com/posts/60-sake-bomb and generators.

March 5, 2008 git railsmachine sysadmin - 0 comments

A few days ago I read that mephisto 0.8 was released and that all of the cool kids were grabbing it from the git repository. I promptly got hip to git from John Nunemaker's post on git and github and grabbed the peepcode screencast to get started.

Tags