Midstream player ONEOK Partners (NYSE: OKS) announced that it was axing plans for its Bakken Crude Express pipeline because of a failure to secure long-term shipping commitments from producers. Given that the Bakken is bursting at the seams with oil right now, this may appear surprising at first blush. But a closer look at the reality of today's oil production may help explain what this is all about.

Bakken Crude Express
The ONEOK pipeline was meant to be a 1,300 mile line capable transporting 200,000 barrels per day out of North Dakota's Bakken Shale and down to the oil hub at Cushing, Okla. ONEOK planned to spend between $1.5 billion and $1.8 billion to have it up and running by 2015. That timeline would require producers to commit their oil to ONEOK, and more importantly Cushing, until 2025. It is something, apparently, not enough companies were willing to do.

Anywhere but Cushing
The oil hub down in Oklahoma is a pretty happening place right now. As of last week, there were 45.9 million barrels of oil stored at Cushing, 50% more than this time last year. With limited capacity coming out of the hub, the oil sits. And sits. That glut of sedentary oil drives down the price, and U.S. oil is now trading for a $20 discount to Brent, the world standard.

Though things are bad at Cushing, they're actually worse in West Texas. Earlier this month Bloomberg reported that two different Texas oil grades, WTI-Midland and West Texas Sour, fell to historic lows against the West Texas Intermediate benchmark. The WTI crude delivered at Midland was trading at $13 per barrel discount to the same grade of crude delivered at Cushing. Why? Because oil is just sitting in Midland right now; all the pipelines out of town are full.

There are places in the U.S. where oil can fetch a higher price, and if producers had more flexibility in their shipping options, they would do just that. Lately, the problem is being solved by one of the oldest transportation modes around: railroads.

Railroad to riches
Moving crude by railcar is more expensive than by pipeline, and you will never hear otherwise; but, it offers much more flexibility and the number of advantages rail brings to the table seems to grow on a daily basis. First, pipelines generally require 10 year shipping agreements, whereas the flexibility of rail allows companies to buy or lease railcars for a shorter period of time. Two more advantages just happen to include accessing non-traditional or underserved markets and preventing a buildup of supply.

More markets
Pipeline operators are hip to this trend. Plains All American (NYSE: PAA) is increasing its number of railcars from 4,200 to 6,000 by the end of next year.

More significantly, Enbridge (NYSE: ENB) just announced it's partnering with Canopy Prospecting to build out a rail system to transport 80,000 barrels of oil per day from North Dakota to refineries in Philadelphia by the third quarter of 2013, though capacity could double by mid-2014 if need be. It should only cost $68 million.

Railroads make sense for producers, but from the pipeline company's perspective, this is also a faster and cheaper alternative to putting pipe in the ground.

Time to buy railroads?
Let's not forget the obvious -- pipelines and producers aren't the only winners here. The railroad industry looks poised to reap the profits of increased oil production. Even a cursory glance at Canadian National Railway (NYSE: CNI) and Union Pacific (NYSE: UNP) reveals the impact oil has already had on the industry. Petroleum and chemical shipments make up 16% of Canadian National's revenue, after accounting for 0% a mere two years ago.

Likewise, Union Pacific's petroleum products shipments increased 95% year over year. The gains are happening across the industry. According to the Association of American Railroads petroleum and petroleum product shipments reached 20,906 carloads in October, a 54.5% increase year over year.

This is a lightning quick development, and I would not be surprised to see those numbers continue to grow over the next few years.

Foolish takeaway
ONEOK CEO John Gibson believes there is still hope for his company's Bakken Crude Express, provided it empties somewhere other than Cushing, Okla. But Plains All American CEO Greg Armstrong intimated in a third-quarter conference call that the Bakken oil producers will probably depend on rail for the next five years. Enbridge seems to be of the same mind-set, and really, what this trend ultimately shows is that we should not be surprised to see railcar after railcar crossing the Canadian border in lieu of, or in addition to, TransCanada's (NYSE: TRP) Keystone XL pipeline. The oil, it seems, will always find a way.