cgi will run in development mode by default, fastcgi in production mode. That may be why one runs and the other doesn't.
database.yml has two sections. Maybe the production setting is wrong - typo, missing space, etc.
Try "ruby script/console" to run rails console in development mode. Exit, then run "ruby script/console production" to run it in production mode. It a database error due to database.yml, you'll likely see something here. I always try something like "Article.find :first" to test access to database, where Article is one of your business objects.
If you want to run fastcgi in development mode to compare, edit environment.rb in config directory.
RAILS_ENV = ENV['RAILS_ENV'] || 'development'
RAILS_ENV = 'development'
I believe that the dreamhost fastcgi spawner sets RAILS_ENV, so you have to do it this way.