From: thufir Date: 2012-03-22T23:55:09+09:00 Subject: nntp sample code I'm trying to do this sample (third one): http://nntp.rubyforge.org/ as follows: thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ ruby nntp.rb /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/nntp-1.0.0/lib/nntp.rb:400:in `do_start': private method `open' called for Net::InternetMessageIO:Class (NoMethodError) from /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/nntp-1.0.0/lib/ nntp.rb:380:in `start' from /home/thufir/.rvm/gems/ruby-1.9.3-p125/gems/nntp-1.0.0/lib/ nntp.rb:321:in `start' from nntp.rb:6:in `
' thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ cat nntp.rb require 'rubygems' require 'nntp' newsgroup = 'gmane.comp.lang.ruby.general' Net::NNTP.start('news.gmane.org', 119) do |nntp| message_ids = nntp.listgroup(newsgroup) nntp.group(newsgroup) message_ids[1].each do |id| nntp.head(id).each do |header| header.each { |line| puts(line) if line.index('Subject:') } end end end thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ type rvm | head -1 rvm is a function thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ rvm --version rvm 1.10.3 by Wayne E. Seguin , Michal Papis [https://rvm.beginrescueend.com/] thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ gem --version 1.8.19 thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ ruby --version ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux] thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ gem list --local | grep nntp nntp (1.0.0) ruby-net-nntp (1.0.0) thufir@dur:~/ruby/nntp$ now when I look at http://rubydoc.info/stdlib/net/1.9.2/Net/ InternetMessageIO I don't even see method "open," so was that method removed from the class? Or, is there a problem with the sample code? Or my ruby install? Odd that sample code gives an error, like the library is the problem. thanks, Thufir