ryanb / private_pub

Handle pub/sub messaging through private channels in Rails using Faye.
MIT License
864 stars 228 forks source link

How does PrivatePub start with Rails deployment in a production enviroment? #28

Closed foncho closed 12 years ago

foncho commented 12 years ago

Hi, I'm tryin' to deploy this awesome gem in one of my rails app. Al works properly when I run

rackup private_pub -s thin -E production

in one command shell and in another:

rails s

But, when all I develop is workin' fine in a development enviroment, it's time to launch it up on a production server, where my Apache and Mod Passenger are well configured and my Rails app, without the private_pub channel, is working fine.

In short: what I need to configure my server in order to start Rails and PrivatePub services simultaneously?

Thx in advance

The issues is: what can I do for deploy the private_pub.ru configuration simultaneously with the existing Rails app? Do I really need to use the same command in a production environment for using private_pub?

antek-drzewiecki commented 12 years ago

You could try to look at the gem foreman https://github.com/ddollar/foreman for easy deployment. You can just start the rails server and then the rackup middleware after the server is started. They are not depended on each other.

foncho commented 12 years ago

Thanks I'll try it!

safarista commented 12 years ago

How would you do the same on heroku using thin on the Cedar stack?

stanBienaives commented 12 years ago

+1 to safarista question

sanjusoftware commented 9 years ago

@stanBienaives and @safarista What I have done is I followed this (http://josephndungu.com/tutorials/gmail-like-chat-application-in-ruby-on-rails) tutorial. He makes a chat app using this gem and also talks about hoe to make it work on Heroku.

Essentially the idea is that if you are running free on Heroku, have a Fayserver app created and deploy that separately and then point your app to use that fayeserver app... :+1:

carlosch7 commented 7 years ago

but this only run on localhost and then on web real what?