Warren Buffett told CNBC on Wednesday that it was true his Berkshire Hathaway considered investing in the privately held ride-hailing company Uber earlier this year, but he wasn't always so enthusiastic about the sharing economy.

During Berkshire's 2014 annual meeting, Buffett handled a question about whether the disruptive business model used by Airbnb and Uber was here to stay and what implications that had for their sectors.

"The ones you name, I don't know anything about," he said in a clip found through CNBC's Warren Buffett Archive. "I mean, I know what they do, but I don't know their specific prospects, which is why we kind of stay away from that sort of thing because we don't — we know there'll be change, and we don't know who the winners will be. And we try to stick with businesses where we know the winners."

But a lot has changed in four years, apparently. On Wednesday, after reports came out that Berkshire had offered a $3 billion investment in Uber, Buffett told CNBC's Becky Quick that while some of the details weren't correct it was true the two had talked and the discussions fell apart over terms.

But, he told CNBC, "I'm a great admirer" of Uber CEO Dara Khosrowshahi.

For his part, Khosrowshahi told CNBC's Carl Quintanilla in an interview at the Code conference that it's always possible talks will resume. "We are a company that has, as you know, an enormous growth trajectory but at the same time it comes with considerable risk," he said. "So I don't think we necessarily fit in with the typical Warren Buffett investment. Maybe we can be a different kind of investment, a portfolio diversification play for him."

Buffett has a history of taking big stakes in private companies or buying them outright, such as Dairy Queen and, more recently, Pilot Flying J.

But the Uber investment would have been along the lines of Berkshire's financial crisis-era investment in Goldman Sachs, backing it with his reputation at a time when Wall Street banks were reeling from the collapse of Lehman Brothers and thirsty for capital.

In deals like this, Berkshire helps a company boost capital in exchange for lucrative terms allowing it to reap significant gains. In 2008, Berkshire got $5 billion of preferred shares of Goldman with warrants to buy $5 billion of stock down the road at a low strike price. It did a similar deal with Bank of America in 2011, and is now that bank's biggest shareholder.

Uber has been trying to recover after cultural issues and management turnover, as well as a fatal driverless car crash. Earlier this year, it got $1.25 billion from a group led by SoftBank, which also bought shares from existing investors and employees.

Khosrowshahi told CNBC he was a Buffett "fan boy" and hopes to make a deal happen some day. "One of my business goals in life has been to get Warren Buffett to invest in something that I'm involved in, and so far, I've failed. So maybe, maybe one day I can convince him."