[root@www redis-audit]# bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break
this application for all non-root users on this machine.
Fetching gem metadata from http://rubygems.org/..........
Fetching additional metadata from http://rubygems.org/..
Installing redis 3.0.2
Using bundler 1.6.4
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
When I try to run it, error print out as follows:
[root@www redis-audit]# bundle exec ruby redis-audit.rb 127.0.0.1 6379 1 10000
Auditing 192.168.1.6:6379 db:1 sampling 10000 keys
Getting a list of all 0 keys...
Auditing 0 keys...
DB has 0 keys
redis-audit.rb:184:in `output_bytes': undefined method `divmod' for nil:NilClass (NoMethodError)
from redis-audit.rb:207:in `output_stats'
from redis-audit.rb:278:in `<main>'
I use git clone redis-audit
And install it by bundle
When I try to run it, error print out as follows: