Mark Richman provides expert advice, strategy, and software solutions to businesses worldwide. His clients range from the Fortune 500 to small businesses to startups seeking dramatic results. Mark creates and improves business-critical web applications, increasing productivity and maximizing profits.

Archive for the ‘ruby’ Category

Rails Integration Test with shoulda, factory_girl, webrat, and authlogic

I had some issues trying to use a symbol
session[:user_credentials_id]
vs. a string
session["user_credentials_id"]
Here is my solution:

require ‘test_helper’

class LoginTest < ActionController::IntegrationTest
context ‘A user’ do
setup do
@user = Factory(:user)
# puts @user.inspect
end

should ‘be able [...]

Tools of the Trade

Many of my colleagues in the Ruby on Rails community have been posting a “tools of the trade” blog post, covering their hardware and software preferences. Now that I am nearly Microsoft-free, I figured I’d update my list.
Hardware

Apple Mac Pro 8-core Xeon, 10GB RAM, 320GB + 500GB 7200rpm SATA drives. This is my main box [...]

How to install pg (postgresql) gem on Snow Leopard, 64 bit

This one was a toughy. I installed PostgreSQL 8.4 from source in /usr/local/pgsql. Install the gem as follows:
sudo -s
export PATH=/usr/local/pgsql/bin:${PATH}
env ARCHFLAGS=”-arch x86_64″ gem install pg