0
votes

I am trying to deploy my rails app to a digital ocean server using the capistrano gem, and I'm getting the error :

The deploy has failed with an error: #<SSHKit::Command::Failed: RAILS_ENV= bundle exec rake assets:precompile exit status: 256
RAILS_ENV= bundle exec rake assets:precompile stdout: Nothing written
RAILS_ENV= bundle exec rake assets:precompile stderr: rake aborted!
ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter

Even though the local config/database.yml and shared/config/database.yml file on the server are both configured, and have production databases set. In case I run the rake db:create command on the server, it does create the database successfully. So, can't really find the issue.

Using rails 4.0.2, ruby 2.1.0, capsitrano 3.1.0

1
Kindly post your database.yml file without the password and the username ofcourse. - Sankalp Singha
That blank RAILS_ENV isn't right - Frederick Cheung

1 Answers

1
votes

Sorry - I don't have the rep to comment. It's a bit short on detail about your deploy configuration, you probably need to share.

RAILS_ENV= bundle exec rake assets:precompile stdout: Nothing written

Would suggest to me that there is no RAILS_ENV set. I don't think there is an issue with the database .yml

Infact - this post might be relevant: Capistrano 3, Rails 4, database configuration does not specify adapter