Lens With Aperture Ring on Digital Camera?

I have a question. There's a lens that I want which has an aperture ring and manual focus-- that is, it will not sync up with my digital camera (I have a Nikon D5100). Since the aperture is controlled from the lens and not from the camera, will my exposure meter on the camera still stay the same? For example, suppose I set the shutter speed and ISO on the camera. If I set a small or big aperture on the lens, will the camera recognize that and accurately give me the corresponding exposure meter reading according to the state of the exposure triangle?

It depends on the lens. Some older lenses will meter; some won't. If the lens has a locking ring, you can lock the aperture at the minimum (f16 or f22) and then control the aperture from the camera body.
This website has a helpful table that details what lenses mount, meter & focus on different Nikon bodies;
http://www.bythom.com/lensacronyms.htm

It actually depends on the lens itself, categorized as follows:-
1) AF-D nikon lenses: these would work on all modes only if you locked the aperture ring on F/22. But if you want to control the aperture with your hand, then it would only work in Manual Mode.
2) Nikon AI-S lenses, third-party manual lenses (e.g Rokinon and Samyang): these will work only in Manual mode and unfortuantely you have to use 'Trial-and-Error' as this type will not work with built-in exposure meter of your camera (NB AI-S lenses will, but lock the aperture ring on F/22).
I think you should consult your camera's manual first to chech the compatibility of your camera with this lenses. Hope that helps!

This wouldn't be a problem with a Pentax.

If you put your camera in manual exposure mode, you will be able to meter the lens properly.