Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Namespace conflict ApnServer::Server::EM #5

Closed
jnak opened this Issue · 3 comments

2 participants

Julien Nakache Ben Poweski
Julien Nakache
jnak commented

Hi,

I've just upgraded to 0.2 and I'm facing a weird issue issue both on my dev and prod machines. When running apnserverd, I get :

"../lib/apnserver/server.rb:6:in `initialize': uninitialized constant ApnServer::Server::EM (NameError)"

This seems to say that when you call EM::Queue.new, it is appending this to the namespace it's in (module : ApnServer and class:Server). I can't figure out why...

Thanks for this gem and your help !
julien

Ben Poweski
Owner

I moved around the requires to try and make event machine not a requirement, I probably broke it in the process. Are you launching it via the apnserverd script? Try and add:

gem 'event_machine'
require 'event_machine'

To the script to see if that solves the issue

Ben Poweski
Owner

Actually, omit the underbars in those statements as it seems 'event_machine' is pointed to an older version

Julien Nakache jnak closed this
Julien Nakache
jnak commented

Sorry, I was away from my laptop this weekend.
I just changed inserted :

require 'eventmachine'

in lib/apnserver/apnserver.rb (line 1) and it worked.
Thanks for your help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.