title: NoMethodError: undefined method `map' for :roles:Symbol in Capistrano 3
body: <p>I'm trying to upgrade some of my Ruby on Rails projects from Capistrano 2.x to Capistrano 3.x.</p>
  
  <p>I followed this great <a href="http://vladigleba.com/blog/2014/04/04/deploying-rails-apps-part-5-configuring-capistrano/" rel="noreferrer">tutorial</a> to setup configuration files. My configuration files looks like this:</p>
  
  <p><strong>Capfile</strong></p>
  
  <pre><code>require 'capistrano/setup'
  require 'capistrano/deploy'
  
  require 'capistrano/rails'
  
  Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
  </code></pre>
  
  <p><strong>deploy.rb</strong></p>
  
  <pre><code>lock '3.4.0'
  
  set :scm, :git
  set :deploy_user, "deploy"
  set :repo_url, "git_url"
  
  set :application, "app_name"
  set :local_app, "193/#{application}"
  set :deploy_to, "/home/#{deploy_user}/rails/#{application}"
  
  set :pty, true
  set :ssh_options, {:forward_agent =&gt; true}
  
  set :linked_files, %w{config/database.yml config/secrets.yml}
  set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
  
  
  ###
  # BBDD settings
  #
  
  set :db_passwd, "db_password"
  set :db_name, "db_name_production"
  </code></pre>
  
  <p><strong>deploy/production.rb</strong></p>
  
  <pre><code>set :stage, :production
  set :rails_env, :production
  
  set :server_ip, "xxx.xxx.xxx.xxx"
  
  server server_ip, user: 'deploy', roles: %w{web app db}
  
  role :app, server_ip
  role :web, server_ip
  role :db,  server_ip, :primary =&gt; true
  </code></pre>
  
  <p>Now, when I try to show my Capistrano tasks or when I try to deploy my project, Capistrano throws me an error.</p>
  
  <blockquote>
    <p>(Backtrace restricted to imported tasks) cap aborted! NoMethodError:
    undefined method `map' for :roles:Symbol</p>
    
    <p>(See full trace by running task with --trace)</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/zN99u.png" alt="enter image description here"></p>
  
  <p>I spent one day Googling with no results. Any idea?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>cap production deploy:setup --trace</p>
  
  <pre><code>cap aborted!
  NoMethodError: undefined method `map' for :roles:Symbol
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/task.rb:309:in `set_arg_names'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/task_manager.rb:40:in `define_task'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/task.rb:365:in `define_task'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/dsl_definition.rb:66:in `task'
  /Users/carro/Sites/193/capistrano/lib/capistrano/tasks/deploy.rake:4:in `block in &lt;top (required)&gt;'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/task_manager.rb:209:in `in_namespace'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/dsl_definition.rb:147:in `namespace'
  /Users/carro/Sites/193/capistrano/lib/capistrano/tasks/deploy.rake:1:in `&lt;top (required)&gt;'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/default_loader.rb:10:in `load'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/application.rb:767:in `load_imports'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/capistrano-3.4.0/lib/capistrano/application.rb:93:in `load_imports'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/application.rb:697:in `raw_load_rakefile'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/capistrano-3.4.0/lib/capistrano/application.rb:15:in `run'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/gems/capistrano-3.4.0/bin/cap:3:in `&lt;top (required)&gt;'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/bin/cap:23:in `load'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/bin/cap:23:in `&lt;main&gt;'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `eval'
  /Users/carro/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
  </code></pre>