をauthingとき、私は私のApplicationControllerにして私のapp_key、キー、および秘密を持っているプッシャー: "キャッチされない例外TypeError:メソッドを呼び出すことはできません 'scopedTo' 未定義の"
私PusherController:
def auth
if current_user
auth = Pusher[params[:channel_name]].authenticate(params[:socket_id],
:user_id => current_user.id, # => required
:user_info => { # => optional
:name => current_user.name,
:email => current_user.email
}
)
render :json => auth
else
render :text => "Not authorized", :status => '403'
end
end
私のjs
var pusher = new Pusher("key");
Pusher.channel_auth_endpoint = "/pusher/auth";
Pusher.channel_auth_transport = 'json';
channel = pusher.subscribe("presence-content_editing");
私はinscrutions http://pusher.com/docs/presence-1.6
NWOを追ったかなり確信していますI "このPresenceリソースが古く見えます私はこのエラーを取得する理由として、単に混乱しメートル
this is the error :
Uncaught TypeError: Cannot call method 'scopedTo' of undefined
Pusher.Channel.PrivateChannel.authorizepusher.min.js:38
Pusher.subscribepusher.min.js:13
Pusher.subscribeAllpusher.min.js:12
connection.bind.bind.cpusher.min.js:10
a.emitpusher.min.js:17
jpusher.min.js:25
_machine.b.Machine.connectedPostpusher.min.js:29
apusher.min.js:19
c.transitionpusher.min.js:20
w
を、しかしプッシャー= \ – NullVoxPopuli
のそのバージョンを使用してI/AM /私はこれ持っていたので、それはだ、それを考え出した:Pusher.channel_auth_transportを= 'json'; – NullVoxPopuli
それを取り除いて、問題を修正しました – NullVoxPopuli