laserlemon / figaro

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

application.yml file always disappears #213

Closed theDazzler closed 9 years ago

theDazzler commented 9 years ago

My application.yml file always gets removed from my project. It seems like it occurs when I create a new git branch, add some code and then merge to master. Shouldn't the application.yml file always be inside my project's directory and just not get pushed to my git repo? Is the file hiding somewhere else in my project instead of inside the config folder? Usually after the file gets removed, my rails app stops working because it can't find the ENV variables anymore from figaro. But right now, the application.yml file is missing and my app still seems to work. But I need to add more variables to the application.yml file and I can't find it. Is this supposed to happen?

laserlemon commented 9 years ago

This is definitely not supposed to happen. Is your application.yml file included in your .gitignore? Did you use the figaro install command initially? I believe you can somehow get into a weird Git state where a file is committed and then Git-ignored. That could have something to do with it as well. Is this an open source project? If so, where does it live?

theDazzler commented 9 years ago

@laserlemon I have this in my .gitignore file

/config/application.yml

I used figaro install initially. The project is on Github, but it's a private repo. It is such an annoying problem as well. I basically have to run figaro install every time I work on something new, and then I have to re-add all the stuff to the application.yml file.

laserlemon commented 9 years ago

What do you get if you run this:

git ls-files | grep application.yml
theDazzler commented 9 years ago

@laserlemon i get nothing

laserlemon commented 9 years ago

The only other thing I can think of is that git clean or git reset is being used in such a way as to delete Git-ignored files. Outside of that possibility, I'm at a loss. I'm going to close this but feel free to add more diagnostic information here and I'll try to help if I can. It would obviously help if we could identify what's happening in your workflow when the file disappears.

It may help if you were to make sure that application.yml is not checked in to version control in any of your branches. If it is, switching between two branches where it is/isn't checked in could cause this behavior. To be clear, application.yml should never be committed to any branch.

I hope that helps!

nikhilbhavsar07 commented 8 years ago

same thing is happening with me , the application.yml file disappears every time i shift between branches.

mfolson55 commented 7 years ago

in atom, go to preferences --> packages --> tree view --> settings and make sure that you uncheck "Hide VCS Ignored Files". Just ran into the same problem today

modusss commented 7 years ago

This file disappeared from my project only one time (a few hours ago).

sarahcrank88 commented 5 years ago

I'm also having this problem. Has anyone been able to fix it?