I keep getting an error while trying to deploy my app to a Digital Ocean Droplet using Capistrano's cap production deploy
. The error message I get says:
rake aborted!
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded.
Add `gem 'pg'` to your Gemfile
but my Gemfile does include pg
in production
:
...
group :production do
gem 'rails_12factor'
gem 'pg'
end
...
What can be causing this?
New Development:
I tried resetting the db adapter back to sqlite3
, just to see whether the deployment would go through, and got the same error:
Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile
bundle install
and committed the changes inGemfile
andGemfile.lock
? – Prakash Murthy Mar 31 at 22:57pg
gem by itself. The gem gets installed without a problem, but I still get the error message. – Dimitry_N Apr 1 at 1:07