I am currently using multistage extension in Capistrano to deploy my code. The two stages I have are "production" and "staging".
Now I would like to be able to specify one of my branches in Git to be used for deployment in staging. Currently, both prod and staging are deployed off of master - but I would like to implement Gitflow and use my develop branch for my staging environment.
I've looked around and found this to be the answer in my staging.rb file:
set :rails_env, "staging"
set :deploy_to, "/path/to/project"
set :branch, "develop"
But once I include this and try to run cap staging deploy
, I get this error:
* executing "cd -- /path/to/project/releases/201309131 && bundle exec rake RAILS_ENV=staging RAILS_GROUPS=assets assets:precompile && cp -- /path/to/project/shared/assets/manifest.yml /path/to/project/releases/201309131/assets_manifest.yml"
servers: \["10.1.171.106"\]
\[10.1.171.106\] executing command
** \[out :: 10.1.171.106\] rake aborted!
** \[out :: 10.1.171.106\] database configuration does not specify adapter
I see this question: Thin / Capistrano cannot connect to database
But when I look at my tasks they look just like this:
task :start do ; end
task :stop do ; end
I wasn't the one who set these environments up nor am I very familiar with Capistrano, so I'm not so sure whats happening here.
Any ideas about what is going on?
EDIT: Including my database.yml
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: project_development
pool: 5
username: user
password:
socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: project_test
pool: 5
username: user
password:
socket: /tmp/mysql.sock
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: project_production
pool: 5
username: user
password:
socket: /tmp/mysql.sock