rainforestapp / fourchette

DEPRECATED - Your new best friend for isolated testing environments on Heroku.
MIT License
194 stars 23 forks source link

Giving support to new PG Heroku addon name #54

Closed scruti closed 9 years ago

scruti commented 9 years ago

I don't know If we're the only ones with this issue, but a couple days ago our Fourchette clones on Heroku began to fail on our apps because the app is beig created, yes, but without PG data.

The issue happens during the clon creation process: captura de pantalla 2015-03-04 a las 10 45 15

Postgres not enabled on rankia. Skipping data copy.

The thing is that Postgres actually was enabled (on our two apps), and we could navigate through them and their seed data.

Then I started investigating why Fourchette thinks that Postgres is not enabled, so I locally cloned fourchette and tried with a rake console. I asked the app to show what name get's for the PG addon: captura de pantalla 2015-03-04 a las 10 50 23

And then the result was: captura de pantalla 2015-03-04 a las 10 53 08

pg_enabled? is checking for and exact match of 'Heroku Postgres', but when we ask the addon is named as "heroku-postgresql". It doesn't match, says that pg is not enabled and... no pg copy is done.

As I don't know if this is a generalized issue, I tried to maintain backwards compatibility so both names will work (and some possible variants too).

After that we checked it again agains our Heroku app and... captura de pantalla 2015-03-04 a las 12 36 39

jipiboily commented 9 years ago

Wow, well detailed PR, thanks!

It looks to me like this might be different for some people, based on...something! Maybe depending on the package. It was working for us 14 hours ago at least.

I think I changed that name a few months ago. Anyways, doesn't matter, your PR is great! :heart:

jipiboily commented 9 years ago

FYI, I just tagged and pushed a new version of Fourchette.

scruti commented 9 years ago

My pleasure! Fourchette has become a key part in our "dev--> staging --> production" process. Great tool :+1:

jipiboily commented 9 years ago

:grinning: