Skip to main content

hi all, im following the tutorial here https://developers.ringcentral.com/guide/notifications/websockets/quick-start#ruby to create a ruby websocket. however, after running the code websockets.rb (i just copied and pasted the code from the tutorial page), i kept getting this error:

''websockets.rb:24:in `<main>': uninitialized constant WS (NameError)''

"subscription = WS.new($rc, events, lambda { |message|"

any idea why it's not recognizing WS? thanks

Please refer to https://github.com/ringcentral/ringcentral-ruby/blob/master/spec/websocket_subscription_spec.rb

I believe you need to "require 'subscription' "


Please create a support ticket if it still doesn't work: https://developers.ringcentral.com/support/create-case


hi, thanks. the code i used was exactly the same from this url, i didnt change anything, and it did have require'subscription' but the error is still happening: https://developers.ringcentral.com/guide/notifications/websockets/quick-start#ruby


Reply