The lib folder is not included by default in Rails 3.0. This is usually the place where you'll find miscellaneous Ruby code that does not neatly belong to other better defined placed such as model, view, controller or helper directories.

A quick fix is to include the following line

config.autoload_paths += %W( #{Rails.root}/lib ) 

in the config/application.rb file.

A better approach is to use the pattern described in this post about "Where to put the 'other' files".