# Ruby

**URL:** https://www.ruby-forum.com/c/ruby/7.md?page=687

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 688

---

## [Mms2r 2.4.0 Released](https://www.ruby-forum.com/t/mms2r-2-4-0-released/180511)

<div class="topic-metadata">

**Author:** [@mike-moscow](https://www.ruby-forum.com/u/mike-moscow)\
**Replies:** 0\
**Last updated:** [December 20, 2009, 11:36pm UTC](https://www.ruby-forum.com/t/mms2r-2-4-0-released/180511 "2009-12-20T23:36:06Z")

</div>

mms2r version 2.4.0 has been released! http://mms2r.rubyforge.org/ http://rubyforge.org/tracker/?group\_id=3065 http://github.com/monde/mms2r http://peepcode.com/products/mms2r-pdf DESCRIPTION MMS2R is a library th…

---

## [C++ pointers to Ruby objects](https://www.ruby-forum.com/t/c-pointers-to-ruby-objects/180334)

<div class="topic-metadata">

**Author:** [@denommus](https://www.ruby-forum.com/u/denommus)\
**Replies:** 6\
**Last updated:** [December 20, 2009, 10:04pm UTC](https://www.ruby-forum.com/t/c-pointers-to-ruby-objects/180334 "2009-12-20T22:04:21Z")

</div>

I’m trying to make an interface between PhysX and Ruby and I got stucked on the very beggining. XD I have an NxPhysicsSDK pointer, pointing to an object (duh) and I would like to store this pointer into an Ruby VALUE …

---

## [How capture console error messge for logging?](https://www.ruby-forum.com/t/how-capture-console-error-messge-for-logging/180506)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [December 20, 2009, 9:50pm UTC](https://www.ruby-forum.com/t/how-capture-console-error-messge-for-logging/180506 "2009-12-20T21:50:46Z")

</div>

OS X, Ruby 1.8 I’ve been searching & reading, but not finding (or perhaps just not understanding) how I can capture as a string the exact same error message text that would normally get dumped to Terminal. So, if I w…

---

## [How to put unique lines from regexped file](https://www.ruby-forum.com/t/how-to-put-unique-lines-from-regexped-file/180493)

<div class="topic-metadata">

**Author:** [@beny18241](https://www.ruby-forum.com/u/beny18241)\
**Replies:** 5\
**Last updated:** [December 20, 2009, 8:04pm UTC](https://www.ruby-forum.com/t/how-to-put-unique-lines-from-regexped-file/180493 "2009-12-20T20:04:41Z")

</div>

Hi all, I have such a question, when i open a file doing some grep stuff… File.open(‘aa.xml’).each do |line| dev\_name = ARGV\[1\] if line =~ /prf:CcppAccept/…line =~ /\</prf:CcppAccept\>/ if line =~ /rdf:li(image|aud…

---

## [Faster Enumerator#each by rb\_block\_call with current block](https://www.ruby-forum.com/t/faster-enumerator-each-by-rb-block-call-with-current-block/180143)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 6\
**Last updated:** [December 20, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/faster-enumerator-each-by-rb-block-call-with-current-block/180143 "2009-12-20T18:54:36Z")

</div>

e$B1sF#$G$9!#e(B e$B8=:\_$Ne(B Enumerator#each e$B$O!"e(B1 e$B2s$N%V%m%C%/8F$S=P$7$Ge(B 2 e$B2sJ,$Ne(B yield e$B$r\<B9Te(B e$B$7$F$$$^$9!#e(B Enumerator#each e$B$,85$N%a%=%C%I$re(B rb\_block\_call e$B$G8F$Ve(B (e$B$3$N…

---

## [\[ANN\] Linux network appliances managed via Sinatra](https://www.ruby-forum.com/t/ann-linux-network-appliances-managed-via-sinatra/180500)

<div class="topic-metadata">

**Author:** [@gderosa](https://www.ruby-forum.com/u/gderosa)\
**Replies:** 3\
**Last updated:** [December 20, 2009, 6:09pm UTC](https://www.ruby-forum.com/t/ann-linux-network-appliances-managed-via-sinatra/180500 "2009-12-20T18:09:33Z")

</div>

Hi all, just to announce the first release or Ruby “OnBoard”, a web interface based on Sinatra, to manage Linux-based network appliances: routers, firewalls, VPN, DHCP server, transparent proxy and so on. Here’s the …

---

## [Kramdown 0.3.0 released](https://www.ruby-forum.com/t/kramdown-0-3-0-released/180499)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [December 20, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/kramdown-0-3-0-released/180499 "2009-12-20T16:25:56Z")

</div>

About kramdown kramdown (sic, not Kramdown or KramDown, just kramdown) is a free GPL-licensed Ruby library for parsing a superset of Markdown. It is completely written in Ruby, supports standard Markdown (with some m…

---

## [Regex question](https://www.ruby-forum.com/t/regex-question/180492)

<div class="topic-metadata">

**Author:** [@katz](https://www.ruby-forum.com/u/katz)\
**Replies:** 5\
**Last updated:** [December 20, 2009, 12:37pm UTC](https://www.ruby-forum.com/t/regex-question/180492 "2009-12-20T12:37:41Z")

</div>

irb(main):113:0\> /l{2}x/ =~ 'llx' =\> 0 irb(main):109:0\> /(lo){2}/ =~ 'lolo' =\> 0 irb(main):110:0\> /(lo){2}x/ =~ 'lolox' =\> nil irb(main):111:0\> /(?:lo){2}x/ =~ 'lolox' =\> 0 Note the third command returned nil but the fou…

---

## [Ruby in twenty minutes not work](https://www.ruby-forum.com/t/ruby-in-twenty-minutes-not-work/180481)

<div class="topic-metadata">

**Author:** [@hazal](https://www.ruby-forum.com/u/hazal)\
**Replies:** 5\
**Last updated:** [December 20, 2009, 5:04am UTC](https://www.ruby-forum.com/t/ruby-in-twenty-minutes-not-work/180481 "2009-12-20T05:04:43Z")

</div>

in ruby offical site two links doesnot work.do you know reasons? 1- ruby in 20 minutes second page not open. 2 - tryruby.hobix.com : not open . i could open it 1 month ago. but during tutorial i couldnot write square …

---

## [Ruby 1.8.7 + Tk8.5 with Windows-RubyInstaller](https://www.ruby-forum.com/t/ruby-1-8-7-tk8-5-with-windows-rubyinstaller/180354)

<div class="topic-metadata">

**Author:** [@axel](https://www.ruby-forum.com/u/axel)\
**Replies:** 7\
**Last updated:** [December 20, 2009, 4:17am UTC](https://www.ruby-forum.com/t/ruby-1-8-7-tk8-5-with-windows-rubyinstaller/180354 "2009-12-20T04:17:53Z")

</div>

Hi, below you will find what I wrote down about how I got the “new” Windows-RubyInstaller with Ruby 1.8.7 + TK8.5 working. Please feel free to post any comments, corrections, suggestions, … A German version follows a…

---

## [Simple one](https://www.ruby-forum.com/t/simple-one/180372)

<div class="topic-metadata">

**Author:** [@beny18241](https://www.ruby-forum.com/u/beny18241)\
**Replies:** 5\
**Last updated:** [December 20, 2009, 3:59am UTC](https://www.ruby-forum.com/t/simple-one/180372 "2009-12-20T03:59:07Z")

</div>

Hi, As i wanted to make some kind of test.I have one simple question in example below, if user puts enter , he will recive info “make a choice” How to make if user push enter twice he will recive second info “make a …

---

## [Error loading "mysqlplus" under Ruby1.9.1](https://www.ruby-forum.com/t/error-loading-mysqlplus-under-ruby1-9-1/180327)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 5\
**Last updated:** [December 20, 2009, 3:56am UTC](https://www.ruby-forum.com/t/error-loading-mysqlplus-under-ruby1-9-1/180327 "2009-12-20T03:56:35Z")

</div>

Hi, I’ve ruby1.8.7 and 1.9.1 installed. In both I’ve the gems: mysql (2.8.1) mysqlplus (0.1.1) When I require mysqlplus in 1.8 it is correctly loaded. However in Ruby 1.9 I get this error: LoadError: error loading m…

---

## [Glassfish gem servlet sessions](https://www.ruby-forum.com/t/glassfish-gem-servlet-sessions/180487)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 1\
**Last updated:** [December 20, 2009, 1:39am UTC](https://www.ruby-forum.com/t/glassfish-gem-servlet-sessions/180487 "2009-12-20T01:39:51Z")

</div>

Does glassfish gem support servlet sessions with Rails? If so, what’s the best way to enable it? I’ve seen Nick’s JavaServletSession, but at first glance that looks to be for warbled apps.

---

## [How to put File lines into postgres query(pg)](https://www.ruby-forum.com/t/how-to-put-file-lines-into-postgres-query-pg/180485)

<div class="topic-metadata">

**Author:** [@beny18241](https://www.ruby-forum.com/u/beny18241)\
**Replies:** 0\
**Last updated:** [December 19, 2009, 10:05pm UTC](https://www.ruby-forum.com/t/how-to-put-file-lines-into-postgres-query-pg/180485 "2009-12-19T22:05:40Z")

</div>

Hi, I have a script which parsing some xml files(works great :)) File.open(file).each do |line| if line =~ /prf:CcppAccept/…line =~ /\</prf:CcppAccept\>/ if line =~ /rdf:li(image|audio|video).\*\</rdf:li\>/ line.gsub( …

---

## [Encapsulating Information and Behavior without State](https://www.ruby-forum.com/t/encapsulating-information-and-behavior-without-state/180338)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 8\
**Last updated:** [December 19, 2009, 10:03pm UTC](https://www.ruby-forum.com/t/encapsulating-information-and-behavior-without-state/180338 "2009-12-19T22:03:11Z")

</div>

This should prove an interesting topic. I am currently debating two potential means of implementing the same thing. What I have are sets of methods and data that I need to encapsulate in one fashion or another --lets …

---

## [Rcov::HTMLCoverage how-to?](https://www.ruby-forum.com/t/rcov-htmlcoverage-how-to/180484)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 0\
**Last updated:** [December 19, 2009, 9:52pm UTC](https://www.ruby-forum.com/t/rcov-htmlcoverage-how-to/180484 "2009-12-19T21:52:04Z")

</div>

Putting Rcov to work in program, the FAQ gives the following as the basic procedure: require ‘rcov’ rcov\_analyzer = Rcov::CodeCoverageAnalyzer.new at\_exit do rcov\_analyzer.remove\_hook rcov\_analyzer.dump\_coverage\_in…

---

## [Math errors](https://www.ruby-forum.com/t/math-errors/180352)

<div class="topic-metadata">

**Author:** [@jzakiya](https://www.ruby-forum.com/u/jzakiya)\
**Replies:** 16\
**Last updated:** [December 19, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/math-errors/180352 "2009-12-19T19:49:07Z")

</div>

(-3)\*\*3 =\> -27 (-27)\*\*(1/3.0) give NaN instead of -3 All odd roots (1/3,1/5,1/7 etc) of negative numbers should give negative root values, as above, but ruby (in irb) gives NaN (not a number), even when I require ‘c…

---

## [Spreadsheet gem -- way to work with a subset of rows?](https://www.ruby-forum.com/t/spreadsheet-gem-way-to-work-with-a-subset-of-rows/180476)

<div class="topic-metadata">

**Author:** [@jtoly](https://www.ruby-forum.com/u/jtoly)\
**Replies:** 0\
**Last updated:** [December 19, 2009, 6:06pm UTC](https://www.ruby-forum.com/t/spreadsheet-gem-way-to-work-with-a-subset-of-rows/180476 "2009-12-19T18:06:48Z")

</div>

The spreadsheet I’m trying to ingest is quite large, so I tried what works with arrays: sheet\[1…20\].each do |foo| . . end But that results in an error, wrong number of arguments (1 for 2) Has anyone else come up w…

---

## [Ruby 1.9 - US-ASCII vs UTF-8](https://www.ruby-forum.com/t/ruby-1-9-us-ascii-vs-utf-8/180391)

<div class="topic-metadata">

**Author:** [@valafar](https://www.ruby-forum.com/u/valafar)\
**Replies:** 2\
**Last updated:** [December 19, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/ruby-1-9-us-ascii-vs-utf-8/180391 "2009-12-19T16:42:24Z")

</div>

So I have source files that contain unicode chars. Do I really have to put “# encoding: utf-8” at the beginning of every one of these files, or can I somehow make ruby treat all files by default as utf-8? If I can, do…

---

## [Grep a block](https://www.ruby-forum.com/t/grep-a-block/180368)

<div class="topic-metadata">

**Author:** [@beny18241](https://www.ruby-forum.com/u/beny18241)\
**Replies:** 4\
**Last updated:** [December 19, 2009, 3:19pm UTC](https://www.ruby-forum.com/t/grep-a-block/180368 "2009-12-19T15:19:28Z")

</div>

Hi, Please can anybody tell how to grep a block? between 2 string i had few lines of code example: mms:MmsCcppAccept 1 2 3 4 5 \</mms:MmsCcppAccept\> i’ve tried that way but its not working, see below my code: …

---

## [Newbie Question: Blocks and Parameters](https://www.ruby-forum.com/t/newbie-question-blocks-and-parameters/180218)

<div class="topic-metadata">

**Author:** [@lofye](https://www.ruby-forum.com/u/lofye)\
**Replies:** 7\
**Last updated:** [December 19, 2009, 8:15am UTC](https://www.ruby-forum.com/t/newbie-question-blocks-and-parameters/180218 "2009-12-19T08:15:40Z")

</div>

Hi Guys, Please have patience with my possibly basic basic question. I am learning Ruby and studying blocks/closures right now and confused without being able to find an answer. I was studying and first came across…

---

## [Very noob question about class variables](https://www.ruby-forum.com/t/very-noob-question-about-class-variables/180388)

<div class="topic-metadata">

**Author:** [@angel](https://www.ruby-forum.com/u/angel)\
**Replies:** 1\
**Last updated:** [December 19, 2009, 7:19am UTC](https://www.ruby-forum.com/t/very-noob-question-about-class-variables/180388 "2009-12-19T07:19:00Z")

</div>

Hi…I’m learning rub…I know a bit about Python but I’m interested in use rails…I made a little program but this has a little bug too…for simplify this I dont post the program but I post a example if I declare var=‘hi’ …

---

## [Error Running Fitnesse Tests on the Fitnesse Server](https://www.ruby-forum.com/t/error-running-fitnesse-tests-on-the-fitnesse-server/180383)

<div class="topic-metadata">

**Author:** [@arti\_singh](https://www.ruby-forum.com/u/arti_singh)\
**Replies:** 0\
**Last updated:** [December 18, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/error-running-fitnesse-tests-on-the-fitnesse-server/180383 "2009-12-18T23:12:49Z")

</div>

I created a folder under C:/Data/Ruby called Fitnesse1 and placed my Login.rb file in that folder in Login.rb,I placed the following information module Fitnesse1 class Login \< Fit::ActionFixture p1 = LoginTest.new…

---

## [Process.waitpid(external pid)](https://www.ruby-forum.com/t/process-waitpid-external-pid/180308)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [December 18, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/process-waitpid-external-pid/180308 "2009-12-18T23:06:11Z")

</div>

Anybody know of a way in ruby to #waitpid on a non child process? irb(main):001:0\> Process.waitpid 32550 Errno::ECHILD: No child processes \[this is possible in doze with the win32-process gem, wondering about linux n…

---

## [Uninitialized constant Test error when running Fitnisse ruby](https://www.ruby-forum.com/t/uninitialized-constant-test-error-when-running-fitnisse-ruby/180374)

<div class="topic-metadata">

**Author:** [@arti\_singh](https://www.ruby-forum.com/u/arti_singh)\
**Replies:** 2\
**Last updated:** [December 18, 2009, 10:59pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-test-error-when-running-fitnisse-ruby/180374 "2009-12-18T22:59:26Z")

</div>

has anyone seen this error before? I have no idea on how to fix I have all but exhausted myself looking for the solutions to this uninitialized constant Test C:/Documents and Settings/asingh/Desktop/QA/oriontests/ori…

---

## [Stupid TK](https://www.ruby-forum.com/t/stupid-tk/180371)

<div class="topic-metadata">

**Author:** [@Philliam\_A](https://www.ruby-forum.com/u/Philliam_A)\
**Replies:** 2\
**Last updated:** [December 18, 2009, 10:47pm UTC](https://www.ruby-forum.com/t/stupid-tk/180371 "2009-12-18T22:47:26Z")

</div>

Can anyone please give me a compiled version of Tk 8.4? I have Tk 8.5 but Ruby doesn’t work with that version, and I can’t figure out how to compile it. I am running Windows XP.

---

## [How to reopen the puts method](https://www.ruby-forum.com/t/how-to-reopen-the-puts-method/180377)

<div class="topic-metadata">

**Author:** [@b1gtuna](https://www.ruby-forum.com/u/b1gtuna)\
**Replies:** 3\
**Last updated:** [December 18, 2009, 9:55pm UTC](https://www.ruby-forum.com/t/how-to-reopen-the-puts-method/180377 "2009-12-18T21:55:50Z")

</div>

I am looking for some additional detail regarding the puts method. Hows does the basic puts method work? module Kernel def self.puts text $stdout.puts “New\_Text” end end the following code doesn’t actually call t…

---

## [Setting Windows Enviroment in Ruby Script](https://www.ruby-forum.com/t/setting-windows-enviroment-in-ruby-script/180375)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 3\
**Last updated:** [December 18, 2009, 9:55pm UTC](https://www.ruby-forum.com/t/setting-windows-enviroment-in-ruby-script/180375 "2009-12-18T21:55:14Z")

</div>

I need to set the following windows environment variable at the beginning of my script: set http\_proxy=http://10.1.1.1:8080 This works from the command line if I run this command from the CLI right before I run my sc…

---

## [Problem requiring gems under 1.9.1 mingw](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359)

<div class="topic-metadata">

**Author:** [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Replies:** 5\
**Last updated:** [December 18, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359 "2009-12-18T18:28:25Z")

</div>

I have both 1.8.6 and 1.9.1 (both mingw under windows). My code requires windows-api, which requires win32-api. It works under 1.8. Under 1.9, I get : F:/Ruby19/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/a…

---

## [Some questions about sockets](https://www.ruby-forum.com/t/some-questions-about-sockets/180364)

<div class="topic-metadata">

**Author:** [@tutiplain](https://www.ruby-forum.com/u/tutiplain)\
**Replies:** 2\
**Last updated:** [December 18, 2009, 6:01pm UTC](https://www.ruby-forum.com/t/some-questions-about-sockets/180364 "2009-12-18T18:01:50Z")

</div>

Hi all, I am practicing socket programming in Ruby, and I have some questions. Hopefully someone here might be able to clarify them for me: Must a connection always be from a TCPServer to a TCPSocket? Can there be…

[Previous page](https://www.ruby-forum.com/c/ruby/7.md?page=686)

[Next page](https://www.ruby-forum.com/c/ruby/7.md?page=688)
