laserlemon / figaro

Simple Rails app configuration
MIT License
3.76k stars 288 forks source link

Rake db:migrate wont run if figaro included in gem file #214

Closed kgathi2 closed 9 years ago

kgathi2 commented 9 years ago

I added figaro to my project and all worked well until i tried doing a rake db:drop db:create db:migrate

The first two were successful but rake db:migrate wont work. If a comment out figaro in the gem file, it works.

At one point when i migrated my db, it reversed all the migrations to Version=0. I think this is related as well.

kgathi2 commented 9 years ago

After racking my brains, it turns out that my suspicions were right, but not figaro's fault. It was acting like that because i had the following variable in my application.yml

VERSION: '0.0.1'

Cost me my entire staging db!!!!!

laserlemon commented 9 years ago

There's no telling what ENV variable collisions there could be so I err on the side of explicit rather than generic variable names. Glad you found the cause!