Getting undefined method `name' for "actionmailer":String when installing Webistrano
===

When I try and run a RAKE on Webistrano I get the following error:

    undefined method `name' for "actionmailer":String`

I am a not proficient in Ruby and RoR but I have installed and played about with plenty of applications before and I can't find what the issue is.

The command I am running is: 

    RAILS_ENV=production rake db:migrate --trace

Which produces the below:

I would really like to know the best way to diagnose and fix this issue and issues like it in the future.

    (in /srv/www/webistrano)
    WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
    at /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
    ** Invoke db:migrate (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    rake aborted!
    undefined method `name' for "actionmailer":String
    /srv/www/webistrano/vendor/rails/railties/lib/rails/gem_dependency.rb:268:in `=='
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:217:in `==='
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:217:in `block in matching_specs'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:411:in `block in each'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:410:in `each'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:410:in `each'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:216:in `find_all'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:216:in `matching_specs'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:238:in `to_specs'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
    /srv/www/webistrano/vendor/rails/railties/lib/rails/gem_dependency.rb:73:in `add_load_paths'
    /srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `block in add_gem_load_paths'
    /srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `each'
    /srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
    /srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:132:in `process'
    /srv/www/webistrano/vendor/rails/railties/lib/initializer.rb:113:in `run'
    /srv/www/webistrano/config/environment.rb:16:in `<top (required)>'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    /srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `block in require'
    /srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    /srv/www/webistrano/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
    /srv/www/webistrano/vendor/rails/railties/lib/tasks/misc.rake:4:in `block in <top (required)>'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
    /usr/local/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
    /usr/local/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in     `standard_exception_handling'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
    /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
    /usr/local/bin/rake:23:in `load'
    /usr/local/bin/rake:23:in `<main>'
    Tasks: TOP => db:migrate => environment

When I run ruby -v I get the following:

    ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]