Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posting message crashes on mod_rails/passenger #48

Closed
shajith opened this issue Sep 16, 2010 · 5 comments
Closed

Posting message crashes on mod_rails/passenger #48

shajith opened this issue Sep 16, 2010 · 5 comments

Comments

@shajith
Copy link

shajith commented Sep 16, 2010

Issue described here: http://groups.google.com/group/diaspora-dev/browse_thread/thread/8c65ad460362f6e

Here's a gist of the error:

NoMethodError (undefined method `[]' for nil:NilClass):
  /lib/diaspora/websocket.rb:15:in `push_to_user'
  app/controllers/sockets_controller.rb:17:in `outgoing'
  /lib/diaspora/websocket.rb:41:in `socket_to_uid'
  app/models/user.rb:104:in `post'
  app/controllers/status_messages_controller.rb:14:in `create'

( https://gist.github.com/05ea4954595bf73df831 )

@maxwell
Copy link
Member

maxwell commented Sep 16, 2010

Hi,

Diaspora uses event machine, which is a library for ruby based on the reactor pattern. As a result, you need to use thin/or Rainbows! with the Event Machine backend as your app server, and nginx as your server. The websocket libs and the message queue won't work without them. Thanks for your comment, I will update the readme accordingly.

@ghost
Copy link

ghost commented Sep 16, 2010

So in order to get this working on Apache or NGinx web server, we have to run another ruby based webserver (ie app server) on the same machine. LAME. DOA.

@shajith
Copy link
Author

shajith commented Sep 16, 2010

maxwell: Do you mean I should proxy from Nginx to the app running via thin/Rainbows! ?

Will try that out, thanks!

@shajith
Copy link
Author

shajith commented Sep 16, 2010

Qn: Should I be proxying requests from nginx to thin running on another port, or should I be connecting nginx to thin using unix domain sockets?

(basically which of the options here is preferred: http://code.macournoyer.com/thin/usage/ )

@rsofaer
Copy link
Member

rsofaer commented Sep 20, 2010

Hi, we use unix domain sockets, as in our thin.yml and nginx.conf in the production branch. I'm closing this issue, since it's more of a installation instruction than a bug.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants