A new study by Bankrate.com finds real estate once again tops the list of preferences for long-term investments.

Pawel Gaul, ThinkStock

Bankrate's research found 27 percent of Americans now view real estate as the best long-term option, a perch the industry had enjoyed prior to the housing bubble bursting in 2008. Only 17 percent in the study like stocks.

Greg McBride, chief financial analyst for Bankrate, said millennials in particular are gun-shy.

"They had a front row seat for this financial crisis, in some cases even all the way back to the tech bust in 2000 and 2001," McBride said, adding that this age group feels "once bitten, twice shy" by the stock market.

And despite the fact that the market has essentially tripled since its 2009 lows, according to McBride, a lot of investors just have not jumped back on the bandwagon. He said he believes that does bode well for real estate, whether Americans are viewing it as some sort of golden ticket or they just have a better mindset about long-term wealth creation, even if real estate also has been a little more sluggish than expected during the economic recovery.

McBride thinks a lot of that can be traced to stagnant household incomes that have really kept a lot of would-be homebuyers on the sidelines.

"When people start to see more money in their paycheck, I think that's when you are going to see a lot of existing homeowners start to put their place on the market and look for that move up," he said.

Cash came in second on the list, with 23 percent preferring it for the long term, while 14 percent preferred gold or other precious metals -- a fourth-place finish. Only 5 percent opted for bonds.

"Bonds get eroded over time by inflation, and the way bonds work, when interest rates go up, bond prices go down," McBride said. "So there is going to be a whole lot of price risk to bonds over the next several years if interest rates go up."