Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何在rails中使用俚语_Ruby On Rails_Pusher - Fatal编程技术网

Ruby on rails 如何在rails中使用俚语

Ruby on rails 如何在rails中使用俚语,ruby-on-rails,pusher,Ruby On Rails,Pusher,我想在我的rails应用程序中使用slanger(在我的php应用程序中效果很好),但我没有得到任何连接 192.168.56.101是我的本地俚语服务器,我是从以下几点开始的: slanger -k 123 -s 123 -w 192.168.56.101:8080 My config/initializers/pusher.rb Pusher.url = "192.168.56.101" Pusher.port = 4657 Pusher.app_id = 123 Pusher.key =

我想在我的rails应用程序中使用slanger(在我的php应用程序中效果很好),但我没有得到任何连接

192.168.56.101是我的本地俚语服务器,我是从以下几点开始的:

slanger -k 123 -s 123 -w 192.168.56.101:8080
My config/initializers/pusher.rb

Pusher.url = "192.168.56.101"
Pusher.port = 4657
Pusher.app_id = 123
Pusher.key = 123
Pusher.secret = 123
我的客户端脚本如下所示:

<script type="text/javascript">
    Pusher.host    = '192.168.56.101'
    Pusher.ws_port = 8080
    Pusher.wss_port = 8080

    var pusher = new Pusher('123');
    var channel = pusher.subscribe('test');
    channel.bind('my_event', function(data) {
      alert( data.message );
    });

    Pusher.log = function(data) {
        console.log('\t\t', data);
    };
</script>

这是一个问题。为我感到羞耻

嗨,你在iptable上做了什么改变?为什么您甚至需要更改本地服务器中的iptable?港口关闭了吗?你能详细说明一下吗?在过去的两天里,我一直在面对这些问题。我使用puphpet.com作为本地测试服务器。在新版本中,它们集成了iptables。当我回到@home时,我可以给你发送我的iptables:)谢谢!你能给出iptables配置的细节吗,我仍然面临同样的问题!提前谢谢。我一直找不到应用程序密钥。
Pusher : State changed : initialized -> connecting
Pusher : Connecting : ws://192.168.56.101:8080/app/123?protocol=5&client=js&version=1.12.5&flash=false
Firefox kann keine Verbindung zu dem Server unter ws://192.168.56.101:8080/app/123?protocol=5&client=js&version=1.12.5&flash=false aufbauen.
Pusher : Connecting : wss://192.168.56.101:8080/app/123?protocol=5&client=js&version=1.12.5&flash=false
Firefox kann keine Verbindung zu dem Server unter wss://192.168.56.101:8080/app/123?protocol=5&client=js&version=1.12.5&flash=false aufbauen.
Pusher : Error : {"type":"WebSocketError","error":{"isTrusted":true}}
Pusher : State changed : connecting -> unavailable