# Ruby

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

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

---

## [Another nail in CygWin's coffin (attached)](https://www.ruby-forum.com/t/another-nail-in-cygwins-coffin-attached/73919)

<div class="topic-metadata">

**Author:** [@MSEdward\_SEdS\_Bora](https://www.ruby-forum.com/u/MSEdward_SEdS_Bora)\
**Replies:** 13\
**Last updated:** [November 7, 2006, 10:46am UTC](https://www.ruby-forum.com/t/another-nail-in-cygwins-coffin-attached/73919 "2006-11-07T10:46:45Z")

</div>

Austin is basically right – nobody should use CygWin as a Windows development platform/IDE/whatever. And nobody should use CygWin for Ruby or Rails work of any kind on a Windows platform, since everything you need is …

---

## [Help with MS ActiveDirectory access](https://www.ruby-forum.com/t/help-with-ms-activedirectory-access/70945)

<div class="topic-metadata">

**Author:** [@cparticle](https://www.ruby-forum.com/u/cparticle)\
**Replies:** 5\
**Last updated:** [November 7, 2006, 10:46am UTC](https://www.ruby-forum.com/t/help-with-ms-activedirectory-access/70945 "2006-11-07T10:46:42Z")

</div>

Hey All, I’m hoping to get some help connecting to Active directory to pull down a list of user objects from the entire domain(all ou’s). Let me say that while I need user objects now knowing how to get any objects f…

---

## [Efficient parsing of large Excel documents in Ruby](https://www.ruby-forum.com/t/efficient-parsing-of-large-excel-documents-in-ruby/73951)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 16\
**Last updated:** [November 7, 2006, 10:46am UTC](https://www.ruby-forum.com/t/efficient-parsing-of-large-excel-documents-in-ruby/73951 "2006-11-07T10:46:28Z")

</div>

All, I am currently using the parseexcel gem to parse an Excel file so that I can save it’s data into a database (in a Rails app.). When I run it against an Excel file with ~42000 rows and 11 columns (the spreadsheet…

---

## [Re: Fuzzy Time (#99)](https://www.ruby-forum.com/t/re-fuzzy-time-99/74440)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:46am UTC](https://www.ruby-forum.com/t/re-fuzzy-time-99/74440 "2006-11-07T10:46:20Z")

</div>

From: Robert Conn \[mailto:removed\_email\_address@domain.invalid\] I haven’t had time to do any “extra credit” stuff, or even test this fully, but here goes - For what it’s worth, here’s the test code I’ve written to t…

---

## [How can i do 'foreach (reverse sort { $hasref-\>{$a} \<=\> $has](https://www.ruby-forum.com/t/how-can-i-do-foreach-reverse-sort-hasref-a-has/74055)

<div class="topic-metadata">

**Author:** [@Aleksandar\_L](https://www.ruby-forum.com/u/Aleksandar_L)\
**Replies:** 4\
**Last updated:** [November 7, 2006, 10:46am UTC](https://www.ruby-forum.com/t/how-can-i-do-foreach-reverse-sort-hasref-a-has/74055 "2006-11-07T10:46:13Z")

</div>

Hi, I’am new with ruby and want to migrate some of my perlscripts to ruby ;-). I have a problem with the ‘reverse sort’ of values of a hashref and hope that sombody can help me or point me to the right way :wink: I …

---

## [Alias singleton method from C](https://www.ruby-forum.com/t/alias-singleton-method-from-c/74472)

<div class="topic-metadata">

**Author:** [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Replies:** 6\
**Last updated:** [November 7, 2006, 10:46am UTC](https://www.ruby-forum.com/t/alias-singleton-method-from-c/74472 "2006-11-07T10:46:03Z")

</div>

Hi, I think I must have missed something obvious, but I can’t see how to alias a singleton method from a C extension. I think I can grab the singleton class, then pass that to rb\_alias, but is that the right / best w…

---

## [PDF-writer and MS word document](https://www.ruby-forum.com/t/pdf-writer-and-ms-word-document/74094)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 5\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/pdf-writer-and-ms-word-document/74094 "2006-11-07T10:45:54Z")

</div>

Hi guys, I just wonder if anyone out there ever uses PDF::Writer to create a PDF file from a MS word document file. I can only create a PDF file if the file is in plain text format. Thanks, Li

---

## [True.to\_i](https://www.ruby-forum.com/t/true-to-i/74473)

<div class="topic-metadata">

**Author:** [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Replies:** 3\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/true-to-i/74473 "2006-11-07T10:45:49Z")

</div>

Hello I am processing database rows and I see that there are “bit” columns that come out of ActiveRecord as true or false. I wanted binary digits so I did this: class FalseClass def to\_i 0 end end class TrueClas…

---

## [Backtick and %x{} not the same?](https://www.ruby-forum.com/t/backtick-and-x-not-the-same/74070)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/backtick-and-x-not-the-same/74070 "2006-11-07T10:45:34Z")

</div>

I can’t any information about this, so I dare myself to post here. I have shell script I want to call from ruby, say testme.sh, where it contains echo “It’s me” Calling it with %x{testme.sh} gives me the expected res…

---

## [Gem and optparse : help needed](https://www.ruby-forum.com/t/gem-and-optparse-help-needed/73782)

<div class="topic-metadata">

**Author:** [@Zouplaz](https://www.ruby-forum.com/u/Zouplaz)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/gem-and-optparse-help-needed/73782 "2006-11-07T10:45:29Z")

</div>

Hello, I want to use optparse on a gem packaged bin/ file (eg/usr/lib/ruby/gems/1.8/gems/mypackage/bin/foo) The goal is to make foo usable from the command line without anything else except the name of the file (no .r…

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/74437)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/74437 "2006-11-07T10:45:23Z")

</div>

Begin forwarded message:

---

## [Caching method calls - Is this of interest to anyone?](https://www.ruby-forum.com/t/caching-method-calls-is-this-of-interest-to-anyone/74081)

<div class="topic-metadata">

**Author:** [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/caching-method-calls-is-this-of-interest-to-anyone/74081 "2006-11-07T10:45:15Z")

</div>

Hi folks, I’ve been trying to improve my metaprogramming skills the past two weeks and came up with the following library which caches specific method calls transparently so you don’t have to explicitly save the resu…

---

## [Gettext of variables](https://www.ruby-forum.com/t/gettext-of-variables/74470)

<div class="topic-metadata">

**Author:** [@Matthew\_Hauck](https://www.ruby-forum.com/u/Matthew_Hauck)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/gettext-of-variables/74470 "2006-11-07T10:45:14Z")

</div>

Greetings! Basically, I would like to do the following: string = ‘test string’ puts \_(string) But, it seems that gettext does not seem to work on variables, only on literals. I am a newbie to gettext. I can get it …

---

## [Bignum#to\_s(10) broken](https://www.ruby-forum.com/t/bignum-to-s-10-broken/74466)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 4\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/bignum-to-s-10-broken/74466 "2006-11-07T10:45:04Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B e$B:G6a$Ne(Bbignum.ce$B$NJQ99e(B(rb\_big2str0)e$B$G$9$,!"4p?t$,e(B10(e$B!Ae(B15)e$B$N;~$Ke(B e$B%P%C%U%!$,0l7eB-$j$F$J$$$h$&$G$9!#e(B e$B7k2L$H$7$FId9f$,DY$l$F$7$^$C$F$$…

---

## [Signal handling behaviour change after ruby upgrade](https://www.ruby-forum.com/t/signal-handling-behaviour-change-after-ruby-upgrade/73107)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [November 7, 2006, 10:45am UTC](https://www.ruby-forum.com/t/signal-handling-behaviour-change-after-ruby-upgrade/73107 "2006-11-07T10:45:04Z")

</div>

I use an init system written in ruby for my Gnu/linux distro, and it makes heavy use of signal handling. After upgrading (stable snapshots) from ruby 1.8.3 (2005-10-26) to ruby 1.8.5 (2006-10-18) nothing much work…

---

## [Open-uri and redirection](https://www.ruby-forum.com/t/open-uri-and-redirection/74079)

<div class="topic-metadata">

**Author:** [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/open-uri-and-redirection/74079 "2006-11-07T10:44:40Z")

</div>

According to the Pick Axe Book, open-uri automatically handles redirection for HTTP files, but I do not see this behavior. Here is an example from irb: open(‘http://some.web.site’) RuntimeError: redirection forbidden…

---

## [Is there an working example for rubyful\_soup on RoR?](https://www.ruby-forum.com/t/is-there-an-working-example-for-rubyful-soup-on-ror/102574)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/is-there-an-working-example-for-rubyful-soup-on-ror/102574 "2006-11-07T10:44:39Z")

</div>

I found only Ruby language example to use rubyful\_soup. I don’t know if there’s a working example for RoR… Basicall, I’ve done the following: in my controller, modified from someone’s blog class GethttpController \< A…

---

## [Is there an working example for rubyful\_soup on RoR?](https://www.ruby-forum.com/t/is-there-an-working-example-for-rubyful-soup-on-ror/74462)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/is-there-an-working-example-for-rubyful-soup-on-ror/74462 "2006-11-07T10:44:38Z")

</div>

I found only Ruby language example to use rubyful\_soup. I don’t know if there’s a working example for RoR… Basicall, I’ve done the following: in my controller, modified from someone’s blog class GethttpController \< A…

---

## [Ruby's build system](https://www.ruby-forum.com/t/rubys-build-system/74058)

<div class="topic-metadata">

**Author:** [@cies](https://www.ruby-forum.com/u/cies)\
**Replies:** 7\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/rubys-build-system/74058 "2006-11-07T10:44:29Z")

</div>

right now autotools, make and shell scripts are used to build ruby. i saw that yarv needs a version of ruby to be present in order to build it: right? (i dont know if this is a temporary dependency) but if ruby is ne…

---

## [Ruby Interface to NaNoWriMo Stats](https://www.ruby-forum.com/t/ruby-interface-to-nanowrimo-stats/74086)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/ruby-interface-to-nanowrimo-stats/74086 "2006-11-07T10:44:24Z")

</div>

I’m sure some of you are participating in this year’s National Novel Writing Month (http://www.nanowrimo.org). I’ve taken the liberty to build a simple interface to their Word Count API, allowing the user to downloa…

---

## [Reverted? gc.c: 1.168.2.46-\>1.168.2.47](https://www.ruby-forum.com/t/reverted-gc-c-1-168-2-46-1-168-2-47/74444)

<div class="topic-metadata">

**Author:** [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/reverted-gc-c-1-168-2-46-1-168-2-47/74444 "2006-11-07T10:44:21Z")

</div>

ruby\_1\_8e$B$Ge(B gc.c (gc\_mark\_children): NODE\_POSTEXE holds Ruby VALUE. Members: ChangeLog:1.2673.2.1891-\>1.2673.2.1892 gc.c:1.168-\>1.168.2.47 e$B$H$$$&JQ99$N8e$Ke(B gc.c (gc\_mark\_children): revert last change t…

---

## [Regexp to match CJK characters](https://www.ruby-forum.com/t/regexp-to-match-cjk-characters/73952)

<div class="topic-metadata">

**Author:** [@cafebabe](https://www.ruby-forum.com/u/cafebabe)\
**Replies:** 10\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/regexp-to-match-cjk-characters/73952 "2006-11-07T10:44:18Z")

</div>

How can I write a regexp to match CJK characters? Thanks in advance:)

---

## [Ipv6 connection attempted before ipv4](https://www.ruby-forum.com/t/ipv6-connection-attempted-before-ipv4/74439)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 3\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/ipv6-connection-attempted-before-ipv4/74439 "2006-11-07T10:44:17Z")

</div>

I’ve noticed that when using net/http, and probably with any ip/udp socket connection, it attempts to connect via ipv6 and when that fails it falls back to ipv4. Is this due to the underlying socket library on freebs…

---

## [Socket.gethostbyname](https://www.ruby-forum.com/t/socket-gethostbyname/74035)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/socket-gethostbyname/74035 "2006-11-07T10:44:16Z")

</div>

e$B@\>;3OB9-$G$9!#e(B http://www.atdot.net/~ko1/w3ml/w3ml.cgi/mandiff@ruby/msg/2418 | irb(main):009:0\> Socket.unpack\_sockaddr\_in(Socket.gethostbyname(“210.251.121.214”)\[3\])\[1\] | - “210.251.121.214” | + …

---

## [Net/http PUT/POST versus GET performance](https://www.ruby-forum.com/t/net-http-put-post-versus-get-performance/74443)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 10:44am UTC](https://www.ruby-forum.com/t/net-http-put-post-versus-get-performance/74443 "2006-11-07T10:44:10Z")

</div>

I’ve found the performance difference between the PUT/POST and GET methods with net/http to be rather dramatic. The former clock in at around 10 per second, the latter at around 200. It seems that net/http sends the…

---

## [Define a hash using %q?](https://www.ruby-forum.com/t/define-a-hash-using-q/74012)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 15\
**Last updated:** [November 7, 2006, 10:43am UTC](https://www.ruby-forum.com/t/define-a-hash-using-q/74012 "2006-11-07T10:43:58Z")

</div>

Is there a way for us lazy typists to define a hash using %q? I tried this, but it doesn’t create a hash: h = %q(a =\> b, c =\> d) Thanks, Joe

---

## [\[ANN\] Ruby-VPI 11.0.0](https://www.ruby-forum.com/t/ann-ruby-vpi-11-0-0/74383)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [November 6, 2006, 1:39am UTC](https://www.ruby-forum.com/t/ann-ruby-vpi-11-0-0/74383 "2006-11-06T01:39:21Z")

</div>

Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create complex Verilog test benches easily and wholly in Ruby. Website: http://ruby-vpi.rubyforge.org Install: gem install ruby-vpi Version 11.0.0 (2006-11…

---

## [\[ANN\] Ruby-VPI 10.0.0](https://www.ruby-forum.com/t/ann-ruby-vpi-10-0-0/74349)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [November 5, 2006, 9:33am UTC](https://www.ruby-forum.com/t/ann-ruby-vpi-10-0-0/74349 "2006-11-05T09:33:41Z")

</div>

Version 10.0.0 (2006-11-05) Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create complex Verilog test benches easily and wholly in Ruby. Website: http://ruby-vpi.rubyforge.org Install: gem install ruby…

---

## [Getting away from the old php code](https://www.ruby-forum.com/t/getting-away-from-the-old-php-code/72553)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 10\
**Last updated:** [November 4, 2006, 5:01pm UTC](https://www.ruby-forum.com/t/getting-away-from-the-old-php-code/72553 "2006-11-04T17:01:39Z")

</div>

Hello, How can i embed ruby code into a html page, like php code, without using erb, nor its IMO slightly ugly syntax? (I am using Apache2.) Yes, I want to do this. Basically what I’d like to do is replace my old…

---

## [Problem with rubygems](https://www.ruby-forum.com/t/problem-with-rubygems/74327)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 0\
**Last updated:** [November 4, 2006, 4:24pm UTC](https://www.ruby-forum.com/t/problem-with-rubygems/74327 "2006-11-04T16:24:00Z")

</div>

Hi guys, I try to install rubyzip gem as follows(under XP): C:\\Ruby\\gem install -r rubyzip ERROR: While executing gem … (SocketError) getaddrinfo: no address associated with hostname. when I try to ping http://gems…

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

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