# Ruby

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

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

---

## [Sort double-dimensional array by column](https://www.ruby-forum.com/t/sort-double-dimensional-array-by-column/117020)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 5\
**Last updated:** [October 13, 2007, 12:28am UTC](https://www.ruby-forum.com/t/sort-double-dimensional-array-by-column/117020 "2007-10-13T00:28:37Z")

</div>

Hi, I have a \[m X n\] double-dimensional array in Ruby and I’m trying to sort the entries (rows) by the 6-th column, which is a DateTime object. Things get a little bit complicated, since I might have a nil value in t…

---

## [Ruby-opengl on Mac OS X](https://www.ruby-forum.com/t/ruby-opengl-on-mac-os-x/115056)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 6\
**Last updated:** [October 13, 2007, 12:23am UTC](https://www.ruby-forum.com/t/ruby-opengl-on-mac-os-x/115056 "2007-10-13T00:23:21Z")

</div>

All: Pardon this noobish question. I’m trying to bring up ruby-opengl on my Mac OS X (v 10.4.10). I ran “sudo gem install ruby-opengl” without any trouble – gem announced that it was loading ruby-opengl 0.40.1 as wel…

---

## [Why does this use a block](https://www.ruby-forum.com/t/why-does-this-use-a-block/116926)

<div class="topic-metadata">

**Author:** [@anonymous](https://www.ruby-forum.com/u/anonymous)\
**Replies:** 12\
**Last updated:** [October 13, 2007, 12:17am UTC](https://www.ruby-forum.com/t/why-does-this-use-a-block/116926 "2007-10-13T00:17:30Z")

</div>

So I’m new to Ruby and I’m trying to use OptionParser to parse in some command line arguments. I looked at some documentation on OptionParser and there is something that’s confusing me to no end. In all the examples a …

---

## [How to update a counter on a remote server via Ruby?](https://www.ruby-forum.com/t/how-to-update-a-counter-on-a-remote-server-via-ruby/117098)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/how-to-update-a-counter-on-a-remote-server-via-ruby/117098 "2007-10-12T23:56:42Z")

</div>

I have lots of users running my ruby scripts. I have one script in particular, I am certain, has at least 10,000 people running it. Could be upwards of 20,000 people running it. Some might run it every day, others…

---

## [Array +=](https://www.ruby-forum.com/t/array/117049)

<div class="topic-metadata">

**Author:** [@sijomo](https://www.ruby-forum.com/u/sijomo)\
**Replies:** 7\
**Last updated:** [October 12, 2007, 9:34pm UTC](https://www.ruby-forum.com/t/array/117049 "2007-10-12T21:34:55Z")

</div>

Hi All, Question re Array method += and a = \[\] =\> \[\] a += \[1, 2, 3, 4\] =\> \[1, 2, 3, 4\] And (a ||= \[\]) \<\< \[1, 2, 3, 4\] =\> \[\[1, 2, 3, 4\]\] But ( a ||= \[\] ) += \[ 1, 2, 3, 4 \] SyntaxError: compile error …

---

## [Adding array of numbers](https://www.ruby-forum.com/t/adding-array-of-numbers/116231)

<div class="topic-metadata">

**Author:** [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Replies:** 5\
**Last updated:** [October 12, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/adding-array-of-numbers/116231 "2007-10-12T21:30:04Z")

</div>

Given a file that looks like so: 7 ==\> training Set length 11 ==\> file length 1 0 0 0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 …

---

## [Luu trung hieu](https://www.ruby-forum.com/t/luu-trung-hieu/117079)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 1\
**Last updated:** [October 12, 2007, 7:24pm UTC](https://www.ruby-forum.com/t/luu-trung-hieu/117079 "2007-10-12T19:24:57Z")

</div>

Who is Luu Trung Hieu? Why are all of the messages from this person suspiciously spam like with no text other than a link?

---

## [Problem with Gem](https://www.ruby-forum.com/t/problem-with-gem/116169)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 6\
**Last updated:** [October 12, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/problem-with-gem/116169 "2007-10-12T19:23:47Z")

</div>

I am trying to install support for SQLite using Gem but I get this error "Building native extensions. This could take a while… ERROR: While executing gem … (Gem::Installer::ExtensionBuildError) ERROR: Failed to buil…

---

## [Ignore printout](https://www.ruby-forum.com/t/ignore-printout/117021)

<div class="topic-metadata">

**Author:** [@Fredrik](https://www.ruby-forum.com/u/Fredrik)\
**Replies:** 8\
**Last updated:** [October 12, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/ignore-printout/117021 "2007-10-12T18:45:06Z")

</div>

I am using a compiled C-code in my Ruby program. The problem is that the C-code prints some messages that I don’t want to show in my Ruby program. What would be the best way to get rid of these printouts? I don’t want…

---

## [Text/Tag Cloud generation](https://www.ruby-forum.com/t/text-tag-cloud-generation/116975)

<div class="topic-metadata">

**Author:** [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Replies:** 5\
**Last updated:** [October 12, 2007, 6:34pm UTC](https://www.ruby-forum.com/t/text-tag-cloud-generation/116975 "2007-10-12T18:34:31Z")

</div>

I want to generate a â€œtext cloudâ€, except there are a couple things out of the ordinary I am doing with this. For one, it is not for view on the web, but rather offline use. Output to an image would be great, but …

---

## [SQLite3::SQLException: no such function: get\_zy\_string](https://www.ruby-forum.com/t/sqlite3-no-such-function-get-zy-string/117035)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 6:31pm UTC](https://www.ruby-forum.com/t/sqlite3-no-such-function-get-zy-string/117035 "2007-10-12T18:31:00Z")

</div>

with this script : require ‘sqlite3’ db = SQLite3::Database.new( “backpb.db” ) rows = db.execute( “select distinct UID, lastName, firstName, fullLastName from devicephonebook” ) rows.each { | row | db.execute( “UPD…

---

## [Re: Text/Tag Cloud generation](https://www.ruby-forum.com/t/re-text-tag-cloud-generation/117074)

<div class="topic-metadata">

**Author:** [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/re-text-tag-cloud-generation/117074 "2007-10-12T18:26:54Z")

</div>

Really, I am expecting it to be rather slow with how much data I am throwing at it. My worry is most of the tools I have seen store every “word” in memory. The dataset I am loading up is an experiment with using text …

---

## [DateTime confusion](https://www.ruby-forum.com/t/datetime-confusion/117059)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/datetime-confusion/117059 "2007-10-12T18:10:30Z")

</div>

Hello! Wondered if anyone could help… I’m trying to parse a datetime date = DateTime.parse(“200701011900”) Which gives me a datetime. When i print it, it gives: 2007-01-01T19:00:00+00:00=\> nil but when I try: prin…

---

## [RubyGems Installation Problem on Solaris 10](https://www.ruby-forum.com/t/rubygems-installation-problem-on-solaris-10/116889)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [October 12, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/rubygems-installation-problem-on-solaris-10/116889 "2007-10-12T17:55:49Z")

</div>

I’ve installed Ruby 1.8.6 on a Solaris 10 server without a problem. Trying to install RubyGems and get the following error: dev4# ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) \[sparc-solaris2.10\] dev4# ruby setup.rb …

---

## [JRuby and gems](https://www.ruby-forum.com/t/jruby-and-gems/117070)

<div class="topic-metadata">

**Author:** [@lesgrumels](https://www.ruby-forum.com/u/lesgrumels)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/jruby-and-gems/117070 "2007-10-12T17:42:22Z")

</div>

Hello I 'm trying to port a rails application in Jruby. But I have a problem with the gettext gems. I install the gem with : $JRUBY\_HOME/bin/gem install gettext And this is the error : Building native extensions.…

---

## [Sdfsf](https://www.ruby-forum.com/t/sdfsf/117067)

<div class="topic-metadata">

**Author:** [@luu\_trung\_hieu](https://www.ruby-forum.com/u/luu_trung_hieu)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 5:07pm UTC](https://www.ruby-forum.com/t/sdfsf/117067 "2007-10-12T17:07:43Z")

</div>

sdfs

---

## [Reliable multicasting](https://www.ruby-forum.com/t/reliable-multicasting/116990)

<div class="topic-metadata">

**Author:** [@Christoffer\_LernSSS](https://www.ruby-forum.com/u/Christoffer_LernSSS)\
**Replies:** 5\
**Last updated:** [October 12, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/reliable-multicasting/116990 "2007-10-12T17:03:40Z")

</div>

Does anyone know if anyone of the reliable multicasting protocols exist implemented in ruby? Actually what I am really looking for is something like JGroups implemented in a language-independent way. I mean jgroups pr…

---

## [How to delete specific characters from a string?](https://www.ruby-forum.com/t/how-to-delete-specific-characters-from-a-string/117008)

<div class="topic-metadata">

**Author:** [@Bazsl](https://www.ruby-forum.com/u/Bazsl)\
**Replies:** 15\
**Last updated:** [October 12, 2007, 3:14pm UTC](https://www.ruby-forum.com/t/how-to-delete-specific-characters-from-a-string/117008 "2007-10-12T15:14:34Z")

</div>

Is there really no method that allows me to delete N characters starting at position P from a string? I have looked (carefully I hope) through the String methods and did not see a way to do this. Thanks.

---

## [Feedback on new Path Library](https://www.ruby-forum.com/t/feedback-on-new-path-library/116964)

<div class="topic-metadata">

**Author:** [@pSCorey](https://www.ruby-forum.com/u/pSCorey)\
**Replies:** 6\
**Last updated:** [October 12, 2007, 2:11pm UTC](https://www.ruby-forum.com/t/feedback-on-new-path-library/116964 "2007-10-12T14:11:50Z")

</div>

I created a new Path library (http://pow.rubyforge.org) that combines a lot of the functionality of Dir, FileUtils, File and Pathname into one with a object centered approach. I’m looking for some feedback to see if p…

---

## [Patch for lib/rexml/document.rb@13607](https://www.ruby-forum.com/t/patch-for-lib-rexml-document-rb-13607/117048)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 12:30pm UTC](https://www.ruby-forum.com/t/patch-for-lib-rexml-document-rb-13607/117048 "2007-10-12T12:30:02Z")

</div>

e$B2!ED$H$$$$$^$9!#e(B e$BF|!9e(B ruby e$B$r3hMQ$5$;$FD:$$$F$\*$j$^$9!#e(B rexml e$B$Ne(B document e$B$Ke(B revert e$BITB-$,8+$D$+$j$^$7$F!"e(B e$B$=$N%Q%C%A$r$\*Aw$j$7$^$9!#e(B r11752 e$B$Ge(B transitive e$B"\*e(B tran…

---

## [Indexers and blocks?](https://www.ruby-forum.com/t/indexers-and-blocks/116752)

<div class="topic-metadata">

**Author:** [@pure](https://www.ruby-forum.com/u/pure)\
**Replies:** 9\
**Last updated:** [October 12, 2007, 9:56am UTC](https://www.ruby-forum.com/t/indexers-and-blocks/116752 "2007-10-12T09:56:36Z")

</div>

Hi, if I have an array-like class, is it possible to call the index with a block? class MyClass def find(key) return nil end def if (val = find(key)) return val else return yield(key) if block\_given? end en…

---

## [Child \< Parent \< Test::Unit::TestCase](https://www.ruby-forum.com/t/child-parent-test-testcase/117024)

<div class="topic-metadata">

**Author:** [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Replies:** 3\
**Last updated:** [October 12, 2007, 9:25am UTC](https://www.ruby-forum.com/t/child-parent-test-testcase/117024 "2007-10-12T09:25:35Z")

</div>

I just ran into a problem with Test::Unit exhibited by the two files below and the output of ‘ruby tc\_child.rb’: — tc\_child.rb — require ‘tc\_parent’ class ChildTest \< ParentTest def test\_one puts ‘test\_one called’ …

---

## [Ruby tk drawing a line](https://www.ruby-forum.com/t/ruby-tk-drawing-a-line/117023)

<div class="topic-metadata">

**Author:** [@Ed\_Redman](https://www.ruby-forum.com/u/Ed_Redman)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 6:43am UTC](https://www.ruby-forum.com/t/ruby-tk-drawing-a-line/117023 "2007-10-12T06:43:39Z")

</div>

I have a question concerning ruby/tk and drawing lines on a canvas. I tried to convert from a tcl program. Everything works fine except that the line when its thickness is large appears to be a series of short line se…

---

## [Data count problem in array](https://www.ruby-forum.com/t/data-count-problem-in-array/116859)

<div class="topic-metadata">

**Author:** [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 6:26am UTC](https://www.ruby-forum.com/t/data-count-problem-in-array/116859 "2007-10-12T06:26:07Z")

</div>

hi all, now i am facing problem with count, actually i need to count the data after spliting like this is my one data @aa=LINEDIA0000050000005705700697RCSHEPLER’S EXCLU100SHEPLER’S EXCLUSIVE6042142403SHEPLERS COGNAC …

---

## [Will #in? be in ruby2? (was Re: Finding shared elements between to arrays.)](https://www.ruby-forum.com/t/will-in-be-in-ruby2-was-re-finding-shared-elements-between-to-arrays/116832)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 15\
**Last updated:** [October 12, 2007, 5:35am UTC](https://www.ruby-forum.com/t/will-in-be-in-ruby2-was-re-finding-shared-elements-between-to-arrays/116832 "2007-10-12T05:35:51Z")

</div>

Eric wrote: a3 = a1.select { |e| a2.include?(e) } compare: a3 = a1.select { |e| e.in? a2} the latter is more straightforward. the former expression rocks my brain from left to right. Can we see light for #in? in …

---

## [IRB - ignoring comments (toggling)](https://www.ruby-forum.com/t/irb-ignoring-comments-toggling/117016)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 1\
**Last updated:** [October 12, 2007, 4:42am UTC](https://www.ruby-forum.com/t/irb-ignoring-comments-toggling/117016 "2007-10-12T04:42:42Z")

</div>

Hi, i think i have asked this ~a year or so ago already, roughly (and in a much shorter form). This is my last try at it, it is in my todo list, but I now want to either solve it, or remove it from my todo list :slig…

---

## [MaxSizeError on spreadsheet-excel olewriter](https://www.ruby-forum.com/t/maxsizeerror-on-spreadsheet-excel-olewriter/116887)

<div class="topic-metadata">

**Author:** [@dbf](https://www.ruby-forum.com/u/dbf)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 4:00am UTC](https://www.ruby-forum.com/t/maxsizeerror-on-spreadsheet-excel-olewriter/116887 "2007-10-12T04:00:37Z")

</div>

I am making an excel file with spreadsheet-excel 0.3.5.1. Getting a MaxSizeError in set\_size (olewriter.rb line 65) when generating a large file. Does anyone know what causes this? The docs refer to a former bug in th…

---

## [How to choose a belt (gurtel) gift](https://www.ruby-forum.com/t/how-to-choose-a-belt-gurtel-gift/117019)

<div class="topic-metadata">

**Author:** [@hsz228](https://www.ruby-forum.com/u/hsz228)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 3:44am UTC](https://www.ruby-forum.com/t/how-to-choose-a-belt-gurtel-gift/117019 "2007-10-12T03:44:15Z")

</div>

HOW TO CHOOSE AND BUY A BELT AS A GIFT??? The belt are playing a important role , more and more fashion girls like belt matching her clothes. but they donâ€™t know how long a belt will fit ,some girls even donâ€™t kno…

---

## [\-v Command Line Option](https://www.ruby-forum.com/t/v-command-line-option/116877)

<div class="topic-metadata">

**Author:** [@Brian\_Leonard](https://www.ruby-forum.com/u/Brian_Leonard)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 3:25am UTC](https://www.ruby-forum.com/t/v-command-line-option/116877 "2007-10-12T03:25:32Z")

</div>

According to the help: -v print version number, then turn on verbose mode However, I only see that it prints the version number. My program doesn’t even run, never mind verbose mode. Are there any other …

---

## [SQLite and ruby](https://www.ruby-forum.com/t/sqlite-and-ruby/116986)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 5\
**Last updated:** [October 12, 2007, 1:01am UTC](https://www.ruby-forum.com/t/sqlite-and-ruby/116986 "2007-10-12T01:01:14Z")

</div>

i need to convert three fields of a SQLite db : lastName, firstName, fullLastName the conversion is a capitalisation ie : dupond, jules, dupondjules needs to become : Dupond, Jules, DupondJules i now how to capital…

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

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