{"action":"created","issue":{"url":"https://api.github.com/repos/capistrano/capistrano/issues/1453","labels_url":"https://api.github.com/repos/capistrano/capistrano/issues/1453/labels{/name}","comments_url":"https://api.github.com/repos/capistrano/capistrano/issues/1453/comments","events_url":"https://api.github.com/repos/capistrano/capistrano/issues/1453/events","html_url":"https://github.com/capistrano/capistrano/issues/1453","id":92621302,"number":1453,"title":"Don't know how to build task 'production'","user":{"login":"stevenspiel","id":1630091,"avatar_url":"https://avatars.githubusercontent.com/u/1630091?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenspiel","html_url":"https://github.com/stevenspiel","followers_url":"https://api.github.com/users/stevenspiel/followers","following_url":"https://api.github.com/users/stevenspiel/following{/other_user}","gists_url":"https://api.github.com/users/stevenspiel/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenspiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenspiel/subscriptions","organizations_url":"https://api.github.com/users/stevenspiel/orgs","repos_url":"https://api.github.com/users/stevenspiel/repos","events_url":"https://api.github.com/users/stevenspiel/events{/privacy}","received_events_url":"https://api.github.com/users/stevenspiel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-02T12:10:30Z","updated_at":"2015-07-03T11:15:55Z","closed_at":"2015-07-03T01:05:23Z","body":"I have a pretty standard capistrano file (Rails 4.2, Ruby 2.2.2), with required gems in my bundler.\r\n\r\n```rb\r\ngroup :development do\r\n  gem 'capistrano', '~> 3.0', require: false\r\n  gem 'capistrano-rails', '~> 1.1', require: false\r\n  gem 'capistrano-bundler', '~> 1.1', require: false\r\n  gem 'capistrano-passenger', require: false\r\n  gem 'rvm1-capistrano3', require: false\r\n  gem 'capistrano-maintenance', github: 'capistrano/maintenance', require: false\r\nend\r\n```\r\n\r\nAnd my `config/deploy.rb` file looks like this:\r\n\r\n```rb\r\nlock '3.3.5'\r\n\r\nrequire 'capistrano'\r\nrequire 'capistrano/deploy'\r\n\r\nset :user, 'user123'\r\nset :stages, %w(production)\r\nset :default_stage, :production\r\n\r\nset :application, 'my_app'\r\nset :repo_url, 'git@github.com:user/my_app'\r\n\r\nset :tmp_dir, '/var/www/apps/my_app/shared/tmp'\r\nset :rvm1_auto_script_path, '/var/www/apps/my_app/shared/tmp'\r\n\r\nset :shared_path, '/var/www/apps/my_app/shared/yml'\r\nset :current_path, '/var/www/my_app'\r\n\r\nask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call\r\nset :deploy_to, '/var/www/my_app'\r\n\r\nset :pty, true\r\nset :keep_releases, 2\r\n```\r\n\r\nand my config/deploy/production.rb file:\r\n\r\n```rb\r\nset :rails_env, :production\r\nset :stage, :production\r\n\r\nrole :app, 'my_app.com'\r\nrole :web, 'my_app.com', :primary => true\r\nrole :db, 'my_app.com'\r\n```\r\n\r\nBut running `cap production deploy` keeps giving me the error:\r\n\r\n```\r\n$ cap production deploy\r\ncap aborted!\r\nDon't know how to build task 'production'\r\n/Users/stevenspiel/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/task_manager.rb:62:in `[]'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:149:in `invoke_task'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/capistrano-3.4.0/lib/capistrano/application.rb:15:in `run'\r\n/Users/username/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/capistrano-3.4.0/bin/cap:3:in `<top (required)>'\r\n/Users/username/.rbenv/versions/2.0.0-p451/bin/cap:23:in `load'\r\n/Users/username/.rbenv/versions/2.0.0-p451/bin/cap:23:in `<main>'\r\n```\r\n\r\nAm I not requiring the correct files?"},"comment":{"url":"https://api.github.com/repos/capistrano/capistrano/issues/comments/118319785","html_url":"https://github.com/capistrano/capistrano/issues/1453#issuecomment-118319785","issue_url":"https://api.github.com/repos/capistrano/capistrano/issues/1453","id":118319785,"user":{"login":"robd","id":11879,"avatar_url":"https://avatars.githubusercontent.com/u/11879?v=3","gravatar_id":"","url":"https://api.github.com/users/robd","html_url":"https://github.com/robd","followers_url":"https://api.github.com/users/robd/followers","following_url":"https://api.github.com/users/robd/following{/other_user}","gists_url":"https://api.github.com/users/robd/gists{/gist_id}","starred_url":"https://api.github.com/users/robd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robd/subscriptions","organizations_url":"https://api.github.com/users/robd/orgs","repos_url":"https://api.github.com/users/robd/repos","events_url":"https://api.github.com/users/robd/events{/privacy}","received_events_url":"https://api.github.com/users/robd/received_events","type":"User","site_admin":false},"created_at":"2015-07-03T11:15:55Z","updated_at":"2015-07-03T11:15:55Z","body":"@stevenspiel No probs - glad it was something simple! As I understand it, the `require` statements have to be in the Capfile otherwise things don't work properly - see also #1451"}}