You've found the famous Dave's Garden website! Join this friendly global community that shares tips and ideas for home and gardens, along with seeds and plants!
Check out the DG homepage for a brief overview of what you'll find in this gardening mega-site.
Login
If you don't have an account yet, visit the registration page to sign up.
You know, I started my garden with making my own compost, following what to include and what not to include, and that was going well until I started to get all sorts of fruit flies and the sort hoovering around my compost and then the entrance to my house.
Finally, I read that you can spray ammonia and cover the compost debris with fresh dry dirt to get rid of the pests. I don't know if others have had this difficulty, even as to what to do it with it. Here's the link to the handy article that talks about this: http://yourhandymanzone.com/Your_Handyman_Zone_How_To_Pages_...
That's my two sense to add to the wonderful compost discussion by Ms. Galbraith, the Master Gardener of Northern Dallas!
Rotting food scraps routinely result in fruit flies. Always mixing the newly added food scraps deep into the pile, over just covering with dirt, grass clippings, etc. as you mention, should do the trick.
I'd be cautious using ammonia even around my compost pile - that's strong stuff.There are lots of beneficial critters (soldier flies, spiders, geckos) that hang out around my bin and I'd hate to kill them, especially since they're probably helping alleviate the fruit fly problem. If animals are hanging around the pile, you might want to consider getting an actual bin with a locking lid.