I went from a fairly women-friendly IT department, to one which was the oldest of old school boy's club type IT department. I was brought on as a senior software developer. I didn't realise what a boy's club it was until the Head of IT came over to our bank of desks to laughingly chat with the other boys in my team about the round of golf they'd had that weekend. Never once did anyone ask if I wanted to join them. At that moment, it became clear that despite being senior in my team (my skill set is a hard one to find) the head of IT didn't know my name and wasn't really interested in finding it out.
The breaking point happened when I was sitting with one of the few women in the department (an office admin) and she got a buzz from the head of IT, for her to go get him a coffee. I couldn't BELIEVE it. Who does that in this day and age?
I asked one of my team mates who I got along with about this - was I being overly sensitive? He told me it was nothing, it was just the way the department was. That didn't sit right with me, so I started looking for work elsewhere.
I got a new job, with a higher salary. I worked on my technical skills. Then another job with a higher salary, learned some more, then ANOTHER job with a higher salary. I'm now the technical lead for a team which is both gender balanced and gender-blind, and the technical hierarchy above me is women leading for the next three levels up.
If I'd stayed there, I don't know what would have happened after the birth of my daughter. I suppose my advice would be, stay vigilant. If it looks like the environment is bad, look for a way out. Work on your own skills, if you have the time (not everyone does). Make yourself invaluable, and then try to find an employer you want to be invaluable to.