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

Gem load error #25

Open
hunter opened this issue Aug 29, 2010 · 3 comments
Open

Gem load error #25

hunter opened this issue Aug 29, 2010 · 3 comments

Comments

@hunter
Copy link

hunter commented Aug 29, 2010

We seem to be having issues getting certain gems to be loaded correctly. We've been trying to build twitter and superfeedr daemons but our libexec code can't seem to find the gem. The gems have been added in the Gemfile and the pre-daemonize require doesn't raise an error.

When we run the daemon we get this error:


[daemon-kit]: DaemonKit (0.1.8.1) booting in development mode
[daemon-kit]: Setting up trap for USR1
[daemon-kit]: Setting up trap for USR2
[daemon-kit]: Setting up trap for HUP
[daemon-kit]: Setting up trap for INT
[daemon-kit]: Setting up trap for TERM
[daemon-kit]: DaemonKit (0.1.8.1) booted, now running twitter-stream
[daemon-kit]: Running shutdown hooks
[daemon-kit]: Shutting down twitter-stream
/Users/hunter/Sites/active/infinite.ly/daemons/twitter_stream/libexec/twitter_stream-daemon.rb:16:in '': uninitialized constant TweetStream (NameError)
        from /Users/hunter/.rvm/gems/ruby-1.9.2-p0/gems/daemon-kit-0.1.8.1/lib/daemon_kit/application.rb:38:in 'require'
        from /Users/hunter/.rvm/gems/ruby-1.9.2-p0/gems/daemon-kit-0.1.8.1/lib/daemon_kit/application.rb:38:in 'run'
        from /Users/hunter/.rvm/gems/ruby-1.9.2-p0/gems/daemon-kit-0.1.8.1/lib/daemon_kit/application.rb:21:in 'exec'
        from bin/twitter_stream:7:in `'

The libexec code is straightforward:


DaemonKit::Application.running! do |config|
end

TweetStream::Client.new('user','pass', :yajl).on_delete{ |status_id, user_id|
  # Delete
}.on_limit { |skip_count|
  # do something
}.filter(:track => 'video') do |status, client|
  puts status.inspect
end

What we did find strange was that certain libraries work and others don't. With twitter we've only tried the tweetstream library but when building a superfeedr daemon, the superfeedr-rb library works with no issue but the superfeedr-ruby library doesn't.

We're running ruby 1.9.2 (via rvm) with bundler 1.0.

@ar7hur
Copy link

ar7hur commented Feb 29, 2012

Exactly same issue here... did you solve it ?

@sparkbuzz
Copy link

Im also finding this to be an issue, trying to require files, inside pre-daemonize. It's not very encouraging to see this ticket is three years old already!!!

@kennethkalmer
Copy link
Owner

Apologies for letting this gather so much dust. Will have a look to reproduce and push out a fix.

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

No branches or pull requests

4 participants