News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
ruby websocket error: uninitialized constant WS
Tags: webhooks
Nov 1, 2023 at 11:10am   •   2 replies  •  0 likes
William Tang

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

2 Answers
answered on Nov 4, 2023 at 4:06pm  

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


 0
answered on Nov 3, 2023 at 8:50am  

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


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us