# Ruby

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

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

---

## [Re: case when when](https://www.ruby-forum.com/t/re-case-when-when/119937)

<div class="topic-metadata">

**Author:** [@Martyn](https://www.ruby-forum.com/u/Martyn)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/re-case-when-when/119937 "2007-11-12T20:40:41Z")

</div>

when 5: , 9:

---

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

<div class="topic-metadata">

**Author:** [@jarvo88](https://www.ruby-forum.com/u/jarvo88)\
**Replies:** 4\
**Last updated:** [November 12, 2007, 8:20pm UTC](https://www.ruby-forum.com/t/socket-timeout/119896 "2007-11-12T20:20:58Z")

</div>

I am using a TCPSocket and I want the script to restart if the connection times out. I have tried doing it myself and searched around everywhere for a solution but I have had no luck… Any help would be great tia Lee …

---

## [FW: Quick update on IronRuby status](https://www.ruby-forum.com/t/fw-quick-update-on-ironruby-status/119998)

<div class="topic-metadata">

**Author:** [@John\_LSSDLR](https://www.ruby-forum.com/u/John_LSSDLR)\
**Replies:** 0\
**Last updated:** [November 12, 2007, 8:09pm UTC](https://www.ruby-forum.com/t/fw-quick-update-on-ironruby-status/119998 "2007-11-12T20:09:01Z")

</div>

Whoops … sent this out to ruby-talk by accident :frowning: -John

---

## [Format string](https://www.ruby-forum.com/t/format-string/119960)

<div class="topic-metadata">

**Author:** [@stonebreaker](https://www.ruby-forum.com/u/stonebreaker)\
**Replies:** 3\
**Last updated:** [November 12, 2007, 7:37pm UTC](https://www.ruby-forum.com/t/format-string/119960 "2007-11-12T19:37:11Z")

</div>

Hello, In other language there is often a function for format a string. Format(“Hello %s”,\[“Stonebreaker”\]) I’m would like to use this for localization strings so the “#{var}” would not be a good chooise. Is there a…

---

## [Export to Excel Spreadsheet](https://www.ruby-forum.com/t/export-to-excel-spreadsheet/196516)

<div class="topic-metadata">

**Author:** [@CORPOSALAN\_MACIEL](https://www.ruby-forum.com/u/CORPOSALAN_MACIEL)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 7:02pm UTC](https://www.ruby-forum.com/t/export-to-excel-spreadsheet/196516 "2007-11-12T19:02:11Z")

</div>

Hi Everyone, I’m looking for a reporter for Ruby, I need to export some data to a predefined Excel spreadsheet, I am trying to use jasper but I can’t find a good tutorial. Thanks in advance

---

## [Problem installing ruby in linux virtual machine](https://www.ruby-forum.com/t/problem-installing-ruby-in-linux-virtual-machine/119965)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [November 12, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/problem-installing-ruby-in-linux-virtual-machine/119965 "2007-11-12T18:42:43Z")

</div>

I’m running a linux virtual machine on my windows pc, and am trying to install ruby. i’ve used apt-get, like so: apt-Â­get install ruby ri rdoc mysqlÂ­server libmysqlÂ­ruby now, ruby is there but not installed. ie w…

---

## [IronRuby Visual Form Designer (preview)](https://www.ruby-forum.com/t/ironruby-visual-form-designer-preview/118863)

<div class="topic-metadata">

**Author:** [@huw](https://www.ruby-forum.com/u/huw)\
**Replies:** 6\
**Last updated:** [November 12, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/ironruby-visual-form-designer-preview/118863 "2007-11-12T17:50:55Z")

</div>

I’ve just put online a short walkthrough demo of our form designer for IronRuby. I thought people might be interested to take a look… http://www.sapphiresteel.com/IronRuby-Visual-Form-Designer best wishes Huw

---

## [Including nil HTTP header](https://www.ruby-forum.com/t/including-nil-http-header/119976)

<div class="topic-metadata">

**Author:** [@el2king](https://www.ruby-forum.com/u/el2king)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/including-nil-http-header/119976 "2007-11-12T17:09:46Z")

</div>

I am trying to connect to a web service with an HTTP request, and I am working around with the HTTP headers. I am able to create my own custom headers for the HTTP request, and everything is fine when the header has …

---

## [Grokking the C code](https://www.ruby-forum.com/t/grokking-the-c-code/119877)

<div class="topic-metadata">

**Author:** [@stefankroes](https://www.ruby-forum.com/u/stefankroes)\
**Replies:** 3\
**Last updated:** [November 12, 2007, 5:00pm UTC](https://www.ruby-forum.com/t/grokking-the-c-code/119877 "2007-11-12T17:00:24Z")

</div>

Hello. Last few days I’ve been spending parts of the evenings digging into Ruby’s C code. I’m trying to get a basic idea of how everything works, both to learn and to introduce some tweaks in the language (just for m…

---

## [trunk$B$G%S%k%I\<:GT(B](https://www.ruby-forum.com/t/trunk-b-g-s-k-i-gt-b/119911)

<div class="topic-metadata">

**Author:** [@KIMURA\_Koichi](https://www.ruby-forum.com/u/KIMURA_Koichi)\
**Replies:** 4\
**Last updated:** [November 12, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/trunk-b-g-s-k-i-gt-b/119911 "2007-11-12T16:53:22Z")

</div>

e$BLZB\<$G$9!#e(B ruby-core e$B$GF1MM$NJs9p$,5s$,$C$F$^$9$,0l1~$3$A$i$G$b!#e(B e$B8=\>u$Ne(B trunk e$B$G%S%k%I$,$G$-$^$;$s!#6qBNE\*$J\>I\>u$H$7$F$O!"e(B minirubye$B$G;HMQ$9$k%9%?%F%#%C%/%i%$%V%i%j!"e(Bmswin32e$B$G$$$&$He(B …

---

## [Segmentation fault with turing gem on 64bit gentoo](https://www.ruby-forum.com/t/segmentation-fault-with-turing-gem-on-64bit-gentoo/70398)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 3\
**Last updated:** [November 12, 2007, 4:37pm UTC](https://www.ruby-forum.com/t/segmentation-fault-with-turing-gem-on-64bit-gentoo/70398 "2007-11-12T16:37:38Z")

</div>

I’m sorry if this is not the appropriate place to post this: I am running 64bit gentoo with the truetype use flag used to build gd, with the turing and gd2 gems installed on kernel 2.6.18, with ruby 1.8.4-r3. When at…

---

## [ActionMailer integration tests with Rails](https://www.ruby-forum.com/t/actionmailer-integration-tests-with-rails/119968)

<div class="topic-metadata">

**Author:** [@SSAndrSSSS\_M.A.SSS](https://www.ruby-forum.com/u/SSAndrSSSS_M.A.SSS)\
**Replies:** 0\
**Last updated:** [November 12, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/actionmailer-integration-tests-with-rails/119968 "2007-11-12T16:35:47Z")

</div>

Hi using ActionMailer, during integration tests with Rails. The default methods : after\_create and after\_save in the Observer class arent working. It worked when not testing or testing for functionality and even unit…

---

## [Export to Excel Spreadsheet](https://www.ruby-forum.com/t/export-to-excel-spreadsheet/119966)

<div class="topic-metadata">

**Author:** [@CORPOSALAN\_MACIEL](https://www.ruby-forum.com/u/CORPOSALAN_MACIEL)\
**Replies:** 0\
**Last updated:** [November 12, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/export-to-excel-spreadsheet/119966 "2007-11-12T16:22:15Z")

</div>

Hi Everyone, I’m looking for a reporter for Ruby, I need to export some data to a predefined Excel spreadsheet, I am trying to use jasper but I can’t find a good tutorial. Thanks in advance

---

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

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 3\
**Last updated:** [November 12, 2007, 4:14pm UTC](https://www.ruby-forum.com/t/array-select/119951 "2007-11-12T16:14:11Z")

</div>

i have 2 arrays of objects: dates and places dates have attribute place\_id and places have id I must to selezionate all places that have id in array of objects dates. dates.select{|obj| obj.place\_id in places\[\].id } …

---

## [How do you use flexmock or mocha to test user interaction?](https://www.ruby-forum.com/t/how-do-you-use-flexmock-or-mocha-to-test-user-interaction/119915)

<div class="topic-metadata">

**Author:** [@pood](https://www.ruby-forum.com/u/pood)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 3:54pm UTC](https://www.ruby-forum.com/t/how-do-you-use-flexmock-or-mocha-to-test-user-interaction/119915 "2007-11-12T15:54:44Z")

</div>

I can’t seem to figure this out Here’s my code that takes user input def input\_money (machine) print ‘How much money would you like to put in?’ money\_used = gets.chomp.to\_f #the check is not working if money\_used \> …

---

## [Integer#ord for 1.8](https://www.ruby-forum.com/t/integer-ord-for-1-8/119819)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 3\
**Last updated:** [November 12, 2007, 3:38pm UTC](https://www.ruby-forum.com/t/integer-ord-for-1-8/119819 "2007-11-12T15:38:15Z")

</div>

1.9 e$B$He(B 1.8 e$B$NN\>J}$Ge(B ?a.ord e$B$Ge(B 97 e$B$,F@$i$l$k$h$&$K!"e(B1.8 e$B$Ke(B Integer#ord e$B$r2C$($k$N$O$I$&$G$7$g$&$+!#e(B Index: numeric.c — numeric.c (e$B%j%S%8%g%se(B 13873) +++ numeric.c (e$B:n6H%3%…

---

## [Another Ruby on Rails certificate program](https://www.ruby-forum.com/t/another-ruby-on-rails-certificate-program/119872)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 7\
**Last updated:** [November 12, 2007, 3:21pm UTC](https://www.ruby-forum.com/t/another-ruby-on-rails-certificate-program/119872 "2007-11-12T15:21:50Z")

</div>

repent! the end is near! http://ipd.cti.depaul.edu/ror/Prog\_ror.htm – Giles B. Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com/

---

## [Generate an array of dates](https://www.ruby-forum.com/t/generate-an-array-of-dates/119948)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 2:10pm UTC](https://www.ruby-forum.com/t/generate-an-array-of-dates/119948 "2007-11-12T14:10:13Z")

</div>

I want to generate an array of dates from date1 to date2 I try with but not works How i can do? Thanks

---

## [Quick Straw Poll: Mailing List Management implemented in Ruby](https://www.ruby-forum.com/t/quick-straw-poll-mailing-list-management-implemented-in-ruby/119938)

<div class="topic-metadata">

**Author:** [@Sean\_Mehan](https://www.ruby-forum.com/u/Sean_Mehan)\
**Replies:** 0\
**Last updated:** [November 12, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/quick-straw-poll-mailing-list-management-implemented-in-ruby/119938 "2007-11-12T13:02:53Z")

</div>

Ruby chaps, excuse the noise, but I have been wandering the web with little success. Does anyone have experience of implementing or deploying an existing implementation of a mailing list management system in Ruby? So…

---

## [Bug in nested defs (?)](https://www.ruby-forum.com/t/bug-in-nested-defs/119848)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 7\
**Last updated:** [November 12, 2007, 11:42am UTC](https://www.ruby-forum.com/t/bug-in-nested-defs/119848 "2007-11-12T11:42:04Z")

</div>

When the following code is evaluated def foo ; "foo" ; end where does the method go? Here is what I would guess. If the evaluation context of the def is a class, then the method is an instance method of the class. …

---

## [An attr\_\* in a constructor?](https://www.ruby-forum.com/t/an-attr-in-a-constructor/119890)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 2\
**Last updated:** [November 12, 2007, 11:35am UTC](https://www.ruby-forum.com/t/an-attr-in-a-constructor/119890 "2007-11-12T11:35:38Z")

</div>

Hi, Can I not use an attr\_\* in a constructor? I am receiving a initialize': undefined methodattr\_accessor’ class Whatever def initialize attr\_accessor :log @log = 'whatever' end end Whatever.new Thanks …

---

## [Ruby 1.9 snapshot binary package](https://www.ruby-forum.com/t/ruby-1-9-snapshot-binary-package/119724)

<div class="topic-metadata">

**Author:** [@Masayoshi\_T](https://www.ruby-forum.com/u/Masayoshi_T)\
**Replies:** 3\
**Last updated:** [November 12, 2007, 11:25am UTC](https://www.ruby-forum.com/t/ruby-1-9-snapshot-binary-package/119724 "2007-11-12T11:25:06Z")

</div>

e$B9b66@,5A$G$9!#e(B Ruby 1.9e$B$K$D$$$F!“8=;~E@$N%9%J%C%W%7%g%C%H$r%3%s%Q%$%k$7$F\<B9T7A\<0$Ke(B e$B$7$?$b$N!”$H$$$&$N$O4JC1$KMQ0U$G$-$J$$$b$N$G$7$g$&$+!)e(B e$BFC$K!“e(BWindowse$BHG$,$\[$7$$$G$9!J\<j85$G$Oe(BcoLinuxe$B…

---

## [Setup and Teardown](https://www.ruby-forum.com/t/setup-and-teardown/119700)

<div class="topic-metadata">

**Author:** [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Replies:** 6\
**Last updated:** [November 12, 2007, 11:16am UTC](https://www.ruby-forum.com/t/setup-and-teardown/119700 "2007-11-12T11:16:55Z")

</div>

I was wondering… There are so many different ways to setup and teardown in the Test Cases thing!!! So I thought maybe could be a very good idea to open a new topic about that and people contribute with their ideas abo…

---

## [RubyOnRails - One view, many actions](https://www.ruby-forum.com/t/rubyonrails-one-view-many-actions/119880)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [November 12, 2007, 10:03am UTC](https://www.ruby-forum.com/t/rubyonrails-one-view-many-actions/119880 "2007-11-12T10:03:08Z")

</div>

Hi all, I’ve got a view named "prompt.rhtml"and a controller named “customer” with some actions (“prompt”, “getdata”, and so on…). Of course, the URL “/customer/prompt” is associated to the action “prompt” and then t…

---

## [Getting methods defined in the top scope](https://www.ruby-forum.com/t/getting-methods-defined-in-the-top-scope/119917)

<div class="topic-metadata">

**Author:** [@thilinamb](https://www.ruby-forum.com/u/thilinamb)\
**Replies:** 4\
**Last updated:** [November 12, 2007, 8:34am UTC](https://www.ruby-forum.com/t/getting-methods-defined-in-the-top-scope/119917 "2007-11-12T08:34:15Z")

</div>

I am trying to get the names of the methods defined by myself in the top scope. I tried it by using " self.class.private\_instance\_methods(false).sort " But it gives two additional methods given below. inherited init…

---

## [Quick Guide for Ruby Programming](https://www.ruby-forum.com/t/quick-guide-for-ruby-programming/119804)

<div class="topic-metadata">

**Author:** [@Waleed\_H](https://www.ruby-forum.com/u/Waleed_H)\
**Replies:** 4\
**Last updated:** [November 12, 2007, 7:26am UTC](https://www.ruby-forum.com/t/quick-guide-for-ruby-programming/119804 "2007-11-12T07:26:29Z")

</div>

Hello All, I am looking for some websites and links to find quick ruby guide, I worked on Perl and Bash. if you have useful links or fast track books online I appreciate you for your help.

---

## [Controlling attribute setting in a Struct](https://www.ruby-forum.com/t/controlling-attribute-setting-in-a-struct/119913)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [November 12, 2007, 6:40am UTC](https://www.ruby-forum.com/t/controlling-attribute-setting-in-a-struct/119913 "2007-11-12T06:40:27Z")

</div>

I’m using a bunch of Struct classes in a program; they’re a perfect way for me to bundle and access attributes. But in one of my subclasses of Struct, I’m trying to control setting attributes so that setting an attrib…

---

## [The Man or Boy Recursion Test](https://www.ruby-forum.com/t/the-man-or-boy-recursion-test/119792)

<div class="topic-metadata">

**Author:** [@Werner](https://www.ruby-forum.com/u/Werner)\
**Replies:** 16\
**Last updated:** [November 12, 2007, 4:27am UTC](https://www.ruby-forum.com/t/the-man-or-boy-recursion-test/119792 "2007-11-12T04:27:39Z")

</div>

Hello, being new to ruby I try to understand the language. In a different context I came across the following: Out of curiosity I tried to write an equivalent piece of code in ruby but apparently my depth of knowle…

---

## [CGI.new Can't Get the value?](https://www.ruby-forum.com/t/cgi-new-cant-get-the-value/119847)

<div class="topic-metadata">

**Author:** [@waterhk](https://www.ruby-forum.com/u/waterhk)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 1:41am UTC](https://www.ruby-forum.com/t/cgi-new-cant-get-the-value/119847 "2007-11-12T01:41:37Z")

</div>

i use ruby to write a cgi … but i can not use the CGI.new to get the “sk=go” value… who can help me to fix the problem ? thanks ======================= index.html : Test username : password : ===========…

---

## [Gosu 0.7.7 (includes Chipmunk & ruby-opengl integration demos)](https://www.ruby-forum.com/t/gosu-0-7-7-includes-chipmunk-ruby-opengl-integration-demos/119859)

<div class="topic-metadata">

**Author:** [@nex4k](https://www.ruby-forum.com/u/nex4k)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 1:39am UTC](https://www.ruby-forum.com/t/gosu-0-7-7-includes-chipmunk-ruby-opengl-integration-demos/119859 "2007-11-12T01:39:30Z")

</div>

Hi, the new, Leopard-compatible Gosu 0.7.7 has been available as a ZIP download for two weeks, but there were problems with the RubyGems distribution up until last night (that’s where the weird gem version numbers co…

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

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