Capistrano 3, Rails 4, database configuration does not specify adapter

Posted by Kazmin on Stack Overflow See other posts from Stack Overflow or by Kazmin
Published on 2013-10-25T21:50:59Z Indexed on 2013/10/25 21:53 UTC
Read the original article Hit count: 279

Filed under:
|

When I start

cap production deploy

it fails like this:

DEBUG [4ee8fa7a] Command: cd /home/deploy/myapp/releases/releases/20131025212110 && (RVM_BIN_PATH=~/.rvm/bin RAILS_ENV= ~/.rvm/bin/myapp_rake assets:precompile )
DEBUG [4ee8fa7a]        rake aborted!
DEBUG [4ee8fa7a]        database configuration does not specify adapter

You can see that "RAILS_ENV=" is actually empty and I'm wondering why that might be happening? I assume that this is the reason for the latter error that I don't have a database configuration.

The deploy.rb file is below:

set :application, 'myapp'
set :repo_url, '[email protected]:developer/myapp.git'
set :branch, :master
set :deploy_to, '/home/deploy/myapp/releases'
set :scm, :git
set :devpath, "/home/deploy/myapp_development"
set :user, "deploy"
set :use_sudo, false
set :default_env, { rvm_bin_path: '~/.rvm/bin' }

set :keep_releases, 5

namespace :deploy do
  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      # Your restart mechanism here, for example:
      within release_path do
        execute " bundle exec thin restart -O -C config/thin/production.yml"
      end
    end
  end

  after :restart, :clear_cache do
    on roles(:web), in: :groups, limit: 3, wait: 10 do
      within release_path do

      end
    end
  end

  after :finishing, 'deploy:cleanup'
end?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about capistrano