Does the gym offer pay-as-you-go? I'm a member of a gym, but go to 6 classes a week, so it's worth it. My dh occasionally comes with me, and has to pay £5 per class or £5 to use the main gym. It's not worth him getting a membership.
You could always buy some very basic equipment (handweights, kettlebells etc) and a good dvd and do it at home. That doesn't work for me because I always find something else to do, whereas knowing that I'm booked into a kettlebell class at 7pm makes me go and do it. But different things work for different people.
As long as you are doing some exercise, it doesn't matter where you do it - a plank is a plank, whether you're doing it in a fitness studio or in your living room!