Oil and gas boomtowns have sprung up in some unlikely places in the last few years, increasing the strain on small towns trying to deal with the increased crime, wastewater, and infrastructure needs of populations that double or even triple in a short amount of time. But the need that is the most pressing could be music to the ears of homebuilders: a serious shortage of housing, where people can afford to buy.

In these towns across the country people are living in hotels, campers, tent cities — even in their cars — for lack of housing. Wal-mart parking lots are now prime real estate for temporary housing in some of these locales.

The boomtown poster child is Williston, North Dakota. A rural community a few years ago,  the town has tripled its population to 30,000 and now has an unemployment rate of .3%, the lowest in the country. Housing? Not so much.

The Williston Chamber of Commerce offers this advice on its website:

Although jobs are plentiful, housing remains very difficult. Our recommendation is to invest a lot of your time looking for housing. It is difficult to live in a travel trailer or RV in the winter time with temperatures dropping to minus 30.

Across the border from Williston is Sidney, Montana, which faces similar shortages, and presumably, the same freezing temperatures. A recent story in The Helena Vigilante listed new apartments there at $2,000 and $2,700 a month respectively. That kind of rent payment could easily translate to mortgage payments, if there were any houses to buy.

Or take Carlsbad, New Mexico. The town's claim to fame before 2008 was Carlsbad Caverns — 119 caves deep under the desert floor. Today the town is scrambling to house the workers that helped pump out 51.5 million barrels in 2013.

"There is a high demand for rental properties, and the city has not been able to keep up," said Rick Brown, associate broker at real estate firm Dunagan Associates in Carlsbad. "One builder — KT Homes — has three different new subdivisions that are very active, and there are some new smaller subdivisions with lots for sale. We need more, particularly rental properties."

Elk City, Okla. has seen 115 oil and gas companies set up shop in the city, expanding the population to 15,000, according to City Manager Anita Archer. In the last two years the city has issued 60-100 single-family permits per year, where a typical year would see only 20 to 40. The city's incentive program for builders has resulted in 48 duplexes being built in the last year — already nearly full —  and 104 apartment units that will be available July 1.

"These are exciting times here in Elk City," Archer said. "But even with what we have being built right now, there's plenty of need, especially for moderate income housing." The city's home market study done last year concluded that it would take 250 new houses a year to keep up with the current demand.

Carrizo Springs, Texas, is looking for builders for housing that would be affordable for families, said Finance Director Adalberto Bosquez. "There has been a lot of drilling here and we had an influx of workers who came here and were staying in little RV parks that just sprang up. They have moved from there to hotels now, but we would like to bring families here, and have subdivisions for them." The town has almost doubled in size in the last few years, to 8,000 residents, Bosquez said.

Vernal City, Utah, saw phenomenal growth in 2013 — nearly four times the national average, according to an article Friday in The Salt Lake Tribune. The article quoted State Sen. Kevin Van Tassell, R-Vernal, who is also a banker, on the lack of housing in the town. "It's amazing how many people commute from the Wasatch Front," he said. "The hotels have been averaging close to 90% occupancy for several years."

Full hotels, overflowing RV parks and sky-high rents mean that these small towns represent a rare sweet spot in an otherwise lackluster building picture.