A former defense secretary from the Bush and Obama administrations criticized Republican candidates Wednesday night for not being honest with the American people when it comes to defeating the Islamic State and other terrorist organizations.

Robert Gates, who served as Pentagon chief from 2006 to 2011, said Ted Cruz's plan to "carpet bomb" and Donald Trump's desire to "bomb the hell out of" the Islamic State are missing the mark.

"Some of the candidates are not being honest with the American people in offering simplistic solutions to what are difficult and complex problems," Gates told CNN's Jake Tapper. "The reality is the fight against ISIS is going to be hard and is going to take quite a while."

A large-scale bombing would not accomplish America's goal of liberating innocent civilians in Islamic State-controlled regions, according to Gates.

The retired secretary called for a leader who honestly shows the way and guides those below him or her through realistic approaches.