Troubleshooting Ruby SDK
How to find the version of your SDK
The version is contained in the VERSION
constant in the Pubnub
module.
require 'pubnub'
def main
# Display the PubNub Ruby SDK version
puts "PubNub Ruby SDK Version: #{Pubnub::VERSION}"
# Optional: Initialize PubNub with the current version
pubnub = Pubnub.new(
subscribe_key: ENV.fetch('SUBSCRIBE_KEY', 'demo'), # Replace 'demo' with your Subscribe Key from the PubNub Admin Portal
publish_key: ENV.fetch('PUBLISH_KEY', 'demo'), # Replace 'demo' with your Publish Key from the PubNub Admin Portal
user_id: 'ruby-version-demo-user'
)
# Display configuration with version information
puts "\nPubNub Client Information:"
show all 39 lines