The
nazgul could smell
the ring because, 1)they were specifically looking for it and
Frodo and 2) they were a heck of a lot closer.
Sauron missed it because he was concentrating his powers(sight) over most of
middle earth, not just the ring.
In the
books, there are times that show Sauron searching,
the mirror and
amon hen, so it seems he can sense it when it is worn, and the wearer is looking to
mordor, or thinking of Sauron.
Later Saurons inability to "find" Frodo and the ring in Mordor is due in part to
the shadows and fumes he caused to shroud
Barad-Dur and the rest of Mordor, as well as the smoke of Mt. Doom, and the elven cloaks probably helped as well, like the phial did to the
witch king near
minas morgul. The reason
Gandalf proposed to send the army to the Morrannon was to keep Sauron from turning his attention back to the search for the ring, to make him think that one of the great had it. This also kept his "eye" away from the interior of Mordor and kept him from any deeper inquiries into reports of spies.
Also, the Nazgul were slaves to the rings,
the one that they had held, and the One, so they might have had a greater "connection" since Sauron was
the master, or lord of the rings. Plus maybe the nazgul just had a ability Sauron did not, just because he is more powerful, doesn't mean he has all the powers they do. And
Gollum is able to sense the ring, at least enough to fight the invisible Frodo, so maybe the ability to smell, or sense the ring, was a side effect of being enslaved or almost enslaved, it conferred on a mortal being, along with longer life.