# Ruby

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

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

---

## [Re: pdfwriter printing](https://www.ruby-forum.com/t/re-pdfwriter-printing/101237)

<div class="topic-metadata">

**Author:** [@SSSiso-8859-1SQSPeS](https://www.ruby-forum.com/u/SSSiso-8859-1SQSPeS)\
**Replies:** 0\
**Last updated:** [December 14, 2005, 1:43am UTC](https://www.ruby-forum.com/t/re-pdfwriter-printing/101237 "2005-12-14T01:43:29Z")

</div>

Patrick H. \[mailto:removed\_email\_address@domain.invalid\] : #AcroRd32.exe /t path “printername” “drivername” “portname” #Initiates Adobe Reader and prints a file, whose path must be fully #specified, while suppressing …

---

## [Ruby newbie: IRB syntax highlighting](https://www.ruby-forum.com/t/ruby-newbie-irb-syntax-highlighting/50147)

<div class="topic-metadata">

**Author:** [@Tahir](https://www.ruby-forum.com/u/Tahir)\
**Replies:** 1\
**Last updated:** [December 14, 2005, 1:40am UTC](https://www.ruby-forum.com/t/ruby-newbie-irb-syntax-highlighting/50147 "2005-12-14T01:40:28Z")

</div>

Hi I am new to Ruby (just a couple of days) and programming. I have got IRB in my shell now (I have Kubuntu installed) but was wondering if there is a way to switch on syntax highlighting in IRB so typed code can hav…

---

## [Maintainer of ipaddr.rb?](https://www.ruby-forum.com/t/maintainer-of-ipaddr-rb/50171)

<div class="topic-metadata">

**Author:** [@Hadmut\_D](https://www.ruby-forum.com/u/Hadmut_D)\
**Replies:** 2\
**Last updated:** [December 14, 2005, 1:00am UTC](https://www.ruby-forum.com/t/maintainer-of-ipaddr-rb/50171 "2005-12-14T01:00:23Z")

</div>

Hi, any idea who is currently maintaining the ipaddr.rb library code? The file header says it was Hajimu UMEMOTO, but the library seems to not have been touched since 2002, maybe Hajimu is not working on it anymore. T…

---

## [New Haven Ruby Brigade Meeting 2005.12.14](https://www.ruby-forum.com/t/new-haven-ruby-brigade-meeting-2005-12-14/50190)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [December 14, 2005, 12:54am UTC](https://www.ruby-forum.com/t/new-haven-ruby-brigade-meeting-2005-12-14/50190 "2005-12-14T00:54:21Z")

</div>

Hello everyone, just letting anyone in Southern Connecticut or those who feel like driving to North Haven know that we’re having a meeting tomorrow night at Innovation Software Group. The meeting officially starts at …

---

## [Problem with booh and gettext](https://www.ruby-forum.com/t/problem-with-booh-and-gettext/50180)

<div class="topic-metadata">

**Author:** [@Guido\_de\_Melo](https://www.ruby-forum.com/u/Guido_de_Melo)\
**Replies:** 0\
**Last updated:** [December 13, 2005, 11:44pm UTC](https://www.ruby-forum.com/t/problem-with-booh-and-gettext/50180 "2005-12-13T23:44:13Z")

</div>

Hi everyone, I just watched the video for booh (http://zarb.org/~gc/html/booh.html) and installed booh afterwards. Now it doesn’t run, it says /usr/lib/ruby/site\_ruby/1.8/booh/booh-lib.rb:25:in \`require’: no such fil…

---

## [Private attribute or accessor?](https://www.ruby-forum.com/t/private-attribute-or-accessor/50150)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 5\
**Last updated:** [December 13, 2005, 9:43pm UTC](https://www.ruby-forum.com/t/private-attribute-or-accessor/50150 "2005-12-13T21:43:43Z")

</div>

Hi! See the following codes. \[1\] class C attr\_accessor :a def f(v) @a = v … end end \[2\] class C attr\_accessor :a def f(v) a = v … end end \[1\] and \[2\] work exactly same. I wonder which way is more prope…

---

## [\- posixtimer 0.1](https://www.ruby-forum.com/t/posixtimer-0-1/50034)

<div class="topic-metadata">

**Author:** [@Caleb\_T](https://www.ruby-forum.com/u/Caleb_T)\
**Replies:** 11\
**Last updated:** [December 13, 2005, 8:33pm UTC](https://www.ruby-forum.com/t/posixtimer-0-1/50034 "2005-12-13T20:33:57Z")

</div>

http://rubyforge.org/projects/posixtimer/ Here’s my first RubyForge release, a small utility that wraps around the POSIX timer API. This is only available for systems which implement timer\_create() calls - Linux be…

---

## [Ruby Weekly News 5th - 11th December 2005](https://www.ruby-forum.com/t/ruby-weekly-news-5th-11th-december-2005/100039)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [December 13, 2005, 8:09pm UTC](https://www.ruby-forum.com/t/ruby-weekly-news-5th-11th-december-2005/100039 "2005-12-13T20:09:48Z")

</div>

http://www.rubyweeklynews.org/20051211.html Ruby Weekly News 5th - 11th December 2005 Ruby Weekly News is a summary of the week’s activity on the ruby-talk mailing list / the comp.lang.ruby newsgroup, brought to you b…

---

## [Ncurses - how do you get mousemask working?](https://www.ruby-forum.com/t/ncurses-how-do-you-get-mousemask-working/49952)

<div class="topic-metadata">

**Author:** [@lymans](https://www.ruby-forum.com/u/lymans)\
**Replies:** 4\
**Last updated:** [December 13, 2005, 7:15pm UTC](https://www.ruby-forum.com/t/ncurses-how-do-you-get-mousemask-working/49952 "2005-12-13T19:15:33Z")

</div>

I’ve tried… and I’ve looked around. A few other projects have the line with ‘Ncurses::mousemask…’ in them - but it’s always commented out… like they couldn’t get it working either. Is this feature not functional? I’…

---

## [Accessing C structures in Ruby](https://www.ruby-forum.com/t/accessing-c-structures-in-ruby/50108)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 8\
**Last updated:** [December 13, 2005, 7:00pm UTC](https://www.ruby-forum.com/t/accessing-c-structures-in-ruby/50108 "2005-12-13T19:00:31Z")

</div>

(I’ve already looked at Swig, btw. I’d like to do this one by hand.) I have the following: typedef struct { double x; double y; double z; } VelocityRecord; typedef struct { double x; double y; double z; } Pos…

---

## [,elegant](https://www.ruby-forum.com/t/elegant/100322)

<div class="topic-metadata">

**Author:** [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Replies:** 3\
**Last updated:** [December 13, 2005, 7:00pm UTC](https://www.ruby-forum.com/t/elegant/100322 "2005-12-13T19:00:30Z")

</div>

Hiya! This function adds commas to a string after every three characters so a number would be easier to read. It’s kinda ugly though, and I can’t help thinking there’d be a elegant Why-esque one or two liner to do th…

---

## [How to get an MD5 Base64 hash?](https://www.ruby-forum.com/t/how-to-get-an-md5-base64-hash/50157)

<div class="topic-metadata">

**Author:** [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Replies:** 2\
**Last updated:** [December 13, 2005, 6:45pm UTC](https://www.ruby-forum.com/t/how-to-get-an-md5-base64-hash/50157 "2005-12-13T18:45:24Z")

</div>

Hi everyone, I’m trying to MD5 passwords for insertion into our LDAP. I can’t seem to get the right combination of Digest, BD5, and Base64 calls to get a string that works. Most passwords end up looking like this: {…

---

## [How to exit Ruby program properly](https://www.ruby-forum.com/t/how-to-exit-ruby-program-properly/50109)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 2\
**Last updated:** [December 13, 2005, 6:30pm UTC](https://www.ruby-forum.com/t/how-to-exit-ruby-program-properly/50109 "2005-12-13T18:30:17Z")

</div>

I’m learning to write ruby code, and I’m using 1.8.2 on Windows XP. What is the best way to exit from my .rb script? I’m using Process.exit but the documentation implies that it will throw an exception. So I’m guessi…

---

## [KirbyBase 2.5: Problem pdating records](https://www.ruby-forum.com/t/kirbybase-2-5-problem-pdating-records/50125)

<div class="topic-metadata">

**Author:** [@basi](https://www.ruby-forum.com/u/basi)\
**Replies:** 3\
**Last updated:** [December 13, 2005, 6:24pm UTC](https://www.ruby-forum.com/t/kirbybase-2-5-problem-pdating-records/50125 "2005-12-13T18:24:16Z")

</div>

Hello, I’m trying to do record upates as follows: tgl\_analysis.select.each do |t| if t.exception != ‘y’ then tgl\_analysis.update {|r| r.recno == t.recno}.set do |r| r.word = (some value) r.prefix = (…

---

## [Rails crashes over night?](https://www.ruby-forum.com/t/rails-crashes-over-night/50029)

<div class="topic-metadata">

**Author:** [@stephan](https://www.ruby-forum.com/u/stephan)\
**Replies:** 2\
**Last updated:** [December 13, 2005, 6:15pm UTC](https://www.ruby-forum.com/t/rails-crashes-over-night/50029 "2005-12-13T18:15:13Z")

</div>

I’m running Ruby on Rails on Fedora Core 4 with lighttpd and fastcgi. I also used the login generator (don’t know if relevant). I have the following problem: At day time I work on the server and create/modify ruby fil…

---

## [Re: stable sort\_by?](https://www.ruby-forum.com/t/re-stable-sort-by/53273)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 1\
**Last updated:** [December 13, 2005, 5:24pm UTC](https://www.ruby-forum.com/t/re-stable-sort-by/53273 "2005-12-13T17:24:43Z")

</div>

I guess you have to use sort instead of sort\_by in such a case, like: test = \[\[1, ‘b’\], \[1, ‘c’\], \[1, ‘a’\], \[0, ‘a’\]\] #sort for first item, than for second in reverse order p test.sort{|a, b|(a\[0\] \<=\> b\[0\]).nonzero? …

---

## [Array.invert](https://www.ruby-forum.com/t/array-invert/100192)

<div class="topic-metadata">

**Author:** [@christer](https://www.ruby-forum.com/u/christer)\
**Replies:** 4\
**Last updated:** [December 13, 2005, 5:22pm UTC](https://www.ruby-forum.com/t/array-invert/100192 "2005-12-13T17:22:48Z")

</div>

I would like to see invert “rubyfied”. (Yes, I’m trying to get a grip of what this word means :slight\_smile: class Array def invert res=\[\] for i in 0…self.size if self\[i\] != nil then for b in self\[i\] res\[b\] = \[\] …

---

## [OWL with Ruby](https://www.ruby-forum.com/t/owl-with-ruby/100319)

<div class="topic-metadata">

**Author:** [@itsme213](https://www.ruby-forum.com/u/itsme213)\
**Replies:** 1\
**Last updated:** [December 13, 2005, 5:17pm UTC](https://www.ruby-forum.com/t/owl-with-ruby/100319 "2005-12-13T17:17:44Z")

</div>

Anyone know of any active Ruby / OWL integration projects? Google and the usual Ruby sites did not reveal much. Thanks! p.s. that’s owl as in semantic web

---

## [A question about recursive programming](https://www.ruby-forum.com/t/a-question-about-recursive-programming/50049)

<div class="topic-metadata">

**Author:** [@Hank\_G](https://www.ruby-forum.com/u/Hank_G)\
**Replies:** 23\
**Last updated:** [December 13, 2005, 5:05pm UTC](https://www.ruby-forum.com/t/a-question-about-recursive-programming/50049 "2005-12-13T17:05:41Z")

</div>

I want to calculate all sum possibility of interger array. I know there are other non-recursive way to do it. But when I wrote recursive code to achieve it, I just got error. def all\_sum(arr) b=arr if arr.length==1 …

---

## [Ruby in a Nutshell - still worthwhile?](https://www.ruby-forum.com/t/ruby-in-a-nutshell-still-worthwhile/99716)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 3\
**Last updated:** [December 13, 2005, 4:08pm UTC](https://www.ruby-forum.com/t/ruby-in-a-nutshell-still-worthwhile/99716 "2005-12-13T16:08:08Z")

</div>

I’m looking for a quick reference guide to Ruby. I have the PickAxe already, which is great for learning Ruby, but now I’m looking for something more reference-like and smaller :slight\_smile: The O’Reilly “in a nutsh…

---

## [Pdfwriter printing](https://www.ruby-forum.com/t/pdfwriter-printing/50119)

<div class="topic-metadata">

**Author:** [@SSSiso-8859-1SQSPeS](https://www.ruby-forum.com/u/SSSiso-8859-1SQSPeS)\
**Replies:** 2\
**Last updated:** [December 13, 2005, 4:02pm UTC](https://www.ruby-forum.com/t/pdfwriter-printing/50119 "2005-12-13T16:02:05Z")

</div>

Hi All, pdfwriter rocks but me brain does not :slight\_smile: how does one print a pdf object using ruby? i can create it fine using #save\_as. i was looking for something like #print… i’d like to print it in windows a…

---

## [Features for next webgen release](https://www.ruby-forum.com/t/features-for-next-webgen-release/50137)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 1\
**Last updated:** [December 13, 2005, 3:50pm UTC](https://www.ruby-forum.com/t/features-for-next-webgen-release/50137 "2005-12-13T15:50:00Z")

</div>

Hi, for all who are not interested in webgen: you can safely skip the rest or get interested http://webgen.rubyforge.org :slight\_smile: I’m currently gathering ideas for new features for the next big webgen release (…

---

## [String.to\_sym?](https://www.ruby-forum.com/t/string-to-sym/98595)

<div class="topic-metadata">

**Author:** [@robertj](https://www.ruby-forum.com/u/robertj)\
**Replies:** 7\
**Last updated:** [December 13, 2005, 3:43pm UTC](https://www.ruby-forum.com/t/string-to-sym/98595 "2005-12-13T15:43:59Z")

</div>

hi, is there a String#to\_sym method anywhere in the statndard lib? i couldnt find anything like that but maybe i missed it. its easy enough to write class String def to\_sym eval “:#{self}” end end just want to …

---

## [\[SOLUTION\] Kalah (#58)](https://www.ruby-forum.com/t/solution-kalah-58/50020)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 11\
**Last updated:** [December 13, 2005, 2:55pm UTC](https://www.ruby-forum.com/t/solution-kalah-58/50020 "2005-12-13T14:55:39Z")

</div>

Hey guys, Here’s my solution to this weeks Ruby quiz. I used the MTD(f) algorithm. Unfortunately I couldn’t seem to get my transposition tables to work correctly. The garbage collector kept crashing. I think that to…

---

## [Re: stable sort\_by?](https://www.ruby-forum.com/t/re-stable-sort-by/100087)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 1\
**Last updated:** [December 13, 2005, 2:25pm UTC](https://www.ruby-forum.com/t/re-stable-sort-by/100087 "2005-12-13T14:25:31Z")

</div>

… So, in this case \[1,“c”\] and \[1,“b”\] are equivalent, and their order is un-important … From Sorting algorithm - Wikipedia : Stability: stable sorting algorithms maintain the relative order of records with equal…

---

## [Matches -\> regexp?](https://www.ruby-forum.com/t/matches-regexp/53201)

<div class="topic-metadata">

**Author:** [@akoSS](https://www.ruby-forum.com/u/akoSS)\
**Replies:** 5\
**Last updated:** [December 13, 2005, 2:19pm UTC](https://www.ruby-forum.com/t/matches-regexp/53201 "2005-12-13T14:19:29Z")

</div>

Hello, this is not exactly a ruby problem, i hope people will not consider this spamming. does anyone know of any reference or an algorithm to build a regular expression (a finite automaton, in general) that would ma…

---

## [Re: stable sort\_by?](https://www.ruby-forum.com/t/re-stable-sort-by/100038)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 4\
**Last updated:** [December 13, 2005, 1:36pm UTC](https://www.ruby-forum.com/t/re-stable-sort-by/100038 "2005-12-13T13:36:19Z")

</div>

I have to sort a list using a number of criterions (a,b,c,d) where d “Team B”=\>{:a=\>0, :b=\>-2, :c=\>4, :d=\>112 }, pp tmp because of criterion d. Is it possible that sort\_by is not stable? Or is there something I d…

---

## [Stable sort\_by?](https://www.ruby-forum.com/t/stable-sort-by/100036)

<div class="topic-metadata">

**Author:** [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Replies:** 12\
**Last updated:** [December 13, 2005, 1:10pm UTC](https://www.ruby-forum.com/t/stable-sort-by/100036 "2005-12-13T13:10:17Z")

</div>

Hi, I have to sort a list using a number of criterions (a,b,c,d) where d is the least important criterion and a is the most important one. All comparisons should be ‘higher number: better position’. This is what I ha…

---

## [LocalJumpError](https://www.ruby-forum.com/t/localjumperror/100040)

<div class="topic-metadata">

**Author:** [@hanholl](https://www.ruby-forum.com/u/hanholl)\
**Replies:** 1\
**Last updated:** [December 13, 2005, 1:10pm UTC](https://www.ruby-forum.com/t/localjumperror/100040 "2005-12-13T13:10:17Z")

</div>

Hi, Because ruby-libexif no longer works with libexif-0.6.12, I decided to roll my own Exif class. Quick and dirty. And got a surprising error message. Here’s the program: #!/usr/bin/ruby #require ‘exif’ class E…

---

## [System Tray Icon](https://www.ruby-forum.com/t/system-tray-icon/99538)

<div class="topic-metadata">

**Author:** [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Replies:** 2\
**Last updated:** [December 13, 2005, 11:30am UTC](https://www.ruby-forum.com/t/system-tray-icon/99538 "2005-12-13T11:30:56Z")

</div>

Any one know of a simple way to load an icon to the system tray via Ruby? Ideally, I’d like cross platform, but would settle for Windows only. My goal is to make a simple utility that runs in the background, runs the…

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

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