wrong argument type Mysql (expected Struct) running rake with Ruby 1.9 / Rails 2.3.3

I'm use Ruby 1.9 via rvm and Rails 2.3.3. I'm on OS X 10.5 and I have
the mysql 2.8.1 gem installed. When I run rake on my rails app, I get
the error "wrong argument type Mysql (expected Struct)". I can run
the app fine with script/server and script/console fine. Is anyone
else having this problem or know what might cause this problem?
Here's the stack trace:

~/Development/Projects/paulbarry(master)[ruby:1.9.1:p243] $ rake --
trace
(in /Users/pbarry/Development/Projects/paulbarry)
** Invoke default (first_time)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
rake aborted!
wrong argument type Mysql (expected Struct)
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/mysql_adapter.rb:576:in
`real_connect'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/mysql_adapter.rb:576:in `connect'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/mysql_adapter.rb:204:in `initialize'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/mysql_adapter.rb:76:in `new'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/mysql_adapter.rb:76:in
`mysql_connection'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:223:in
`send'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:223:in
`new_connection'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:245:in
`checkout_new_connection'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:188:in
`checkout'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:184:in
`loop'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:184:in
`checkout'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/monitor.rb:242:in `synchronize'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:183:in
`checkout'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:98:in
`connection'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_pool.rb:326:in
`retrieve_connection'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_specification.rb:
123:in `retrieve_connection'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/connection_adapters/abstract/connection_specification.rb:
115:in `connection'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/activerecord-2.3.3/lib/
active_record/migration.rb:435:in `initialize'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rails-2.3.3/lib/tasks/
databases.rake:197:in `new'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rails-2.3.3/lib/tasks/
databases.rake:197
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in
`call'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in
`execute'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in
`each'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in
`execute'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/monitor.rb:242:in `synchronize'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:604:in
`each'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/monitor.rb:242:in `synchronize'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:604:in
`each'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/monitor.rb:242:in `synchronize'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:607:in
`invoke_prerequisites'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:604:in
`each'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:604:in
`invoke_prerequisites'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:596:in
`invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/monitor.rb:242:in `synchronize'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in
`invoke'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in
`each'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in
`top_level'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in
`run'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in
`run'
/Users/pbarry/.rvm/gems/ruby/1.9.1/gems/rake-0.8.7/bin/rake:31
/Users/pbarry/.rvm/ruby-1.9.1-p243/bin/rake:21:in `load'
/Users/pbarry/.rvm/ruby-1.9.1-p243/bin/rake:21