Capp is a packet capture library that wraps libpcap. Capp provides a simple API for capturing packets and automatically unpacks common packets (including Ethernet, IP, TCP, UDP and ICMP). Capp also cooperates with other threads better than other pcap wrapper libraries for ruby.
Gemfile gem 'capp', '~> 1.0'
install gem install capp