Use subscribe in ruby