The battery died last week. After I jumped it I noticed the truck would only stay running if I was revving the engine. As soon as I take my foot off the gas rpm drops to 0 and the truck dies.
Because it started happening after the battery I figured the battery must be dying (it is 12 or so years old), but after charging the battery I can start the truck without a jump, but without constantly revving it immediately dies.
I recently replaced the air filter. Something online said maybe the fuel relay, I popped in the spare from the fuse box but with no success.
I suspect your alternator or your battery or both are failing. Since your car needs both fuel and spark to keep the engine running it is possible that, unless you're revving up, the fuel pump and all the other electrical components are not getting enough juice to make the grade.
I had this same problem after my battery died with my 03 Dodge Ram. I was told to hold my foot on the brake and get it on the road and drive it at 55-60 mph and it would reset one of the sensors. It did fine after about 2-3 miles, hope this helps someone .
I concur with Fclester, I experienced the exact same symptoms with my 2001 Dodge Ram 1500 w/5.2l V8... it ran great then I killed the battery. After charging it back up, the truck would not idle. I consulted the Oracle of Google and after much research, I did the same as Jack B Nimble and poof, truck works perfectly again.
If your truck won't idle, replace the Throttle Position Sensor. While you have your torx screwdriver out, change or at least clean the Idle Air Control also, mine was all gunked up. Both components cost me $60 total from Advance Auto Parts.