# Ruby

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

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

---

## [Does parseexcel work on OS X?](https://www.ruby-forum.com/t/does-parseexcel-work-on-os-x/78000)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [December 4, 2006, 7:14am UTC](https://www.ruby-forum.com/t/does-parseexcel-work-on-os-x/78000 "2006-12-04T07:14:28Z")

</div>

Anyone using parseexcel on a PowerPC Mac? Any tips as to how to get this working? Is it possible that I have an issue with big endian vs little endian data? When I dump the contents of the spreadsheet with puts, I see…

---

## [How to get operating system type info](https://www.ruby-forum.com/t/how-to-get-operating-system-type-info/78192)

<div class="topic-metadata">

**Author:** [@daoshi](https://www.ruby-forum.com/u/daoshi)\
**Replies:** 4\
**Last updated:** [December 4, 2006, 7:08am UTC](https://www.ruby-forum.com/t/how-to-get-operating-system-type-info/78192 "2006-12-04T07:08:27Z")

</div>

Hi Guys, I’m writing a software building script in Ruby for Unix and Windows. I want to know the type of the platform that my script is running on - whether it’s Windows, Linux or MacOSX. I need to do something specia…

---

## [Gems zlib problem](https://www.ruby-forum.com/t/gems-zlib-problem/53100)

<div class="topic-metadata">

**Author:** [@ryantate](https://www.ruby-forum.com/u/ryantate)\
**Replies:** 15\
**Last updated:** [December 4, 2006, 6:42am UTC](https://www.ruby-forum.com/t/gems-zlib-problem/53100 "2006-12-04T06:42:34Z")

</div>

I am going to echo posts scattered throughout the Internet here and say I cannot get Ruby gems working due to lack of zlib. Trying to install a package like Rails gives the error: /usr/local/lib/ruby/site\_ruby/1.8/rub…

---

## [Other way to send message to parent class in unit testing](https://www.ruby-forum.com/t/other-way-to-send-message-to-parent-class-in-unit-testing/78218)

<div class="topic-metadata">

**Author:** [@rinda](https://www.ruby-forum.com/u/rinda)\
**Replies:** 1\
**Last updated:** [December 4, 2006, 5:26am UTC](https://www.ruby-forum.com/t/other-way-to-send-message-to-parent-class-in-unit-testing/78218 "2006-12-04T05:26:23Z")

</div>

Hi, I have 8 class that need to be tested. They all have some same method to be tested. So I make parent class to do the duplicate work. This is the parent class: class BaseElementControllerTest \< Test::Unit::TestCase …

---

## [Redefining rb\_str\_init()](https://www.ruby-forum.com/t/redefining-rb-str-init/78204)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 3\
**Last updated:** [December 4, 2006, 4:04am UTC](https://www.ruby-forum.com/t/redefining-rb-str-init/78204 "2006-12-04T04:04:13Z")

</div>

Hi all, I’m just messing around with a custom String class, so I did this to string.c: static VALUE rb\_str\_init(int argc, VALUE\* argv, VALUE v\_str){ VALUE v\_orig; rb\_scan\_args(argc, argv, “01”, &v\_orig); if(RTEST(v…

---

## [Number format](https://www.ruby-forum.com/t/number-format/78212)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 5\
**Last updated:** [December 4, 2006, 3:58am UTC](https://www.ruby-forum.com/t/number-format/78212 "2006-12-04T03:58:12Z")

</div>

Hi all, I have a number, for example, 1.123456789. What is the Ruby way to change it into whatever number of floating points such as 1.12, 1.123,1.1234568 or 1.12345679. Thanks, Li

---

## [On Modules and require in general / on ActiveSupport in par](https://www.ruby-forum.com/t/on-modules-and-require-in-general-on-activesupport-in-par/78004)

<div class="topic-metadata">

**Author:** [@niconoe](https://www.ruby-forum.com/u/niconoe)\
**Replies:** 1\
**Last updated:** [December 4, 2006, 3:26am UTC](https://www.ruby-forum.com/t/on-modules-and-require-in-general-on-activesupport-in-par/78004 "2006-12-04T03:26:07Z")

</div>

I dont get how : -\> I require\_gem ActiveSupport and it’s not loading any ActiveSupport module -\> I require\_gem Rails and it’s loading ActiveSupport module… Any clue appreciated. Here is a transcri…

---

## [Factory pattern, abstract base class](https://www.ruby-forum.com/t/factory-pattern-abstract-base-class/78147)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 16\
**Last updated:** [December 4, 2006, 2:30am UTC](https://www.ruby-forum.com/t/factory-pattern-abstract-base-class/78147 "2006-12-04T02:30:01Z")

</div>

Hi all, I’m trying to setup an abstract base class as a factory for its subclasses. The below code fails, as it always returns an instance of Foo::Bar instead of one of its subclasses. module Foo class Bar def ini…

---

## [Ruby-talk remove](https://www.ruby-forum.com/t/ruby-talk-remove/78203)

<div class="topic-metadata">

**Author:** [@gbtec](https://www.ruby-forum.com/u/gbtec)\
**Replies:** 0\
**Last updated:** [December 4, 2006, 12:25am UTC](https://www.ruby-forum.com/t/ruby-talk-remove/78203 "2006-12-04T00:25:47Z")

</div>

Please remove me from the RUBY-TALK email list. The 100s of emails each day are clogging up my mail account. Regards, Geoffrey removed\_email\_address@domain.invalid

---

## [VBA to Ruby code translate](https://www.ruby-forum.com/t/vba-to-ruby-code-translate/78178)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 1\
**Last updated:** [December 3, 2006, 9:54pm UTC](https://www.ruby-forum.com/t/vba-to-ruby-code-translate/78178 "2006-12-03T21:54:46Z")

</div>

Hi all, I know I post this question a while ago in Ruby-forum but I haven’t figure out the solution yet. I hope someone from Ruby-talk can help me out to translate VBA code into ruby code. Thanks, Li In my ruby sc…

---

## [OOo and regexp](https://www.ruby-forum.com/t/ooo-and-regexp/78186)

<div class="topic-metadata">

**Author:** [@ishamid](https://www.ruby-forum.com/u/ishamid)\
**Replies:** 1\
**Last updated:** [December 3, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/ooo-and-regexp/78186 "2006-12-03T21:15:29Z")

</div>

\[novice\] Hi, Paul L. suggested that I give more detail about my problem. Ok, here it is: BACKGROUND: Save a small document in OOo format, like a bibliographic entry with, say, the article title in bold and the jour…

---

## [LDAP library in Ruby](https://www.ruby-forum.com/t/ldap-library-in-ruby/78028)

<div class="topic-metadata">

**Author:** [@mariachi77](https://www.ruby-forum.com/u/mariachi77)\
**Replies:** 4\
**Last updated:** [December 3, 2006, 8:29pm UTC](https://www.ruby-forum.com/t/ldap-library-in-ruby/78028 "2006-12-03T20:29:22Z")

</div>

Hi, Looking for an LDAP module, I found so far only bindings/APIs that use native libraries like OpenLDAP in the back-end. Does anybody know a library that builds on a low level lib or API like socket, so that it ca…

---

## [Rubygarden wiki](https://www.ruby-forum.com/t/rubygarden-wiki/78189)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 0\
**Last updated:** [December 3, 2006, 7:47pm UTC](https://www.ruby-forum.com/t/rubygarden-wiki/78189 "2006-12-03T19:47:15Z")

</div>

I was a bit hesitant to post this, since it is mostly complaining, but I really think the RubyGarden wiki is long overdue for a facelift. The major problems I have (in no particular order): Ugly background colour. Th…

---

## [Combining PDF and XML files into PDF](https://www.ruby-forum.com/t/combining-pdf-and-xml-files-into-pdf/77936)

<div class="topic-metadata">

**Author:** [@bill\_walton](https://www.ruby-forum.com/u/bill_walton)\
**Replies:** 1\
**Last updated:** [December 3, 2006, 7:31pm UTC](https://www.ruby-forum.com/t/combining-pdf-and-xml-files-into-pdf/77936 "2006-12-03T19:31:13Z")

</div>

My app reads an XML file into my database, allows editing the content, then produces a new XML file and, optionally, a PDF file from the same data. I’m currently using REXML to readin the XML file, Builder to write t…

---

## [Comma separating output from array.to\_s](https://www.ruby-forum.com/t/comma-separating-output-from-array-to-s/78021)

<div class="topic-metadata">

**Author:** [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Replies:** 17\
**Last updated:** [December 3, 2006, 7:11pm UTC](https://www.ruby-forum.com/t/comma-separating-output-from-array-to-s/78021 "2006-12-03T19:11:10Z")

</div>

hi comp.lang.ruby what is the ruby-way of comma separating the output from array.to\_s? \[I have been playing with ruby for some time now, but I often find myself solving problems in a Java/C# manner… That’s me, a non-id…

---

## [I'm a new member](https://www.ruby-forum.com/t/im-a-new-member/78163)

<div class="topic-metadata">

**Author:** [@knight\_errant\_bd](https://www.ruby-forum.com/u/knight_errant_bd)\
**Replies:** 15\
**Last updated:** [December 3, 2006, 5:44pm UTC](https://www.ruby-forum.com/t/im-a-new-member/78163 "2006-12-03T17:44:59Z")

</div>

Hi evrybody! I’m a new member of forum ruby . I meet with serious difficulties Can you help me? I have project write for compare different C++ with ruby (EX: Class String ) thanks.

---

## [Development hpricot breaks code](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [December 3, 2006, 5:26pm UTC](https://www.ruby-forum.com/t/development-hpricot-breaks-code/78154 "2006-12-03T17:26:57Z")

</div>

I was using this simple script to parse some links from a web page require ‘open-uri’ require ‘hpricot’ strLink = “http://sportsline.com/nfl/scoreboard/2006/week9” @doc = Hpricot(open(strLink)) @doc.search(“a”).each…

---

## [Weird thing with sockets](https://www.ruby-forum.com/t/weird-thing-with-sockets/78170)

<div class="topic-metadata">

**Author:** [@gemberkoekje](https://www.ruby-forum.com/u/gemberkoekje)\
**Replies:** 4\
**Last updated:** [December 3, 2006, 2:36pm UTC](https://www.ruby-forum.com/t/weird-thing-with-sockets/78170 "2006-12-03T14:36:40Z")

</div>

First off - i’m a n00b at ruby. This doesn’t mean i’m a noob at programming, but in case i’m about to ask a really stupid question, sorry in advance :stuck\_out\_tongue: With that out of the way, i’m trying to connect t…

---

## [PDF::Writer and unicode](https://www.ruby-forum.com/t/pdf-writer-and-unicode/78002)

<div class="topic-metadata">

**Author:** [@Simon\_KrSSSSger](https://www.ruby-forum.com/u/Simon_KrSSSSger)\
**Replies:** 4\
**Last updated:** [December 3, 2006, 6:42am UTC](https://www.ruby-forum.com/t/pdf-writer-and-unicode/78002 "2006-12-03T06:42:01Z")

</div>

Hi! Ok, I know there is (or was) no easy way to do that, but the PDF::Writer doc says: If all of the conditions are correct, the following code should display the Japanese characters\[…\] pdf.text("\\xfe\\xff\\x65\\xe5\\x6…

---

## [Search and replace](https://www.ruby-forum.com/t/search-and-replace/78006)

<div class="topic-metadata">

**Author:** [@ishamid](https://www.ruby-forum.com/u/ishamid)\
**Replies:** 6\
**Last updated:** [December 3, 2006, 5:55am UTC](https://www.ruby-forum.com/t/search-and-replace/78006 "2006-12-03T05:55:56Z")

</div>

\[total novice here\] Hi, I have a series of expressions like this (shortened from verbose xml) \[\<text:sequence text:ref-name=“refAutoNr0”\>1\</text:sequence\> \[\<text:sequence text:ref-name=“refAutoNr1”\>2\</text:sequence\> …

---

## [Serializing Ruby code](https://www.ruby-forum.com/t/serializing-ruby-code/78155)

<div class="topic-metadata">

**Author:** [@Victor\_SZverokSS\_Sh](https://www.ruby-forum.com/u/Victor_SZverokSS_Sh)\
**Replies:** 2\
**Last updated:** [December 3, 2006, 5:01am UTC](https://www.ruby-forum.com/t/serializing-ruby-code/78155 "2006-12-03T05:01:53Z")

</div>

Hi all. A bit of philosophy. We have Marshal\[1\] to serializing Ruby’s objects (and also YAML and so on). AFAIK, Rails community even uses objects serialization for program’s state saving. But, existing marshalling…

---

## [Gem requires not working](https://www.ruby-forum.com/t/gem-requires-not-working/78016)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 4\
**Last updated:** [December 3, 2006, 4:43am UTC](https://www.ruby-forum.com/t/gem-requires-not-working/78016 "2006-12-03T04:43:51Z")

</div>

I feel stupid about this, but I just did a fresh install of 1.8.5 from MacPorts, installed a fresh rubygems, installed all my gems, and simple code like this fails: require ‘redcloth’ Error message: lacosta:~/nitro/…

---

## [Rexexp question](https://www.ruby-forum.com/t/rexexp-question/78030)

<div class="topic-metadata">

**Author:** [@ishamid](https://www.ruby-forum.com/u/ishamid)\
**Replies:** 3\
**Last updated:** [December 3, 2006, 4:15am UTC](https://www.ruby-forum.com/t/rexexp-question/78030 "2006-12-03T04:15:49Z")

</div>

\[total novice again ;-)\] Hi, Ok, I’ve figured some of this pattern-matching out (yes, I’m really a total novice at programming). Consider the following: ==================================== @data.gsub!(/\<(text:span …

---

## [Strange error when loading a shared library](https://www.ruby-forum.com/t/strange-error-when-loading-a-shared-library/78150)

<div class="topic-metadata">

**Author:** [@S-redyck](https://www.ruby-forum.com/u/S-redyck)\
**Replies:** 0\
**Last updated:** [December 3, 2006, 12:41am UTC](https://www.ruby-forum.com/t/strange-error-when-loading-a-shared-library/78150 "2006-12-03T00:41:27Z")

</div>

Hi, I am porting Ruby/SDL to SkyOS (which has Ruby 1.8.5 installed) and I can compile it fine, no errors or warnings, but when I try to execute “require ‘sdl’” it bums out with /path/to/sdl.so: “Unable to load global…

---

## [Convert binary array to floating point decimal](https://www.ruby-forum.com/t/convert-binary-array-to-floating-point-decimal/78009)

<div class="topic-metadata">

**Author:** [@Nebiru](https://www.ruby-forum.com/u/Nebiru)\
**Replies:** 3\
**Last updated:** [December 2, 2006, 9:56pm UTC](https://www.ruby-forum.com/t/convert-binary-array-to-floating-point-decimal/78009 "2006-12-02T21:56:23Z")

</div>

new to ruby here, looking for a little help I’m trying to convert some C# code to ruby, however I’m not getting the desired results The code is supposed to convert a binary string to a floating point number public f…

---

## [More search and replace](https://www.ruby-forum.com/t/more-search-and-replace/78008)

<div class="topic-metadata">

**Author:** [@ishamid](https://www.ruby-forum.com/u/ishamid)\
**Replies:** 3\
**Last updated:** [December 2, 2006, 8:52pm UTC](https://www.ruby-forum.com/t/more-search-and-replace/78008 "2006-12-02T20:52:09Z")

</div>

\[Total novice\] A follow-up on my last email (“search and replace”)". I am trying to convert an OOo xml source (content.xml) to TeX. It’s a bibliography and thus very predictable/regular/simple etc. Each entry looks ro…

---

## [Usb](https://www.ruby-forum.com/t/usb/77994)

<div class="topic-metadata">

**Author:** [@javra](https://www.ruby-forum.com/u/javra)\
**Replies:** 3\
**Last updated:** [December 2, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/usb/77994 "2006-12-02T19:35:57Z")

</div>

Hi, Is there any programme or library in ruby to drive own hardware via USB? Or do I have to implement my own C functions?

---

## [Simple iteration in a function problem](https://www.ruby-forum.com/t/simple-iteration-in-a-function-problem/77943)

<div class="topic-metadata">

**Author:** [@blakeage](https://www.ruby-forum.com/u/blakeage)\
**Replies:** 33\
**Last updated:** [December 2, 2006, 7:25pm UTC](https://www.ruby-forum.com/t/simple-iteration-in-a-function-problem/77943 "2006-12-02T19:25:55Z")

</div>

i’m trying to do this, and I’m stuck class holderOfYs def initialize() @ys = Array.new end def addX( x ) @ys \<\< x end this is the problem function. all I want is the specific (ONE) element from the @ys array th…

---

## [Problems with id3lib-ruby](https://www.ruby-forum.com/t/problems-with-id3lib-ruby/77997)

<div class="topic-metadata">

**Author:** [@Bira](https://www.ruby-forum.com/u/Bira)\
**Replies:** 1\
**Last updated:** [December 2, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/problems-with-id3lib-ruby/77997 "2006-12-02T14:19:18Z")

</div>

Hello, I’m trying to organize my MP3 collection using id3lib-ruby, to go through it and sort the files into artist/album folders according to their ID3 information. However, in some files, my script breaks with the f…

---

## [Cidr.rb: port of Perl's Net::CIDR v0.11 available](https://www.ruby-forum.com/t/cidr-rb-port-of-perls-net-cidr-v0-11-available/77630)

<div class="topic-metadata">

**Author:** [@Jos\_B](https://www.ruby-forum.com/u/Jos_B)\
**Replies:** 16\
**Last updated:** [December 2, 2006, 12:51pm UTC](https://www.ruby-forum.com/t/cidr-rb-port-of-perls-net-cidr-v0-11-available/77630 "2006-12-02T12:51:11Z")

</div>

Module: http://www.catnook.com/programs/cidr.rb Simple test program: http://www.catnook.com/programs/cidrtest.rb Not sure about the license. Hope this is useful to someone. As an aside: anyone have a port of Net::Pi…

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

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