factories-and-workers updated as gem plugin

Factories-and-workers is now updated to not only be a plugin, but also a gem. Thanks to Jonathan Barket and Nick Hoffman for their help!

It is also now automatically loaded for test and development environments (as a plugin, or do it manually as below with the unless statement). I find this really comes in handy for using it in the rails console to populate your database.

Get It

Add it as a gem dependency to your rails environment.rb:


  config.gem 'dfl-factories-and-workers', :lib => 'factories-and-workers', :source => 'http://gems.github.com' unless RAILS_ENV=='production'

Or install it as a gem manually:

  gem sources -a http://gems.github.com
  sudo gem install dfl-factories-and-workers

Or grab the source:

  git clone git://github.com/dfl/factories-and-workers.git

installing RMagick gem with fink

NOTE; this article is written for the most current rmagick-1.15.9 There are lots of articles about how to install ImageMagick and the RMagick gem, but none of them really cut to the chase in my opinion. Here is how to do it in no time at all, using fink.

#install imagemagick (and save some time by apt-getting ghostscript binaries)
sudo apt-get install ghostscript
sudo fink install imagemagick imagemagick10-dev

#set up stuff for rmagick compilation
export LIBRARY_PATH='/sw/lib'

# the location of this directory might be different if you didn't install rubygems with fink.
cd /sw/lib/ruby/gems/1.8/gems/rmagick-1.15.9
sudo chmod a+x configure
sudo ./configure --prefix=/sw    #point to fink installation
sudo gem install rmagick
actionmailer ActionView ActiveRecord activesupport agile ajax alphadecimal audio autotest BDD blocks capistrano ssh ruby console controller css dashboard widget delegate dog puppy naming name DRM email obfuscation exceptions factories factories-and-workers factory pattern filemerge find and replace finder fink fixtures fun functional testing gem git google maps haml helper helpers imagemagick Intertrust irb javascript jquery jrails logo macro math meetup model openssl OS X patch Pioneer Electronics plugin polymorphism project management prototype.js rails rails gotcha rails,patch,validations railsconf rake rmagick RSA encryption ruby ruby on rails script scrum scrum lessons rails scrumninja shoulda subversion SyncTV TDD testing textmate tips tricks unique hashes unix shell validation view yaml zebra stripes