Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Methods in components not found when ahn run as a daemon

#57

I may create an ahn app and use the simon_game module as a component when I run ahn interactively. But as soon as I run as a daemon with 'ahnctl start foo' I get this error:

ERROR agi: #<NameError: undefined local variable or method simon_game' for #<Adhearsion::DialPlan::ExecutionEnvironment:0x19021e8>> ERROR agi: /Users/jsgoecke/Desktop/foo/dialplan.rb:2:inload'

 /opt/adhearsion/lib/adhearsion/voip/dial_plan.rb:50:in `instance_eval'
 /opt/adhearsion/lib/adhearsion/voip/dial_plan.rb:50:in `run'
 /opt/adhearsion/lib/adhearsion/voip/dial_plan.rb:105:in `handle'
 /opt/adhearsion/lib/adhearsion/voip/dial_plan.rb:81:in `handle'
 /opt/adhearsion/lib/adhearsion/voip/asterisk/agi_server.rb:23:in `serve'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/gserver.rb:211:in `start'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/gserver.rb:208:in `initialize'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/gserver.rb:208:in `new'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/gserver.rb:208:in `start'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/gserver.rb:198:in `initialize'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/gserver.rb:198:in `new'
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/gserver.rb:198:in `start'
 /opt/adhearsion/lib/adhearsion/voip/asterisk/agi_server.rb:66:in `start'
 /opt/adhearsion/lib/adhearsion/initializer/asterisk.rb:56:in `join_server_thread_after_initialized'
 /opt/adhearsion/lib/theatre.rb:66:in `call'
 /opt/adhearsion/lib/theatre.rb:66:in `trigger_immediately'
 /opt/adhearsion/lib/theatre.rb:63:in `map'
 /opt/adhearsion/lib/theatre.rb:63:in `trigger_immediately'
 /opt/adhearsion/lib/adhearsion/events_support.rb:47:in `trigger_immediately'
 /opt/adhearsion/lib/adhearsion/initializer.rb:349:in `trigger_after_initialized_hooks'
 /opt/adhearsion/lib/adhearsion/initializer.rb:143:in `start'
 /opt/adhearsion/lib/adhearsion/initializer.rb:92:in `start'
 /opt/adhearsion/lib/adhearsion/cli.rb:129:in `start'
 /opt/adhearsion/lib/adhearsion/cli.rb:19:in `send'
 /opt/adhearsion/lib/adhearsion/cli.rb:19:in `execute!'
 /opt/adhearsion/bin/ahn:28

Reported by jsgoecke · February 4th, 2009 @ 02:19 PM

State: resolved
Milestone: none
Assigned to: Jay Phillips Jay Phillips

Activity

  1. Preston Marshall
    Preston Marshall

    Have we considered using Daemonize for the daemon start/stop? Or is it too simple for what we need to do to start Adhearsion?

    February 4th, 2009 @ 10:26 PM

  2. jsgoecke
    jsgoecke

    The adhearsion/foundation/custom_daemonizer.rb is largely the same as the http://daemons.rubyforge.org safefork and daemonize methods. Just cleaned up.

    There is something happening when the process gets forked and detached from the terminal that is causing components to break.

    February 4th, 2009 @ 11:42 PM

  3. jsgoecke
    jsgoecke

    Tested and fixed this issue on my Adhearsion fork:

    http://github.com/jsgoecke/adhea...

    Did a pull request of the patch to Jicksta.

    February 4th, 2009 @ 11:57 PM

  4. Jason Goecke
    Jason Goecke
    • State changed from new to resolved
    • Milestone cleared.

    Fixed and will be released in v0.8.2 gem.

    February 6th, 2009 @ 07:15 PM

  5. Jay Phillips
    Jay Phillips

    This is now in master as of 2/10/09

    February 10th, 2009 @ 04:42 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.