The most direct road to the modern American Dream doesn't pass through rural America.

Median U.S. wages have been flat for decades, and blue collar workers are increasingly frustrated with the dwindling job opportunities -- a fact that was highlighted with the election of Donald Trump.

Opportunities exist -- there are more than half a million open computing jobs nationwide, according to Code.org. But students growing up in the countryside aren't prepared for them. Rural students are far less likely than their peers in cities and suburbs to gain exposure to rigorous computer science training. These skills have emerged as a fast track to high-paying jobs.

There just aren't enough qualified teachers in rural areas to train students to take advantage of the vacancies, according to experts. Teachers in these areas have the disadvantage of wearing more hats and teaching a wider range of courses than their counterparts in denser areas. This makes it hard to focus on a subject and stay abreast of the latest developments.

Funding is also a challenge. If budget cuts happen, computer science, which generally isn't part of a core curriculum, may land on the chopping block.

Kathy Surd, president of the Michigan Mathematics and Science Centers Networks, said computer science hasn't always survived cost reductions in her state. But in the last two years, Surd said there's been a push to expand computer science education, which she said levels the playing field for students who want access to good jobs.

Related: Trump's populism is only the beginning. Here come the robots.

Nationwide, educators are realizing the promise of computer science. The College Board's Computer Science A course is the fastest growing AP class. The number of students taking it has doubled in the past five years. Yet students on the coasts -- in the Boston to Washington, D.C. corridor, plus all of California -- are most likely to take it, according to data from Barbara Ericson of Georgia Tech.

A 2016 study from Gallup and Google (GOOG) found that computer science is less of a priority in rural schools than in urban and suburban areas.

It doesn't help that it's difficult for teachers to find good training in rural areas. Gina Green, a newly minted computer science teacher in rural Bolivar, Missouri, is fortunate to teach near a university that offers computer science education.

After hearing that there would be a million unfilled computer science jobs in the U.S. by 2020, Green went back to school. She's now qualified to teach students the programming languages Java and Python.

She said the hands-on help of a human instructor was critical. While a teacher might be able to read a handful of books on the Civil War and sufficiently teach an American History class, Green said computer science doesn't work that way.

Related: Now hiring: Women with these degrees, including computer science

In recent years, a spree of tech "bootcamps" have sprung up, which give adults a crash course in programming. While a promising development, they're overwhelming located in large cities.

Green is now in her second year of teaching a computer science course to high school students. She said the course, which is three years old, was the first one offered in rural Missouri.

"There's a huge gap," Green said, between the computer science avenues available in the biggest cities compared to those in rural areas.

"It's imperative that in rural America that we say, this is an option for you," Green said. "All these jobs are disappearing. All across the nation, these traditional jobs are disappearing. I think it's an opportunity for these kids to achieve the American Dream."

Recently Green was chatting with a student with an unusually high IQ. Green asked what he wanted to do with his life. He responded that he might be a diesel mechanic, work in a factory or work for the highway department.

"He said those things because that's what he's been exposed to in his family," Green said. "A student like that might love computer science."

The student hasn't enrolled in Green's computer science course yet. But she's hopeful he will.

"I'll be encouraging him," she said.