RoR Newbie Needs Helps With Webcams

I’m looking to do a project where a webcam will be connected to a
computer, take a snapshot of an item and then store the picture either
in a Postgres DB or locally on the server. Has anyone done this before?
Where can I start? Does anyone have any samples? Your help is greatly
appreciated.

Nice idea If you will know something more in this case give me more
info because I am interested in it.