Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Don't work in production mode #120

@aabse

Description

@aabse

Hi.
I can't work with the gem in production mode. In local mode it works fine.
In the page, when i try to put a message in the chat, nothing happens.

I'm using nginx, passenger, thin.

Below it includes information that can be useful for support:

My private_pub.yml:

development:
server: "http://192.168.1.48:9292/faye"
secret_token: "secret"
test:
server: "http://192.168.1.48:9292/faye"
secret_token: "secret"
production:
server: "http://181.160.190.149/faye"
secret_token:"79301c39f07005f5e0ba58a4387c316c028d8c573fa3032b18c24d5ac35645935a64b93189eb19c514cfe34e0851a479b808041d32cd29735cfadd05f1a6f5c4"
signature_expiration: 3600 # one hour

In the nginx config I added a proxy:

location /faye {
proxy_pass http://127.0.0.1:9292;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_buffering off;
proxy_redirect off;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_set_header X-Forwarded-Proto https;
break;
}

Information about errors (when I try to put a message in the chat):

In the browser console:

Failed to load resource the server responded with a status of 500 (Internal Server Error).

In the file production.log:

Started POST "/messages" for 201.220.243.237 at 2015-11-03 18:57:02 -0300
Processing by MessagesController#create as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"rEH4anhuP4jYUphNo458aKNIi77nDABavy/JgW7tSGQ=", "message"=>{"query"=>"1", "body"=>"asd"}, "commit"=>"Enviar"}
Completed 500 Internal Server Error in 109ms
EOFError (end of file reached):
app/controllers/messages_controller.rb:18:in `create'

app/controllers/messages_controller.rb:18 :
PrivatePub.publish_to("/messages/new/#{params[:message][:query]}", message: @message, lecture: @lecture)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions