From: Martin DeMello Date: 2009-12-06T02:57:12+09:00 Subject: Re: wxruby and rubymsn answered on stackoverflow, here's a copy for the sake of the rubytalk archive: Worked for me. Try this: copy the minimal sample from the wxruby distribution, and modify minimal.rb so that you start your msn thread just before the wx main loop: require 'msn/msn' conn = MSNConnection.new("rubybot@channelwood.org", "secretpassword123") conn.start # Wx::App is the container class for any wxruby app. To start an # application, either define a subclass of Wx::App, create an instance, # and call its main_loop method, OR, simply call the Wx::App.run class # method, as shown here. Wx::App.run do self.app_name = 'Minimal' frame = MinimalFrame.new("Minimal wxRuby App") frame.show end You'll need to symlink the msn directory inside the minimal directory to get the require statement working, of course. You don't need the while true {sleep 1} loop; that's just to prevent the program from exiting so that your msn thread can keep running. The wx main loop accomplishes the same purpose.