This is not a complete answer, but is the first step in troubleshooting.
First, go to the server and run the exact same command that Capistrano is running to make sure you can reproduce the exact same error. This puts Capistrano out of the picture and now the bug becomes just something about Rails and your configuration of it.
Here is the line that is raising the error:
The error message tells us that configurations
is false, but the code is expecting it to be some object that responds to fetch
(probably a hash). The problem is that the @configurations
instance variable inside this ActiveRecord::Base::ConnectionSpecification::Resolver
got set to false
erroneously. Do you know why that might be happening? I would check all the configuration files that have anything to do with the database connection and make sure they look OK.
If that does not help, the next step is to find out why that variable is getting set to false
. Well, if we look two lines lower in the stack trace, we can see how this Resolver object got created and used:
That method is just calling ActiveRecord::Base.configurations
and passing it to the Resolver object. So now the question becomes how did ActiveRecord::Base.configurations
get set to false?
Edit 1:
Here is the documentation and code for ActiveRecord::Base.configurations
:
https://github.com/rails/rails/blob/v3.2.13/activerecord/lib/active_record/base.rb#L341-369
It sounds like ActiveRecord::Base.configurations
is supposed to come from your database.yml file. You should go to your server and look carefully at your database.yml file and see if it might somehow be read as false. You should post that file here.