0

I have been using private pub on my local machine and it works fine but now that I'm trying my rails app on a private vps it's a different story. I have been trying to change the server string in the private_pub.yml to the ip of my vps, but I realised that nothing changes no matter what I do. It always keeps serving localhost:9292.

So I tried the same thing on my local machine, I changed the server string to "http://192.168.1.11:9292/faye" in the development and production environments as you can see here (I changed the server adress in both environment just to be sure...) :

### config/private_pub.yml
development:
  server: "http://192.168.1.11:9292/faye"
  secret_token: "secret"
production:
  server: "http://192.168.1.11:9292/faye"
  secret_token: "thisisasecrettokenmyfriend"

And when I run bundle exec rackup private_pub.ru -s thin -E production I always get:

>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on localhost:9292, CTRL+C to stop

So why does it not read the server address in the private_pub.yml file ? Is private_pub too deprecated ?

Any answer, suggestion, tip will be greatly appreciated :)

Badr Tazi
  • 749
  • 1
  • 6
  • 20

1 Answers1

0

try

bundle exec rackup private_pub.ru -o 0.0.0.0 -s thin -E production

so the server will listen everything

decarte
  • 410
  • 1
  • 7
  • 17
  • 1
    Thanks a lot for your answer! This works on my local machine (with a pretty long delay) but on my VPS it does not execute the code inside the `<% publish_to %>` . Nothing is published and there's no error in the console. Any idea why ?? – Badr Tazi Sep 07 '15 at 11:44