# Ruby

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

[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:** 973

---

## [JRuby 1.1.5 + BSF: local variables no longer persist between calls to eval()](https://www.ruby-forum.com/t/jruby-1-1-5-bsf-local-variables-no-longer-persist-between-calls-to-eval/152573)

<div class="topic-metadata">

**Author:** [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Replies:** 3\
**Last updated:** [November 9, 2008, 1:18am UTC](https://www.ruby-forum.com/t/jruby-1-1-5-bsf-local-variables-no-longer-persist-between-calls-to-eval/152573 "2008-11-09T01:18:20Z")

</div>

I am embedding JRuby in an environment where I allow for interactive evaluation of scripts. It’s similar to irb, but implemented in Java so I am making repeated eval() calls to Ruby from the Java side. Up until now I …

---

## [Tips for Ruby Sprint](https://www.ruby-forum.com/t/tips-for-ruby-sprint/152794)

<div class="topic-metadata">

**Author:** [@Edgardo\_H](https://www.ruby-forum.com/u/Edgardo_H)\
**Replies:** 3\
**Last updated:** [November 9, 2008, 12:40am UTC](https://www.ruby-forum.com/t/tips-for-ruby-sprint/152794 "2008-11-09T00:40:19Z")

</div>

Hi guys, In a couple of weeks I’ll be leading a course on Ruby in my company. On the last two sessions (about four hours), I’d like to conduct a brief coding sprint so the students can practice what they learned writ…

---

## [Newbie install problem](https://www.ruby-forum.com/t/newbie-install-problem/152881)

<div class="topic-metadata">

**Author:** [@Terry\_Carmen](https://www.ruby-forum.com/u/Terry_Carmen)\
**Replies:** 3\
**Last updated:** [November 8, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/newbie-install-problem/152881 "2008-11-08T23:45:53Z")

</div>

Could somene take a moment and translate this into English for me? I’m trying to install NorfelloCMMS, which runs on Ruby/Rails, and the prerequisites instructions say to run: gem install rmagick gettext libxml-ruby W…

---

## [FasterCSV joining rows?](https://www.ruby-forum.com/t/fastercsv-joining-rows/152874)

<div class="topic-metadata">

**Author:** [@krisw](https://www.ruby-forum.com/u/krisw)\
**Replies:** 1\
**Last updated:** [November 8, 2008, 10:47pm UTC](https://www.ruby-forum.com/t/fastercsv-joining-rows/152874 "2008-11-08T22:47:17Z")

</div>

I was wondering if anyone could point me in the right direction for solving the following problem: I am appending to a csv every time a database change is made in a Rails app I am working on. I would like to join the…

---

## [String Problems?](https://www.ruby-forum.com/t/string-problems/152880)

<div class="topic-metadata">

**Author:** [@jearb](https://www.ruby-forum.com/u/jearb)\
**Replies:** 3\
**Last updated:** [November 8, 2008, 9:33pm UTC](https://www.ruby-forum.com/t/string-problems/152880 "2008-11-08T21:33:53Z")

</div>

There is probably an easy answer to this, but I need help. Recently I’ve started making a text-based adventure game in Ruby, and so far it’s going very well. One problem I’m having, though, is that whenever I use puts…

---

## [Un 1.0.0 Released](https://www.ruby-forum.com/t/un-1-0-0-released/152848)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 7\
**Last updated:** [November 8, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/un-1-0-0-released/152848 "2008-11-08T21:24:36Z")

</div>

un version 1.0.0 has been released! http://rubyforge.org/projects/seattlerb un provides unextend and uninclude to allow for a better prototype-oriented programming experience. Changes: 1.0.0 / 2008-11-07 1 major…

---

## [Is there a gem command to open up the rdoc for a particular gem in the default browser at the index](https://www.ruby-forum.com/t/is-there-a-gem-command-to-open-up-the-rdoc-for-a-particular-gem-in-the-default-browser-at-the-index/152860)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [November 8, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/is-there-a-gem-command-to-open-up-the-rdoc-for-a-particular-gem-in-the-default-browser-at-the-index/152860 "2008-11-08T21:11:41Z")

</div>

Hi, Is there a gem command to open up the rdoc for a particular gem in the default browser at the index page??? e.g. something like “gem rdoc rspec”, and this would open up firefox at the index.html page of the rspe…

---

## [Named scope lambda string substitution problem](https://www.ruby-forum.com/t/named-scope-lambda-string-substitution-problem/152804)

<div class="topic-metadata">

**Author:** [@jdwy](https://www.ruby-forum.com/u/jdwy)\
**Replies:** 6\
**Last updated:** [November 8, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/named-scope-lambda-string-substitution-problem/152804 "2008-11-08T20:11:08Z")

</div>

Sorry for a cross post with rails, but I think this may be more of a ruby question (or rails’s impl?). I have a complex named scope like the following. named\_scope :foo, lambda {|foo, bar| foo.each do |d| #foo = “th…

---

## [Showing a spinner?](https://www.ruby-forum.com/t/showing-a-spinner/152500)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 12\
**Last updated:** [November 8, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/showing-a-spinner/152500 "2008-11-08T17:32:29Z")

</div>

How do I show a spinner on the command line interface when a ruby script is working? I sometimes write things that take a while, and I know I get impatient when all I see a blinking cursor :slight\_smile: A spinner has…

---

## [Ruby Battleship Sparring Tournament](https://www.ruby-forum.com/t/ruby-battleship-sparring-tournament/196839)

<div class="topic-metadata">

**Author:** [@slagyr](https://www.ruby-forum.com/u/slagyr)\
**Replies:** 0\
**Last updated:** [November 8, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/ruby-battleship-sparring-tournament/196839 "2008-11-08T17:07:35Z")

</div>

Yesterday I gave a talk at RubyConf where I announced the commencement of the Ruby Battleship Sparring Tournament. If you’ve got an itch to test your ruby skills, participate! http://sparring.rubyforge.org/ Micah

---

## [Ruby Battleship Sparring Tournament](https://www.ruby-forum.com/t/ruby-battleship-sparring-tournament/152871)

<div class="topic-metadata">

**Author:** [@slagyr](https://www.ruby-forum.com/u/slagyr)\
**Replies:** 0\
**Last updated:** [November 8, 2008, 5:06pm UTC](https://www.ruby-forum.com/t/ruby-battleship-sparring-tournament/152871 "2008-11-08T17:06:25Z")

</div>

Yesterday I gave a talk at RubyConf where I announced the commencement of the Ruby Battleship Sparring Tournament. If you’ve got an itch to test your ruby skills, participate! http://sparring.rubyforge.org/ Micah T…

---

## [A bug of the monkey patch for REXML](https://www.ruby-forum.com/t/a-bug-of-the-monkey-patch-for-rexml/152869)

<div class="topic-metadata">

**Author:** [@Shugo\_M](https://www.ruby-forum.com/u/Shugo_M)\
**Replies:** 0\
**Last updated:** [November 8, 2008, 5:02pm UTC](https://www.ruby-forum.com/t/a-bug-of-the-monkey-patch-for-rexml/152869 "2008-11-08T17:02:54Z")

</div>

Hi, A bug of the monkey patch to fix the DoS vulenerability in REXML has been discovered. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502535 This is not a vulnerability, but I have fixed the monkey patch. http:…

---

## [RubyConf talk details?](https://www.ruby-forum.com/t/rubyconf-talk-details/152601)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 4\
**Last updated:** [November 8, 2008, 5:02pm UTC](https://www.ruby-forum.com/t/rubyconf-talk-details/152601 "2008-11-08T17:02:19Z")

</div>

In just over 24 hours we’ll be readying up for Matz to hit the stage to open up RubyConf and shortly thereafter JRuby will have Room 3 for 45 minutes. But I’m in a bit of a dilemma, the other two scheduled talks sound …

---

## [How to make REXML respect &nbsp; (in 1.9)](https://www.ruby-forum.com/t/how-to-make-rexml-respect-nbsp-in-1-9/152864)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [November 8, 2008, 3:16pm UTC](https://www.ruby-forum.com/t/how-to-make-rexml-respect-nbsp-in-1-9/152864 "2008-11-08T15:16:16Z")

</div>

Rubies: This fails on the second line… REXML::Document.new('\<b\>&amp;\</b\>') REXML::Document.new('\<b\>&nbsp;\</b\>') …with Undeclared entity ’ ’ If I make that real XHTML, with a DOCTYPE and a html xmlns="…xhtml", it st…

---

## [Problems installing wordnet 0.0.5 on Ubuntu](https://www.ruby-forum.com/t/problems-installing-wordnet-0-0-5-on-ubuntu/152863)

<div class="topic-metadata">

**Author:** [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Replies:** 0\
**Last updated:** [November 8, 2008, 2:44pm UTC](https://www.ruby-forum.com/t/problems-installing-wordnet-0-0-5-on-ubuntu/152863 "2008-11-08T14:44:38Z")

</div>

Hi all, I got this error trying to install wordnet: root@castor-laptop:/home/castor# gem install wordnet --remote Successfully installed wordnet-0.0.5 1 gem installed Installing ri documentation for wordnet-0.0.5… …

---

## [Array.equal?](https://www.ruby-forum.com/t/array-equal/152799)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 13\
**Last updated:** [November 8, 2008, 2:13pm UTC](https://www.ruby-forum.com/t/array-equal/152799 "2008-11-08T14:13:01Z")

</div>

Hello All, I am not sure where to ask this, but someone after reading this can tell me more. I am trying to right a functions where I am comparing 2 arrays. Here is an example. a = \[1,1\] b = \[1,1\] in the irb, I ex…

---

## [Building Ruby 1.9.1 pre fails on windows](https://www.ruby-forum.com/t/building-ruby-1-9-1-pre-fails-on-windows/152858)

<div class="topic-metadata">

**Author:** [@okiess](https://www.ruby-forum.com/u/okiess)\
**Replies:** 0\
**Last updated:** [November 8, 2008, 11:22am UTC](https://www.ruby-forum.com/t/building-ruby-1-9-1-pre-fails-on-windows/152858 "2008-11-08T11:22:27Z")

</div>

Hello, I come to the step where I am told to run nmake. Running nmake yields: -I./.. ./../tool/compile\_prelude.rb ./../prelude.rb miniprelude.c ‘-I.’ is not recognized as an internal or external command, oper…

---

## [\[Bug:1.9\] reading after EOF with textmode](https://www.ruby-forum.com/t/bug-1-9-reading-after-eof-with-textmode/151950)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 1\
**Last updated:** [November 8, 2008, 10:08am UTC](https://www.ruby-forum.com/t/bug-1-9-reading-after-eof-with-textmode/151950 "2008-11-08T10:08:49Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B e$B%F%-%9%H%b!\<%I;~$K0lEYe(BEOFe$B$KE~C#$9$k$H!“e(Brewinde$B$de(Bseeke$B$G%\]%$%s%?e(B e$B$r0\\F0$9$k$H$+?7$7$$%G!\<%?$,E~C#$9$k$H$+$7$F$b!“e(BEOFe$B\>uBV$+$iC&e(B e$B=P$G$…

---

## [\[Bug:1.9\] replacing array during sort may make assertion fail](https://www.ruby-forum.com/t/bug-1-9-replacing-array-during-sort-may-make-assertion-fail/152044)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [November 8, 2008, 10:01am UTC](https://www.ruby-forum.com/t/bug-1-9-replacing-array-during-sort-may-make-assertion-fail/152044 "2008-11-08T10:01:13Z")

</div>

e$B1sF#$G$9!#e(B e$B0J2\<$N$h$&$K$9$k$He(B assert e$B$,\<:GT$7$^$9!#e(B $ ./ruby -e ‘a = \[4,3,2,1\]; a.sort! {|x,y| a.replace(\[\]); x \<=\> y }’ ruby: array.c:1755: rb\_ary\_sort\_bang: Assertion \`(((void) ((!((!(((VALUE)(tmp…

---

## [\[Bug #667\](Closed) yaml $B$,(B Complex$B!"(BRational $B$r$&$^$/$"$D$+$($F$$$J$$(B](https://www.ruby-forum.com/t/bug-667-closed-yaml-b-b-complex-b-brational-b-r-d-f-j-b/152853)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 0\
**Last updated:** [November 8, 2008, 10:00am UTC](https://www.ruby-forum.com/t/bug-667-closed-yaml-b-b-complex-b-brational-b-r-d-f-j-b/152853 "2008-11-08T10:00:03Z")

</div>

e$B%A%1%C%He(B #667 e$B$,99?7$5$l$^$7$?!#e(B (by Yukihiro M.) e$B%9%F!\<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B fixed by r20126 http://redmine.ruby-lang.org/issues/show/667

---

## [Rubyscript2exe (sorry, I know) gem won't work at all for me](https://www.ruby-forum.com/t/rubyscript2exe-sorry-i-know-gem-wont-work-at-all-for-me/152849)

<div class="topic-metadata">

**Author:** [@chutenro](https://www.ruby-forum.com/u/chutenro)\
**Replies:** 2\
**Last updated:** [November 8, 2008, 5:54am UTC](https://www.ruby-forum.com/t/rubyscript2exe-sorry-i-know-gem-wont-work-at-all-for-me/152849 "2008-11-08T05:54:09Z")

</div>

I’m on a Windows 2k3 machine with new (as of maybe 2 days ago) installs of Ruby and the rubyscript2exe gem. I installed the gem, but every time I try to run it I get this error: C:\\Documents and Settings\\Administrator…

---

## [Re\[jruby-user\] mote debugging as in Java for JRuby?](https://www.ruby-forum.com/t/re-jruby-user-mote-debugging-as-in-java-for-jruby/152827)

<div class="topic-metadata">

**Author:** [@drrs](https://www.ruby-forum.com/u/drrs)\
**Replies:** 2\
**Last updated:** [November 8, 2008, 5:39am UTC](https://www.ruby-forum.com/t/re-jruby-user-mote-debugging-as-in-java-for-jruby/152827 "2008-11-08T05:39:50Z")

</div>

Cannot do something like this: set JAVA\_DEBUG=-Xrunjdwp:transport=dt\_socket,server=y,suspend=n,address=4000 -Xdebug call jruby %JAVA\_DEBUG% -d jmdi.rb We get: jruby: invalid extended option runjdwp:transport=dt\_s…

---

## [Segmentation fault with ld-2.6.so](https://www.ruby-forum.com/t/segmentation-fault-with-ld-2-6-so/152774)

<div class="topic-metadata">

**Author:** [@Martin\_JSBrownS\_Jr](https://www.ruby-forum.com/u/Martin_JSBrownS_Jr)\
**Replies:** 3\
**Last updated:** [November 8, 2008, 5:23am UTC](https://www.ruby-forum.com/t/segmentation-fault-with-ld-2-6-so/152774 "2008-11-08T05:23:26Z")

</div>

Suddenly, all my ruby apps, even the most basic, are seg faulting. from /var/log/messages… Nov 6 23:42:54 localhost ruby\[5439\] general protection ip:7fed0d030608 sp:a7c7ad30fcdba2eb error:0 in ld-2.6.so\[7fed0d01d000+…

---

## [Ruby has a Face that it wears on its feet](https://www.ruby-forum.com/t/ruby-has-a-face-that-it-wears-on-its-feet/152628)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 16\
**Last updated:** [November 8, 2008, 3:37am UTC](https://www.ruby-forum.com/t/ruby-has-a-face-that-it-wears-on-its-feet/152628 "2008-11-08T03:37:04Z")

</div>

In my opinion, Ruby’s official face should be Shoes. Shoes gives Ruby a face by adding a simple GUI toolkit. I have been an advocate for Tk for as long as I have been using Ruby, because of its ease at picking up for …

---

## [Trying to Use "request\_pty" Channel Never Closes](https://www.ruby-forum.com/t/trying-to-use-request-pty-channel-never-closes/152511)

<div class="topic-metadata">

**Author:** [@scoobycoder](https://www.ruby-forum.com/u/scoobycoder)\
**Replies:** 9\
**Last updated:** [November 8, 2008, 1:03am UTC](https://www.ruby-forum.com/t/trying-to-use-request-pty-channel-never-closes/152511 "2008-11-08T01:03:50Z")

</div>

I’m trying to interact with a RF Terminal application. But each time I run this, it returns nothing from stdout, and just hangs irb. I’ve been banging my head on this one for a couple days, because it seems right, b…

---

## [Re: Updated IronRuby / Mono install](https://www.ruby-forum.com/t/re-updated-ironruby-mono-install/152835)

<div class="topic-metadata">

**Author:** [@jose\_d](https://www.ruby-forum.com/u/jose_d)\
**Replies:** 2\
**Last updated:** [November 8, 2008, 12:18am UTC](https://www.ruby-forum.com/t/re-updated-ironruby-mono-install/152835 "2008-11-08T00:18:10Z")

</div>

Seo, Here are the steps that I’ve taken on my Mac: downloaded and installed the latest Mono binary for Mac revert to rev112 of IronRuby on svn curl "http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-mono-r1…

---

## [Parsing HTML using regexes and arrays](https://www.ruby-forum.com/t/parsing-html-using-regexes-and-arrays/152834)

<div class="topic-metadata">

**Author:** [@soldier.coder](https://www.ruby-forum.com/u/soldier.coder)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 11:36pm UTC](https://www.ruby-forum.com/t/parsing-html-using-regexes-and-arrays/152834 "2008-11-07T23:36:02Z")

</div>

I have a nice little regex to pull the information rich guts from a table… %r{\</thead.?\>(.?)}m =~html $1 now contains all the rows of the table as one long string. I’d like to turn that into an array of rows, but I am…

---

## [Irb and ruby giving different results](https://www.ruby-forum.com/t/irb-and-ruby-giving-different-results/152555)

<div class="topic-metadata">

**Author:** [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Replies:** 7\
**Last updated:** [November 7, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/irb-and-ruby-giving-different-results/152555 "2008-11-07T23:12:42Z")

</div>

in IRB, ASCII = (0…255).map{|c| c.chr } PRINTABLE = ASCII.grep(/\[\[:print:\]\]/) PRINTABLE.length 191 However, inside the ruby program PRINTABLE.length only gives 95 !! ??? #!/opt/local/bin/ruby ASCII =…

---

## [How can I use hpricot with proxy and provide username info?](https://www.ruby-forum.com/t/how-can-i-use-hpricot-with-proxy-and-provide-username-info/152837)

<div class="topic-metadata">

**Author:** [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 10:55pm UTC](https://www.ruby-forum.com/t/how-can-i-use-hpricot-with-proxy-and-provide-username-info/152837 "2008-11-07T22:55:41Z")

</div>

Hi. I am using hpricot, but I want to send this through a proxy server. I’ve used mechanize through a proxy without a problem, but I don’t need it for this code. Currently I have doc = Hpricot(open(location, :proxy …

---

## [Finding gaps in a sorted sequence](https://www.ruby-forum.com/t/finding-gaps-in-a-sorted-sequence/152715)

<div class="topic-metadata">

**Author:** [@moredip](https://www.ruby-forum.com/u/moredip)\
**Replies:** 9\
**Last updated:** [November 7, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/finding-gaps-in-a-sorted-sequence/152715 "2008-11-07T22:45:33Z")

</div>

Hi Folks, Given a sorted enumeration I need to find the first gap in a sequence. e.g. 3 == find\_gap \[1,2,4,5\] nil == find\_gap \[1,2,3,4\] Here’s the best I can come up with def first\_gap( seq ) seq.each\_cons(2) do |…

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

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