Private Pub on Heroku | Rails 3
Asked Answered
S

1

2

I'm having some trouble understanding which port the private_pub gem uses on heroku. Everything works locally, and I can start up the extra dyno on heroku. I figure there has to be a way to set this dynamically.

My Procfile

pubsub: bundle exec rackup private_pub.ru -s thin -E production -p 9292

private_pub.yml

production:
    server: "http://myapp.herokuapp.com:9292/faye"

Note that setting the port to $PORT in my Procfile will automatically assign a port, but how do I reference that in private_pub.yml?

Soubrette answered 7/3, 2013 at 14:39 Comment(0)
M
2

You don't need to specify your port. Mine looks like this:

production:
  server: "http://mm-faye-pp.herokuapp.com/faye"

Make sure you're passing in your secret_token and make sure your faye app is running on a completely different dyno or make a new heroku app just for your faye like I did.

Mantelpiece answered 8/3, 2013 at 2:38 Comment(1)
It's running on a different dyno, started by the procfile- but referring to myapp.herokuapp.com/faye doesn't work. What do you think? I've been developing on Rails for around a year and a half, I may be missing something obvious.Soubrette

© 2022 - 2024 — McMap. All rights reserved.