I have priced out gym equipment, because I live 100 miles from the nearest "city" (...which is, like 20,000 people).
At $30/mo for a gym membership, it would take me >15 years to pay for a decent, mid-range power rack, Olympic bars, and bench. And that's not including the weights themselves, which are usually $2-5/pound. A decent elliptical machine from eBay? Another 2 years, plus a year and a half for shipping.
If you're serious about weights, and not independently wealthy, it almost always makes more sense to have a gym membership.