This is a highly-subjective and can be a sensitive topic. However, I'd like to take a stab at it because I myself have some experience with "discrimination" in other areas and I've successfully been able to avoid it for most of my life.
The problem can reduced to 3 subproblems:
The reason I reduced it to these core issues is because when many people look at this problem, they choose one of the subproblems to address and not the others.
If #1 is not met, it is not possible to accomplish the goal of gender diversity. If #2 or #3 are not met, women simply won't want to work in tech and the word will spread.
However, if women are interested in the actual profession in a genuine fashion (not because it pays well, but because they actually like coding, for example), they are treated like normal workers, their opinions are valued, they are given the same career opportunities, etc... Then there is no logical reason as to why women could not make up more of the workforce.
Before we even discuss possible solutions, allow me to first state that the first step is identifying the relative weight of each of these subproblems. For example, is #1 a current challenge at all? Maybe there are in fact plenty of women who are interested in coding to the point where if subproblems numbers 2 and 3 were addressed, there would suddenly be a 50/50 balance in the workplace.
Subproblem 1 is relatively easy to address, and frankly with groups like "Women Who Code" and "PyLadies", as well as some recruitment efforts, we are doing a decent job with this one. We also have to consider whether this is even a realistic expectation. For example.... There exists plenty of other professions, such as "hair stylist" and cheerleading, where the opposite is true and this must be for some reason. I've personally never been interested in cheerleading and I do not know any men who would be. Does that mean that men who are interested in cheerleading are weird, dumb, or anything else? No. It just means, point-of-fact, we're just not interested in it and I am not a sociologist or psychologist so I couldn't explain why. It is possible that part of this applies to women and their relationship with tech or programming. I don't think programming is as "gender-typed" as dancing, cheerleading, or hair stylist for example, but these are all speculations... What I'm getting at is, we simply may never get the majority of women ever interested in tech simply because aren't interested in it.... Much like we probably wouldn't get the majority of women interested in digging ditches on a construction site.
Subproblems 2 and 3 will need to be addressed on an employer-by-employer basis. You have no idea if my work environment is hostile toward women and I have no idea if yours is... #3 is hardest because it is very difficult if not impossible to actually prove.
I think the solution is to address the problem just like any other interpersonal work problem: If you are at work and you routinely see colleagues or even managers being abusive to an individual (to include verbal, physical, but also softer abuse like not given opportunities), be it based upon race, gender, sexual orientation, or whatever... Follow the proper channels, speak up, don't stand for it, and leave if you have to. The most pain the bad people face for their actions, the less likely they are to continue those actions. For example, I'm completely impartial to women at work and what I mean by this is that if you do an outstanding job, whether or not you are a female or a male means nothing to me... I will enjoy working with you, I will praise your work, I will recommend you, etc...
Now, if I saw a manager who CLEARLY de-valued the best person on the team's opinion simply because she was a woman and instead went with some moron because he's a guy, that would become obvious and that makes the manager a fool. Why? Because ultimately the manager's job is to look out for the company's best interests and by devaluing the opinion of a better-quality or smarter employee, this is actually hurting the company. Not just that, it does in fact hurt the woman's career too and I'm never for that. Personally, I find it awesome when a woman is very smart and contributing. An example of this in my space is twitter.com/hasherezade . She shares a similar belief of not wanting to be acknowledged for her gender, but rather her WORK ONLY. This is why for a long time, she remained anonymous online and sometimes wishes she still did, because since she's revealed her gender she has apparently been offered extra opportunities which she does not want.
By the same token, guess what? If I am working with a woman who has no business touching a computer, well, then she's the same as a man who has no business touching a computer in my brain and belongs FIRED.
This to me is gender equality. Gender equality is the non-acknowledge of gender whatsoever in any decision-making process at work. Again, gender equality in the workplace to me is the complete non-acknowledgement of gender whatsoever in any decision-making process at work. This goes both ways though...
Unfortunately women who are probably frustrated with the behavior of certain disrespectful men at work, often take to social media and blast men, and get vocal about women in tech. The problem with this is that for men like me who had actually never made a workplace distinction of women, this type of behavior starts to actually push my mind subconsciously towards discrimination at work because the women themselves are in fact discriminating their own gender by constantly bringing it up.
For example, I'm half black... There aren't a lot of half-black people in tech... But I don't go on Twitter and talk about being half-black every day... My approach, which has worked for my entire life now in every setting, has been "I'm going to ignore my race, ignore the race of others around me, and if there is any concern whatsoever, I can prove that I am worthy by simply going the extra mile at work and setting an example." In my experience, simply setting an example speaks volumes more than complaining about a problem... The saying "actions speak louder than words" has been true in my experience.
Now, I've had people bring my race up before, I've been treated badly due to it before, and I've even had someone say "the n word" before around me. But, I chose instead of flipping out to behave and it's always paid off.
You will notice that I took this explanation to a microscopic. personal level rather than provide a general high-level solution. That is because with social problems, high-level solutions aren't solutions. A solution takes each and every person at each and every work place to actively change behavior... This is because the problems we are discussing are coming from individual people and we can't simply hit a button and poof the problem is solved for everyone... It takes work from individuals everywhere.