spree-contrib / spree_mail_settings

Mail setting functionality extracted from Spree.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
28 stars 152 forks source link

Postgresql - Database does not exist error caused by forking this gem #55

Open weefunker opened 4 years ago

weefunker commented 4 years ago

This gem is currently not working due to not having the correct spree version in the gemspec. I forked the gem and edited the line to allow for version 4.1 of spree. This got the gem working but with some unforeseen consequences.

Every time I tried to create the database it would throw some variation of this error "development Database does not exist "

The error was happening regardless of anything I tried every version of bundle rake db:create after searching for hours on stack overflow for similar issues.

bundle exec rake db:create

I tried downloading the project fresh from git and even tried remaking my project from scratch. However, as soon as this gem was removed from the gemfile the error left with it. No idea what this gem could be doing that would interfere with postgres creating a database but there it is.

ronzalo commented 4 years ago

@weefunker there is some initializer that queries for some table without checking if there is connection to the database first. Try to uncomment the gem of your Gemfile, create the database and then uncomment