During the California gold rush, miners ate a lot of beans, supplemented by dried pork, boiled potatoes, dried apples, bread or biscuits, and sugar or molasses. They drank water, coffee, tea and sometimes brandy. Because very few miners knew how to cook in an era in which women did almost all the cooking, not many were able to provide themselves with foodstuffs beyond the simple basics that were readily available.
In the initial months of the California gold rush, food was at a premium, with a slice of buttered bread selling for as much as $2. As prices stabilized, miners who had struck it rich in the gold fields and had money to spend were eager to eat better food at hotels and high-end restaurants in California cities such as San Francisco. Grocers in the cities began to stock more foods appealing to miners, including smoked halibut and cod, eggs, preserved meats, ham, cheese and chocolate, as well as spices. A dish that became particularly associated with miners was the Hangtown fry, which probably originated with a Chinese cook in Placerville, Calif., probably at the Cary House hotel. The Hangtown fry is a variation on egg foo yung consisting of scrambled eggs mixed with bacon and oysters.