require 'rss/1.0'
require 'rss/2.0'
require 'open-uri'

source = "something.com" # url or local file
content = "" # raw content of url will be loaded here
open(source,:proxy => nil) do |s| content = s.read end
rss = RSS::Parser.parse(content, false)

puts "Root values"
print "RSS title: ", rss.channel.title, "\n"
##############################################
Now, running this code through IRB works fine and gives me correct
result.
Whereas, If I run same piece of code through WEBRICK server, it gives
me following error ...

------------------------------------------------------------------------------------------------------------------
OpenSSL::SSL::SSLError in Document#feed
SSL_CTX_new:: library has no ciphers
RAILS_ROOT: ./script/../config/..

Application Trace | Framework Trace | Full Trace
D:/ruby/lib/ruby/site_ruby/1.8/net/protocols.rb:38:in `new'
D:/ruby/lib/ruby/site_ruby/1.8/net/protocols.rb:38:in `initialize'
D:/ruby/lib/ruby/1.8/net/http.rb:430:in `open'
D:/ruby/lib/ruby/1.8/net/http.rb:430:in `do_start'
D:/ruby/lib/ruby/1.8/net/http.rb:419:in `start'
D:/ruby/lib/ruby/1.8/net/http.rb:821:in `request'
D:/ruby/lib/ruby/1.8/net/http.rb:615:in `get'
------------------------------------------------------------------------------------------------------------------

Any clue ??
Is it something to do with SSL certification ?

Thanks,
Karika Shah
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to