I'm having the same issue as others with pairing. I tried your suggestion to run `ruby pair.rb 1234` in the command line.
It looks like there are some requires/import errors.
$ ruby pair.rb 1234
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- alfred (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from pair.rb:6:in `<main>'