a3rd / molniya

Automatically exported from code.google.com/p/molniya
GNU General Public License v2.0
0 stars 0 forks source link

sinatra problem with molniya #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.install Debian testing for amd64
2.aptitude install ruby ruby1.8-dev make ; gem install metaid xmpp4r
sinatra rack mongrel
3.download molniya, unpack it, configure the yaml file and run ./molniya -c
config.yaml

What is the expected output? What do you see instead?
i expected scantily clad women but got 
# ./molniya -c config.yaml
D, [2010-04-06T10:34:51.942478 #30023] DEBUG -- : setting up XMPPClient
I, [2010-04-06T10:34:51.942900 #30023]  INFO -- : Connecting to XMPP server...
I, [2010-04-06T10:34:51.971594 #30023]  INFO -- : Connected.
D, [2010-04-06T10:34:52.036617 #30023] DEBUG -- : Authenticated.
D, [2010-04-06T10:34:52.037118 #30023] DEBUG -- : Setting up roster helper.
./molniya.rb:511:in `initialize': undefined method `sb=' for
#<Sinatra::ShowExceptions:0xb6fd19f0> (NoMethodError)
        from ./molniya.rb:746:in `new'
        from ./molniya.rb:746:in `launch'
        from -e:1

In my messenger application, I could see that the user connected for a
moment but went offline immediately.

What version of the product are you using? On what operating system?
I am using molniya 0.2.1 and these gems:
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.7)
gem_plugin (0.2.3)
metaid (1.0)
mongrel (1.1.5)
rack (1.1.0)
sinatra (1.0)
xmpp4r (0.5)

Please provide any additional information below.
my config.yaml
# XMPP username (JID) to connect as
username: xxxxx@xxxxx.net
# Password for XMPP user
password: xxxxxxxxxxxxxx
# Base URI for your Nagios installation
nagios_uri: http://xxxxxxxxxxxxxxx/nagios3
# /var directory of your Nagios installation
nagios_var: /var/cache/nagios3
# Nagios contact field used to store XMPP JID
xmpp_field: address1
# email address to send mail as
smtp_from: nagios@xxxxxxxxxxxxx.net
# SMTP server to use
smtp_relay: monitor2.xxxxxxxxxxxxxx.net
# Options suitable for passing to Rack::Handler::Mongrel#run
http_opts:
  :Host: localhost
  :Port: 7991

Original issue reported on code.google.com by tanierpo...@gmail.com on 6 Apr 2010 at 9:51

GoogleCodeExporter commented 9 years ago
sinatra (0.9.2) - fails
sinatra (0.9.1) - works

Original comment by matt.h...@gmail.com on 16 Apr 2010 at 4:25

GoogleCodeExporter commented 9 years ago
This was broken for me with Sinatra 1.0. Apparently under 1.0, 
Molniya::WebApp.new() 
returns an instance of Sinatra::ShowExceptions that won't delegate method calls 
to the 
WebApp instance I asked for. This behavior is... surprising.

However, I've changed the way I do this initialization, and it's fixed in 
revision 37.

Original comment by cswhee...@gmail.com on 21 Apr 2010 at 9:25