Ruby Interpreter crashes if I run Faye with SSL option | anil kumar | 6/17/13 4:35 AM | require 'faye' Faye::WebSocket.load_adapter('thin') Faye::Logging.log_level = :debug bayeux = Faye::RackAdapter.new( :mount => '/faye', :timeout => 60, :engine => { :timeout => 60 * 10 } ) bayeux.listen( 8443, :key => 'C:/Documents and Settings/anikumar/Desktop/FayeTest/server.key', :cert => 'C:/Documents and Settings/anikumar/Desktop/FayeTest/server.crt' ) Above is my server code, I am running it using "thin start -R faye.ru" or "ruby faye.ru -s thin --ssl" command, server starts perfectally. But whenever I hit the "https://localhost:8443/faye.js" in my browser, faye server crashes with Ruby crash and give usual windows Send/Don't Send dialog box. Any help is highly appreciated. Also I tried the following server code, but result is same (Ruby Interpreter crash): Faye::WebSocket.load_adapter('thin') Faye::Logging.log_level = :debug bayeux = Faye::RackAdapter.new( :mount => '/faye', :timeout => 60 ) EM.run { thin = Rack::Handler.get('thin') thin.run(bayeux , :Port => 8443) do |server| server.ssl_options = { :private_key_file => 'server.key', :cert_chain_file => 'server.crt' } server.ssl = true end } Regards, Anil |
Re: Ruby Interpreter crashes if I run Faye with SSL option | James Coglan | 6/17/13 4:44 AM | On 17 June 2013 12:35, anil kumar <anilku...@gmail.com> wrote:
Don't use bayeux.listen(), it is deprecated. Just put `run bayeux` in your faye.ru file, and pass the SSL options using the `thin` command-line.
|
Re: Ruby Interpreter crashes if I run Faye with SSL option | anil kumar | 6/17/13 4:58 AM | Tried thin start -R faye.ru --ssl --ssl-key-file "server.key" --ssl-cert-file "server.crt" --ssl-verify -p 8443 Same crash is happening. May be I am not putting correct Thin SSL options. |
Re: Ruby Interpreter crashes if I run Faye with SSL option | James Coglan | 6/17/13 5:39 AM | On 17 June 2013 12:58, anil kumar <anilku...@gmail.com> wrote: Tried thin start -R faye.ru --ssl --ssl-key-file "server.key" --ssl-cert-file "server.crt" --ssl-verify -p 8443 Have you tried running a different app like this to see if the problem is with Thin or the app itself?
|
Re: Ruby Interpreter crashes if I run Faye with SSL option | anil kumar | 6/18/13 3:36 AM | HI, Now I am able to solve the problem. Problem was my Ruby. I was using MSVC Ruby and I am guessing it did not have TSL/SSL support. Once I tried with MIngW Ruby, things started working. |