It doesn't get created for you by peerjs, rather, you pass it too Peer new as the first option followed by a comma In mine, below, I've passed a value for my_id from my view using a content_tag If you get the error 'Could not get an id from server' try replacing the variable you're using for the id with a literal like 1 or 2 or 'Aishwara' so you'll know if the problems just in passing the variable from view to js Here's an example from my js file
var peer = new Peer(my_id, {host: 'localhost', port: 9000, config: {'iceServers': [
Additionally Turn is depracated in favor of Stun so don't bother looking for working Turn servers