capistrano/capistrano — pull request #727 by DouglasSherk (2013-10-22 18:28:22+00:00)
Title: Fix NilClass error when flattening required roles.

When I remotely ```bundle install```, I get the following error:

```
cap aborted!
undefined method `to_sym' for nil:NilClass
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/configuration/servers/role_filter.rb:32:in `each'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/configuration/servers/role_filter.rb:32:in `flat_map'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/configuration/servers/role_filter.rb:32:in `required'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/configuration/servers/role_filter.rb:15:in `roles'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/configuration/servers/role_filter.rb:11:in `for'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/configuration/servers.rb:45:in `fetch_roles'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/configuration/servers.rb:18:in `roles_for'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/configuration.rb:45:in `roles_for'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/dsl/env.rb:43:in `roles'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-bundler-1.0.0/lib/capistrano/tasks/bundler.cap:18:in `block (2 levels) in '
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/dsl.rb:14:in `invoke'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/tasks/framework.rake:64:in `block (2 levels) in '
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/tasks/framework.rake:63:in `each'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/tasks/framework.rake:63:in `block in '
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/application.rb:12:in `run'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/bin/cap:3:in `'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `load'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `

'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/Users/dsherk/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `

'
Tasks: TOP => deploy:updated => bundler:install
(See full trace by running task with --trace)
```

This pull request fixes this issue. I'm not sure if this is the optimal method or not.