I want to scan new transactions as they are added to the block chain.
Does anyone have a suggestion on how to do this. Are there any APIs that allow for this? Or is there a way to directly tap into the bitcoin network with ruby?
Full disclosure, I'm BlockCypher's Developer Advocate. We have both a WebSockets/WebHooks API for unconfirmed transactions, which you can read about here, along with a Ruby example: http://dev.blockcypher.com/?ruby#using-webhooks .
But if you wanted to run a local implementation that's primarily Ruby-based, you could try Coinbase's Toshi, or bitcoin-ruby:
You should starting by running Bitcoin Core, the reference client for the bitcoin network. Then you will find a ton of libraries (including Ruby) that can work with that to let you see new transactions, blocks, etc...
Yes, what you are looking for is websocket API. There are several APIs for this, but the most popular are blockchain.info and chain.com.
If you want to learn more, here's a step-by-step video and written tutorial on the subject: http://btcthreads.com/display-real-time-bitcoin-transactions-with-jquery-and-websocket/