database configuration does not specify adapter
From an answer I wrote for StackOverflow:
Another possible cause:
In Rails 3.2.x,
establish_connection
has a default argument set from the environment:From connection_specification.rb:
def self.establish_connection(spec = ENV["DATABASE_URL"]) resolver = ConnectionSpecification::Resolver.new spec, configurations spec = resolver.spec
The way
ConnectionSpecification::Resolver
works depends onENV['DATABASE_URL']
giving anil
if not set. (Normally, it would be something likepostgres://...
).So, if you happen to have misconfigured
DATABASE_URL
such thatENV['DATABASE_URL'] == ''
, that will give youdatabase configuration does not specify adapter
.