private-pub

Private pub issue in rails application

99封情书 提交于 2020-01-07 06:53:28
问题 I have article model and i want to show a notification such as a flash message on the home page to the users when they log in or who is logged in already when a new article is posted using private_pub gem articles_controller.rb class ArticlesController < ApplicationController def index @articles = Article.all @articles_grid = initialize_grid(Article, :include => [:user]) end def show @article = Article.find(params[:id]) @comment = Comment.new end def new @article = Article.new end def create

How can I use Private Pub with a Resource Route that has a segment key?

自作多情 提交于 2020-01-05 08:16:28
问题 I'm currently having a problem while using Private Pub in a Rails 3 Project. All the examples show the usage of publish/subscribe to a route like this: "/messages/new" But What If the intended route is a little more complex, ie. routes.rb resources :messages, only: [] do post 'chat', on: :member end Which will create the following chat_message POST /messages/:id/chat(.:format) messages#chat Therefore, I'm using it like this: view: = subscribe_to "/messages/#{@cid}/chat" coffee response view:

Using private_pub with SSL

大憨熊 提交于 2019-12-11 04:06:33
问题 I have setup private pub with SSL according to https://github.com/ryanb/private_pub#serving-faye-over-https-with-thin, also adding in daemonize: true (tested with and without). I can browse to https://mydomain.com:4443/faye.js and that loads. There are no errors on the page. However, nothing is actually working i.e. no real time events trigger. When trying to PrivatePub.publish_to in the console I get: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate

How do I create Private channel between two user

人走茶凉 提交于 2019-12-08 02:27:11
问题 I have been implementing Faye server for chat application. Currently we have 400000 users in our table. Each user can chat with one another privately. But I don’t know how to implement private channel between two users using Faye or private pub for 4 lakhs user. Do I have to make a table which will contain around 4 lakhs X 4 lakhs private channel entry, I think that is not a good idea. please guide me. 回答1: The Faye documentation provides some very good information on this subject: http:/

How do I create Private channel between two user

只愿长相守 提交于 2019-12-06 12:48:33
I have been implementing Faye server for chat application. Currently we have 400000 users in our table. Each user can chat with one another privately. But I don’t know how to implement private channel between two users using Faye or private pub for 4 lakhs user. Do I have to make a table which will contain around 4 lakhs X 4 lakhs private channel entry, I think that is not a good idea. please guide me. The Faye documentation provides some very good information on this subject: http://faye.jcoglan.com/security.html In your case the How should I authenticate clients? is particularly relevant.

PrivatePub is not defined error Rails 3.2 private pub

那年仲夏 提交于 2019-12-06 03:57:46
问题 I want to use private pub gem in my rails application. I implement with railscast 316 After rails g private_pub:install my private_pub.yml file: development: server: "http://0.0.0.0:9292/faye" secret_token: "secret" test: server: "http://0.0.0.0:9292/faye" secret_token: "secret" production: server: "http://0.0.0.0/faye" secret_token: "98ec77eb7077c9899dc53f003abc4d6a0170512a57feab126ed5a32b114e3613" signature_expiration: 3600 # one hour my private_pub.ru file # Run with: rackup private_pub.ru

PrivatePub is not defined error Rails 3.2 private pub

匆匆过客 提交于 2019-12-04 07:30:52
I want to use private pub gem in my rails application. I implement with railscast 316 After rails g private_pub:install my private_pub.yml file: development: server: "http://0.0.0.0:9292/faye" secret_token: "secret" test: server: "http://0.0.0.0:9292/faye" secret_token: "secret" production: server: "http://0.0.0.0/faye" secret_token: "98ec77eb7077c9899dc53f003abc4d6a0170512a57feab126ed5a32b114e3613" signature_expiration: 3600 # one hour my private_pub.ru file # Run with: rackup private_pub.ru -s thin -E production require "bundler/setup" require "yaml" require "faye" require "private_pub" Faye