# Ruby

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

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

---

## [Counting Toothpicks (#111)](https://www.ruby-forum.com/t/counting-toothpicks-111/84105)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 13\
**Last updated:** [February 3, 2007, 8:11pm UTC](https://www.ruby-forum.com/t/counting-toothpicks-111/84105 "2007-02-03T20:11:09Z")

</div>

I think this was a pretty challenging quiz. I’ve played around with many of the solutions and noted that some become pretty sluggish with large numbers and at least one still seems to get some incorrect answers. Th…

---

## [Calling a method whose name I only know at run-time](https://www.ruby-forum.com/t/calling-a-method-whose-name-i-only-know-at-run-time/84344)

<div class="topic-metadata">

**Author:** [@builderchad](https://www.ruby-forum.com/u/builderchad)\
**Replies:** 4\
**Last updated:** [February 3, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/calling-a-method-whose-name-i-only-know-at-run-time/84344 "2007-02-03T19:23:07Z")

</div>

Hi folks, I have a handful of methods that perform operations on chunks of data. Which of these methods is called is specified in a YAML configuration so I only know the method names at run-time, which are, of course,…

---

## [Fail to install postgres gem](https://www.ruby-forum.com/t/fail-to-install-postgres-gem/84352)

<div class="topic-metadata">

**Author:** [@threeeyedfish](https://www.ruby-forum.com/u/threeeyedfish)\
**Replies:** 5\
**Last updated:** [February 3, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/fail-to-install-postgres-gem/84352 "2007-02-03T18:44:59Z")

</div>

Good day! I have problems installing postgres gem. It seems that gem cannot find my PostgreSQL installation. Please tell me what options can I give to gem. Gem manual doesn’t help. I’m getting the following: ERROR: …

---

## [Saving class with array property with YAML](https://www.ruby-forum.com/t/saving-class-with-array-property-with-yaml/84359)

<div class="topic-metadata">

**Author:** [@Martin\_MSSS\_ller](https://www.ruby-forum.com/u/Martin_MSSS_ller)\
**Replies:** 3\
**Last updated:** [February 3, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/saving-class-with-array-property-with-yaml/84359 "2007-02-03T18:00:52Z")

</div>

Hello I’m new to Ruby and unfortuantly I can’t find an example anywhere to the following problem. I have the following class: class Article attr\_accessor :author attr\_accessor :title def inititialize(author, title…

---

## [Reloading .rb files / reparsing?](https://www.ruby-forum.com/t/reloading-rb-files-reparsing/84361)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 3, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/reloading-rb-files-reparsing/84361 "2007-02-03T17:36:50Z")

</div>

hi - I’m working on an app which is using webbrick for its mini web-server. each time i change the source i have to restart my app; is there a way to get ruby to re-parse the files without this? effectively the same …

---

## [Can Not Get Ruby to Run in Windows CMD Window](https://www.ruby-forum.com/t/can-not-get-ruby-to-run-in-windows-cmd-window/84350)

<div class="topic-metadata">

**Author:** [@brad](https://www.ruby-forum.com/u/brad)\
**Replies:** 3\
**Last updated:** [February 3, 2007, 5:25pm UTC](https://www.ruby-forum.com/t/can-not-get-ruby-to-run-in-windows-cmd-window/84350 "2007-02-03T17:25:49Z")

</div>

Hi All, As the subject says…“Can Not Get Ruby to Run in Windows CMD Window” I have Ruby installed: C:\\Ruby I was reading the Programming Ruby - The Pragmatic Programmers’ Guide. It says to bring up the Shell Prompt …

---

## [Config.h on Linux for building racc](https://www.ruby-forum.com/t/config-h-on-linux-for-building-racc/84310)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [February 3, 2007, 5:17pm UTC](https://www.ruby-forum.com/t/config-h-on-linux-for-building-racc/84310 "2007-02-03T17:17:48Z")

</div>

Hi all, I’m trying to build racc, the yacc-like thing for Ruby. I get this error at make time: “\*\*\* No rule to make target ‘/usr/lib/ruby/1.8/i486-linux.config.h’, needed by ‘cparse.o’. Stop” So, looking in that dir…

---

## [Fastri-server problem?](https://www.ruby-forum.com/t/fastri-server-problem/84239)

<div class="topic-metadata">

**Author:** [@bbiker](https://www.ruby-forum.com/u/bbiker)\
**Replies:** 7\
**Last updated:** [February 3, 2007, 12:53pm UTC](https://www.ruby-forum.com/t/fastri-server-problem/84239 "2007-02-03T12:53:28Z")

</div>

I have downloaded and install fastri from the tarball. Works fine and I qri eventhough it is slower than fri … reason I don’t to keep the fastri-server window reduced or otherwise. Fastri-server does seem to have prob…

---

## [Help problem SOAP4R with xsd:any](https://www.ruby-forum.com/t/help-problem-soap4r-with-xsd-any/84345)

<div class="topic-metadata">

**Author:** [@jima](https://www.ruby-forum.com/u/jima)\
**Replies:** 0\
**Last updated:** [February 3, 2007, 11:53am UTC](https://www.ruby-forum.com/t/help-problem-soap4r-with-xsd-any/84345 "2007-02-03T11:53:25Z")

</div>

Apologies in advance for cross-posting but I have been trying to resolve this problem for several days…without much success. I have looked on the mailing list and the web but have yet to find a resolution to this prob…

---

## [Problem with WEBRick and eruby](https://www.ruby-forum.com/t/problem-with-webrick-and-eruby/84342)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [February 3, 2007, 10:27am UTC](https://www.ruby-forum.com/t/problem-with-webrick-and-eruby/84342 "2007-02-03T10:27:15Z")

</div>

Hi, I am just starting in both ruby and web development so maybe the following pieces of code seem a sin for most of you. I am writing a HTML form in a rhtml file and pass the parameters to antoher rhtml with embebed…

---

## [Pre-processor $B$G$N(B YARV $BH=Dj(B](https://www.ruby-forum.com/t/pre-processor-b-g-n-b-yarv-bh-dj-b/83027)

<div class="topic-metadata">

**Author:** [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Replies:** 12\
**Last updated:** [February 3, 2007, 10:01am UTC](https://www.ruby-forum.com/t/pre-processor-b-g-n-b-yarv-bh-dj-b/83027 "2007-02-03T10:01:13Z")

</div>

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B e$B%3%s%Q%$%k;~$Ne(B pre-processor e$B%l%Y%k$G!$e(B YARV e$BF3F~8e$Ne(B Ruby e$B$+$I$&$+$rH=Dj$9$k$N$Oe(B e$B$I$N$h$&$K$9$k$N$,@5$7$$$d$jJ}$G$7$g$&$+!)e(B

---

## [Pdf writer font not found](https://www.ruby-forum.com/t/pdf-writer-font-not-found/84327)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [February 3, 2007, 6:56am UTC](https://www.ruby-forum.com/t/pdf-writer-font-not-found/84327 "2007-02-03T06:56:01Z")

</div>

I cannot figure out how to get a font loaded. I have in c:\\windows/ fonts a font file named w128m.ttf. It displays as “WASP 128 M(TrueType)”. I haven’t been able to code the select\_font method to load the font. PD…

---

## [How do Rakefiles "know" about built-in Rake methods?](https://www.ruby-forum.com/t/how-do-rakefiles-know-about-built-in-rake-methods/84304)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 5\
**Last updated:** [February 3, 2007, 6:05am UTC](https://www.ruby-forum.com/t/how-do-rakefiles-know-about-built-in-rake-methods/84304 "2007-02-03T06:05:59Z")

</div>

I’m looking into a way to let business users write functional tests in rails, and I wanted to have my functional test file load an external file to supply the body of a method. It occurs to me that Rake must have sol…

---

## [Bug is ruby regexp](https://www.ruby-forum.com/t/bug-is-ruby-regexp/84232)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 5\
**Last updated:** [February 3, 2007, 5:55am UTC](https://www.ruby-forum.com/t/bug-is-ruby-regexp/84232 "2007-02-03T05:55:59Z")

</div>

Hello, I spotted this problem in ruby’s regexp today: $ irb(main):001:0\> num = “10” =\> “10” irb(main):002:0\> if num =~ /\[9-13\]/ irb(main):003:1\> puts “hello” irb(main):004:1\> end SyntaxError: compile error (irb):…

---

## [Rails Conf Registration Open](https://www.ruby-forum.com/t/rails-conf-registration-open/84276)

<div class="topic-metadata">

**Author:** [@rkoskela](https://www.ruby-forum.com/u/rkoskela)\
**Replies:** 2\
**Last updated:** [February 3, 2007, 4:08am UTC](https://www.ruby-forum.com/t/rails-conf-registration-open/84276 "2007-02-03T04:08:54Z")

</div>

Hey all, The 2007 Rails Conference is now open for registration: This sold out VERY quickly last year…just remember that! See you there, Rich

---

## [Halving a string](https://www.ruby-forum.com/t/halving-a-string/84189)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 22\
**Last updated:** [February 3, 2007, 1:50am UTC](https://www.ruby-forum.com/t/halving-a-string/84189 "2007-02-03T01:50:45Z")

</div>

I have a vacuum fluorescent display in my office, and I’ve been messing around with it. Now that I’ve figured out how to communicate with the serial connection it’s time for some fun. Its shortcoming is its 2 lines of…

---

## [Inject error when no default starting value given?](https://www.ruby-forum.com/t/inject-error-when-no-default-starting-value-given/84270)

<div class="topic-metadata">

**Author:** [@dfg59](https://www.ruby-forum.com/u/dfg59)\
**Replies:** 2\
**Last updated:** [February 2, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/inject-error-when-no-default-starting-value-given/84270 "2007-02-02T23:07:31Z")

</div>

I have an Event model which has\_many :attendees. My Attendee model has a column called participants, which is an integer representing the number of participants in the attendees party. I want to sum the total number o…

---

## [A pair of contests (win books)](https://www.ruby-forum.com/t/a-pair-of-contests-win-books/84302)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [February 2, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/a-pair-of-contests-win-books/84302 "2007-02-02T22:52:28Z")

</div>

Okay, so last month’s blogging contest was pretty Rails centric. This month it’s all about Ruby but it’s the same great prize, the winner gets three books of their choice from Apress. Details are here: On Ruby: Blog…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/84300)

<div class="topic-metadata">

**Author:** [@giordano](https://www.ruby-forum.com/u/giordano)\
**Replies:** 0\
**Last updated:** [February 2, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/no-subject/84300 "2007-02-02T22:37:27Z")

</div>

unsubscribe

---

## [Bugs in Matrix#rank](https://www.ruby-forum.com/t/bugs-in-matrix-rank/84283)

<div class="topic-metadata">

**Author:** [@sander](https://www.ruby-forum.com/u/sander)\
**Replies:** 0\
**Last updated:** [February 2, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/bugs-in-matrix-rank/84283 "2007-02-02T22:06:24Z")

</div>

I think I found some bugs in Matrix#rank ruby -rmatrix -e’p Matrix\[\[7,0\], \[1,0\], \[2,0\]\].rank’ …/matrix.rb:761:in \`/’: nil can’t be coerced into Fixnum (TypeError) ruby -rmatrix -e’p Matrix\[\[7,0\], \[1,0\], \[2,1\]\].ran…

---

## [Beginner Question - Pagination, Each?](https://www.ruby-forum.com/t/beginner-question-pagination-each/84259)

<div class="topic-metadata">

**Author:** [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Replies:** 3\
**Last updated:** [February 2, 2007, 9:48pm UTC](https://www.ruby-forum.com/t/beginner-question-pagination-each/84259 "2007-02-02T21:48:20Z")

</div>

Many thanks to anyone willing to assist. I have a rails database application that produces about 20 pages showing 10 lines each. I’d like a link at the bottom to each page that looks like many you have seen: Go to p…

---

## [Redbox question](https://www.ruby-forum.com/t/redbox-question/84278)

<div class="topic-metadata">

**Author:** [@jerryjj](https://www.ruby-forum.com/u/jerryjj)\
**Replies:** 1\
**Last updated:** [February 2, 2007, 9:47pm UTC](https://www.ruby-forum.com/t/redbox-question/84278 "2007-02-02T21:47:22Z")

</div>

This may come acrossed as a really dumb question. I am wanting to setup redbox on a website. I can get lightbox to work on a non-ruby website. Anyhow, here is one line they say to do. \<%= stylesheet\_link\_tag ‘redbox’…

---

## [Reading several data entries per line from screen](https://www.ruby-forum.com/t/reading-several-data-entries-per-line-from-screen/84269)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 2\
**Last updated:** [February 2, 2007, 9:44pm UTC](https://www.ruby-forum.com/t/reading-several-data-entries-per-line-from-screen/84269 "2007-02-02T21:44:14Z")

</div>

Is there a single, easy method in Ruby that will let me read multiple numbers from the screen directly into multiple variables? For instance, say I have two variable called “age” and “weight”, and query the user to en…

---

## [MySQL database and Ruby](https://www.ruby-forum.com/t/mysql-database-and-ruby/84265)

<div class="topic-metadata">

**Author:** [@dips](https://www.ruby-forum.com/u/dips)\
**Replies:** 2\
**Last updated:** [February 2, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/mysql-database-and-ruby/84265 "2007-02-02T21:20:20Z")

</div>

Hello, I am new to programming ruby and currently as part of university assignment we have to create a website with MySQL as the database and link them together. We also use RadRails. I have managed to create the da…

---

## [What's up with Time.local?](https://www.ruby-forum.com/t/whats-up-with-time-local/84251)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 5\
**Last updated:** [February 2, 2007, 8:46pm UTC](https://www.ruby-forum.com/t/whats-up-with-time-local/84251 "2007-02-02T20:46:53Z")

</div>

I need to check some file dates against the budgetary periods of our company, to determine where those files get placed. I’m playing with the Time.local object. I’ve proven that I can denote which budget period I’m in…

---

## [Silly Code from The Muppet Laboratories](https://www.ruby-forum.com/t/silly-code-from-the-muppet-laboratories/84264)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 3\
**Last updated:** [February 2, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/silly-code-from-the-muppet-laboratories/84264 "2007-02-02T20:16:13Z")

</div>

… for lazy typers - can also be used for obfuscation. Might make your code unmaintainable, instable or both. Use at own risk. robert

---

## [Regular Expression issue](https://www.ruby-forum.com/t/regular-expression-issue/84237)

<div class="topic-metadata">

**Author:** [@anon1m0us](https://www.ruby-forum.com/u/anon1m0us)\
**Replies:** 1\
**Last updated:** [February 2, 2007, 6:41pm UTC](https://www.ruby-forum.com/t/regular-expression-issue/84237 "2007-02-02T18:41:01Z")

</div>

Hi; I created a program that needs to parse through multiple files looking for users and groups. The users are listed with Employee Number and Name and then Groups. The format is as follows: C008658 Smith,John C00952…

---

## [Calling a class method from an extended object](https://www.ruby-forum.com/t/calling-a-class-method-from-an-extended-object/84241)

<div class="topic-metadata">

**Author:** [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Replies:** 2\
**Last updated:** [February 2, 2007, 6:35pm UTC](https://www.ruby-forum.com/t/calling-a-class-method-from-an-extended-object/84241 "2007-02-02T18:35:01Z")

</div>

Hi all ! I’m on Rails, and I have a general Ruby question. Here’s a part of my code: class MockControllerBase; end module AuthenticatedSystem def self.included(base) base.send :include, AuthenticatedSystem::Instan…

---

## [Win32ole question](https://www.ruby-forum.com/t/win32ole-question/84151)

<div class="topic-metadata">

**Author:** [@bitsmith](https://www.ruby-forum.com/u/bitsmith)\
**Replies:** 4\
**Last updated:** [February 2, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/win32ole-question/84151 "2007-02-02T17:20:05Z")

</div>

can anybody point me to a good web page or know how to: using ruby’s WIN32OLE ‘save as’ a current Worksheet into a csv format by only using ruby’s WIN32OLE access?

---

## [Adding to Hashes](https://www.ruby-forum.com/t/adding-to-hashes/84211)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 2\
**Last updated:** [February 2, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/adding-to-hashes/84211 "2007-02-02T16:36:48Z")

</div>

Hello, I need to add key and value pairs to a hash dynamically. I want to do this: array = \[\] array \<\< “hello” array \<\< “world” But with k v pairs of a hash. The hash is being populated from a database and there…

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

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