SANTA FE, N.M. — Like so many others who have settled here, Janice Gaynor and her partner, Barbara Cohn, wanted to retire somewhere where they could be themselves, whether that meant holding hands in public or making decisions about each other’s end-of-life health care.

So when RainbowVision swung open its doors in 2006 as one of the first retirement communities in the country to proudly serve gay men and lesbians, offering elegant adobes where people could live out their lives among friends, the couple could not move in fast enough.

“This was our safety valve,” Ms. Gaynor said.

These days, that promise is all but forgotten. RainbowVision has filed for Chapter 11 bankruptcy protection, racked by financial problems and an increasingly bitter dispute between residents and management. Its problems mirror those of many other gay retirement communities around the country that have either failed to open or fallen on hard times, victims of a weakened housing market, a deflated economy and, in some cases, poor business decisions.

They were once hailed as havens where the so-called Stonewall generation — the first “out” group of senior citizens — could age without being treated with hostility or forced back into the closet. But such communities in Austin, Tex.; Boston and in the Phoenix area never opened because of a lack of finances and a decline in real estate values. A development near Portland, Ore., is struggling at 25 percent of capacity, and another near Sarasota, Fla., has, like RainbowVision, filed for bankruptcy.