Я получаю сообщение об ошибке «OT не определено» в приложении ruby on rails: 
Ключ API, session_id и токен имеют правильные значения.
Я включил gem 'opentox' в мой gemfile и запустил 'bundle install'.Не уверен, как еще инициализировать OT.
Show.html.erb:
<script type="text/javascript">
var apiKey = '<%= @api_key %>';
var sessionId = '<%= @room.session_id %>';
var token = '<%= @token %>';
</script>
<div id="videos">
<div id="publisher"></div>
<div id="subscribers"></div>
</div>
<script>
// Handling all of our errors here by alerting them
function handleError(error) {
if (error) {
alert(error.message);
}
}
initializeSession();
function initializeSession() {
var session = OT.initSession(apiKey, sessionId);
// Subscribe to a newly created stream
session.on('streamCreated', function(event) {
session.subscribe(event.stream, 'subscriber', {
insertMode: 'append',
width: '100%',
height: '100%'
}, handleError);
});
// Create a publisher
var publisher = OT.initPublisher('publisher', {
insertMode: 'append',
width: '100%',
height: '100%'
}, handleError);
// Connect to the session
session.connect(token, function(error) {
// If the connection is successful, publish to the session
if (error) {
handleError(error);
} else {
session.publish(publisher, handleError);
}
});
}
</script>