# Ruby

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

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

---

## [Time = .collect {|i| {i=\> Time.now.send(i).to\_i}}](https://www.ruby-forum.com/t/time-collect-i-i-time-now-send-i-to-i/77869)

<div class="topic-metadata">

**Author:** [@d0t1q](https://www.ruby-forum.com/u/d0t1q)\
**Replies:** 4\
**Last updated:** [December 2, 2006, 7:36am UTC](https://www.ruby-forum.com/t/time-collect-i-i-time-now-send-i-to-i/77869 "2006-12-02T07:36:51Z")

</div>

What’s the best way to make the first item below yield a hash instead of an array in one line? I’m struggling :frowning: #doesnt work time = \[“min”, “sec”\].collect {|i| {i=\> Time.now.send(i).to\_i}} puts time.type # A…

---

## [Aws/s3 0.1.2 (point release)](https://www.ruby-forum.com/t/aws-s3-0-1-2-point-release/77984)

<div class="topic-metadata">

**Author:** [@Marcel\_Molina\_Jr](https://www.ruby-forum.com/u/Marcel_Molina_Jr)\
**Replies:** 3\
**Last updated:** [December 2, 2006, 6:24am UTC](https://www.ruby-forum.com/t/aws-s3-0-1-2-point-release/77984 "2006-12-02T06:24:48Z")

</div>

A memory leak was discovered in the parsing code of aws/s3. The culprit was a bit of code that used the generator library which is implemented with continuations. This (unnecessarily) fancy code was replaced with a s…

---

## [Four Fours](https://www.ruby-forum.com/t/four-fours/77983)

<div class="topic-metadata">

**Author:** [@Hung\_Dao](https://www.ruby-forum.com/u/Hung_Dao)\
**Replies:** 1\
**Last updated:** [December 2, 2006, 6:16am UTC](https://www.ruby-forum.com/t/four-fours/77983 "2006-12-02T06:16:46Z")

</div>

First , please have a look at this : http://www.carljohansen.co.uk/fourfours/ or google for the terms “four fours” I do not know C sharp ,so that i cant read the solution in that page , but my idea is that I will su…

---

## [Is there a simply way to get every method log itself before](https://www.ruby-forum.com/t/is-there-a-simply-way-to-get-every-method-log-itself-before/77165)

<div class="topic-metadata">

**Author:** [@richard](https://www.ruby-forum.com/u/richard)\
**Replies:** 10\
**Last updated:** [December 2, 2006, 5:20am UTC](https://www.ruby-forum.com/t/is-there-a-simply-way-to-get-every-method-log-itself-before/77165 "2006-12-02T05:20:39Z")

</div>

Hi, As a Ruby nubie, every once-in-a-while I’d like to write a trace function and have every method execute that trace when the method’s invoked. In that trace function, I’d like to be able, e.g. to write the invo…

---

## [Aws/s3 0.1.0 (initial release)](https://www.ruby-forum.com/t/aws-s3-0-1-0-initial-release/77563)

<div class="topic-metadata">

**Author:** [@Marcel\_Molina\_Jr](https://www.ruby-forum.com/u/Marcel_Molina_Jr)\
**Replies:** 20\
**Last updated:** [December 2, 2006, 4:36am UTC](https://www.ruby-forum.com/t/aws-s3-0-1-0-initial-release/77563 "2006-12-02T04:36:35Z")

</div>

This is the initial release of aws/s3, a ruby library for Amazon’s Simple Store Service’s (S3) REST API. It implements the entire REST API aiming to be simple, comprehensive and extensible. Aside from the basics, it…

---

## [Timers, scheduling and Ruby](https://www.ruby-forum.com/t/timers-scheduling-and-ruby/77778)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 23\
**Last updated:** [December 2, 2006, 4:06am UTC](https://www.ruby-forum.com/t/timers-scheduling-and-ruby/77778 "2006-12-02T04:06:53Z")

</div>

Ok, since the original post migh just appear in a month’s time, lets rephrase the question: I’m building a set of tools for build and test management (yes, yes, it will do DamagaControl’s work and yes, yes it will be …

---

## [Mocha and ActiveRecord](https://www.ruby-forum.com/t/mocha-and-activerecord/77459)

<div class="topic-metadata">

**Author:** [@JSBSRainsberger](https://www.ruby-forum.com/u/JSBSRainsberger)\
**Replies:** 3\
**Last updated:** [December 2, 2006, 3:50am UTC](https://www.ruby-forum.com/t/mocha-and-activerecord/77459 "2006-12-02T03:50:30Z")

</div>

Everyone: I’ve been using Mocha, which I rather love, to help me test-drive some Rails code. I’ve run up against something a little clunky, and I’m hoping one of you can help me out. Suppose I have an Order, which ha…

---

## [Mysql source command doesn't work?](https://www.ruby-forum.com/t/mysql-source-command-doesnt-work/77979)

<div class="topic-metadata">

**Author:** [@nappin](https://www.ruby-forum.com/u/nappin)\
**Replies:** 2\
**Last updated:** [December 2, 2006, 3:08am UTC](https://www.ruby-forum.com/t/mysql-source-command-doesnt-work/77979 "2006-12-02T03:08:24Z")

</div>

I’m trying to use the mysql ‘source’ command within a ruby script to run a batch file, but it doens’t seem to work. When I run the source command straight from mysql, though, it runs just fine. Here’s a short exampl…

---

## [Splitting a CSV file into 40,000 line chunks](https://www.ruby-forum.com/t/splitting-a-csv-file-into-40-000-line-chunks/77666)

<div class="topic-metadata">

**Author:** [@dfg59](https://www.ruby-forum.com/u/dfg59)\
**Replies:** 42\
**Last updated:** [December 2, 2006, 2:06am UTC](https://www.ruby-forum.com/t/splitting-a-csv-file-into-40-000-line-chunks/77666 "2006-12-02T02:06:18Z")

</div>

All - I’ve written a script to split a .csv file into smaller .csv files of 40,000 lines each. The intent here is to break the file down enough so that excel does not have issues reading each chunk. My code takes a f…

---

## [Komodo issue](https://www.ruby-forum.com/t/komodo-issue/77973)

<div class="topic-metadata">

**Author:** [@cyrusg](https://www.ruby-forum.com/u/cyrusg)\
**Replies:** 3\
**Last updated:** [December 2, 2006, 1:59am UTC](https://www.ruby-forum.com/t/komodo-issue/77973 "2006-12-02T01:59:35Z")

</div>

I’m trying to make an http conenction (to scrape a website) from within Komodo and am getting a ECONNREFUSED error: Example: require “open-uri” open(“http://www.yahoo.com”) But I can open a terminal session and use …

---

## [Open-uril ECONNREFUSED problem](https://www.ruby-forum.com/t/open-uril-econnrefused-problem/77861)

<div class="topic-metadata">

**Author:** [@cyrusg](https://www.ruby-forum.com/u/cyrusg)\
**Replies:** 11\
**Last updated:** [December 2, 2006, 12:58am UTC](https://www.ruby-forum.com/t/open-uril-econnrefused-problem/77861 "2006-12-02T00:58:15Z")

</div>

I’m working on a simple scraping tool and the open() method has suddenly stopped working! This 2 line program fails with a ECONNREFUSED exception in open-uri: require “open-uri” open(“http://www.yahoo.com”) from…

---

## [Ruby Memory Tracking API](https://www.ruby-forum.com/t/ruby-memory-tracking-api/77974)

<div class="topic-metadata">

**Author:** [@albino\_squirrel](https://www.ruby-forum.com/u/albino_squirrel)\
**Replies:** 0\
**Last updated:** [December 2, 2006, 12:06am UTC](https://www.ruby-forum.com/t/ruby-memory-tracking-api/77974 "2006-12-02T00:06:04Z")

</div>

Hello everyone, A while back we said we’d write a Ruby Memory Tracking API. We have done that. Sorry we took so long getting around to doing it - it had to fit in with everything else we are doing. You can read about…

---

## [OCSPError.superclass is Object](https://www.ruby-forum.com/t/ocsperror-superclass-is-object/77776)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 1\
**Last updated:** [December 1, 2006, 11:42pm UTC](https://www.ruby-forum.com/t/ocsperror-superclass-is-object/77776 "2006-12-01T23:42:00Z")

</div>

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B e$B%j%U%!%l%s%9$N@0Hw:n6H$r$7$F$$$F5$IU$$$?$N$G$9$,!"e(B openssl e$B$Ne(B OpenSSL::OCSP::OCSPError e$B$N?F%/%i%9$,e(B Object e$B$K$J$C$F$$$^$9!#e(BOpenSSL::OpenSSLError e$B$,e(B …

---

## [How do I get rake to compile native extension during gem ins](https://www.ruby-forum.com/t/how-do-i-get-rake-to-compile-native-extension-during-gem-ins/77952)

<div class="topic-metadata">

**Author:** [@jyzhang](https://www.ruby-forum.com/u/jyzhang)\
**Replies:** 0\
**Last updated:** [December 1, 2006, 9:55pm UTC](https://www.ruby-forum.com/t/how-do-i-get-rake-to-compile-native-extension-during-gem-ins/77952 "2006-12-01T21:55:42Z")

</div>

Hi, I have a little problem and I don’t know how to solve. I created a little native extension that I want to package as a gem. The problem is that because of the nature of the extension, I created a custom Rakefile t…

---

## [Re: Timers, scheduling and Ruby](https://www.ruby-forum.com/t/re-timers-scheduling-and-ruby/77949)

<div class="topic-metadata">

**Author:** [@LipperS\_Matthew](https://www.ruby-forum.com/u/LipperS_Matthew)\
**Replies:** 1\
**Last updated:** [December 1, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/re-timers-scheduling-and-ruby/77949 "2006-12-01T21:49:40Z")

</div>

here’s what i’d like inclusive\_endpoint = Time.now + 7.days ^^^^^^^^ is there already a library/utility for the above somewhere? # runt.next\_times inclusive\_endpoint = now + …

---

## [Re: Timers, scheduling and Ruby](https://www.ruby-forum.com/t/re-timers-scheduling-and-ruby/77940)

<div class="topic-metadata">

**Author:** [@LipperS\_Matthew](https://www.ruby-forum.com/u/LipperS_Matthew)\
**Replies:** 2\
**Last updated:** [December 1, 2006, 8:41pm UTC](https://www.ruby-forum.com/t/re-timers-scheduling-and-ruby/77940 "2006-12-01T20:41:28Z")

</div>

determine the time of be scheduled for the next minute ‘tick’. What is needed to make Runt work for a scheduler is a next\_time method TwP I’m still catching up to this thread but FWIW I am always interested in m…

---

## [Pthreads](https://www.ruby-forum.com/t/pthreads/77928)

<div class="topic-metadata">

**Author:** [@semmons99](https://www.ruby-forum.com/u/semmons99)\
**Replies:** 2\
**Last updated:** [December 1, 2006, 7:23pm UTC](https://www.ruby-forum.com/t/pthreads/77928 "2006-12-01T19:23:12Z")

</div>

I need to write a quicksort using pthreads, and was hoping to use Ruby to do so (the Prof. just loves C/C++). Can anyone shed some light on what compiling ruby with pthreads actually does, and what I need to do to wr…

---

## [Ruby/DL binding to CASA: Segmentation fault](https://www.ruby-forum.com/t/ruby-dl-binding-to-casa-segmentation-fault/77934)

<div class="topic-metadata">

**Author:** [@Nate\_Younger](https://www.ruby-forum.com/u/Nate_Younger)\
**Replies:** 0\
**Last updated:** [December 1, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/ruby-dl-binding-to-casa-segmentation-fault/77934 "2006-12-01T18:17:00Z")

</div>

Hello, I am trying to create a binding for CASA(http://developer.novell.com/wiki/index.php/Casa) using Ruby/DL. And I am running into the following problem: casa.rb:85: \[BUG\] Segmentation fault ruby 1.8.4 (2005-12-2…

---

## [Doc literal with soap4r](https://www.ruby-forum.com/t/doc-literal-with-soap4r/77875)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 1\
**Last updated:** [December 1, 2006, 5:38pm UTC](https://www.ruby-forum.com/t/doc-literal-with-soap4r/77875 "2006-12-01T17:38:46Z")

</div>

Since I’m not a soap expert I thought I would ask. The following soap message isn’t accepted by Netsuite, and their apache axis server throws an exception about not being able to marshal the data. Netsuite say’s the …

---

## [Anomaly in first example of Needles, an Aspect-Oriented Prog](https://www.ruby-forum.com/t/anomaly-in-first-example-of-needles-an-aspect-oriented-prog/77873)

<div class="topic-metadata">

**Author:** [@richard](https://www.ruby-forum.com/u/richard)\
**Replies:** 2\
**Last updated:** [December 1, 2006, 5:30pm UTC](https://www.ruby-forum.com/t/anomaly-in-first-example-of-needles-an-aspect-oriented-prog/77873 "2006-12-01T17:30:42Z")

</div>

Hi All, I intend to use Needle in my future Ruby and RoR development, so I want to got through it tutorial at http://needle.rubyforge.org/chapter-1.html in detail. Following is a test of the first example. It works…

---

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

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 7\
**Last updated:** [December 1, 2006, 5:26pm UTC](https://www.ruby-forum.com/t/vba-to-ruby-code-again/77741 "2006-12-01T17:26:41Z")

</div>

Hi all, I want to add error bars to a chart. I record excel macro and then try to translate them into Ruby codes but fail. I wonder if someone there can help me out. Thanks, Li VBA macro codes ActiveChart.SeriesCol…

---

## [Curb 0.0.4 hot off the press!](https://www.ruby-forum.com/t/curb-0-0-4-hot-off-the-press/77929)

<div class="topic-metadata">

**Author:** [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Replies:** 0\
**Last updated:** [December 1, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/curb-0-0-4-hot-off-the-press/77929 "2006-12-01T17:06:32Z")

</div>

Curb 0.0.4 is now available from the curb project on Rubyforge (http://curb.rubyforge.org). Curb provides nice, easy to use Ruby bindings to the libcurl URL transfer library. This release proves that old Curb adage (t…

---

## [Ruby equivalent to "exec \> $logfile 2\>&1" in sh script?](https://www.ruby-forum.com/t/ruby-equivalent-to-exec-logfile-2-1-in-sh-script/77868)

<div class="topic-metadata">

**Author:** [@philippeqc](https://www.ruby-forum.com/u/philippeqc)\
**Replies:** 3\
**Last updated:** [December 1, 2006, 4:38pm UTC](https://www.ruby-forum.com/t/ruby-equivalent-to-exec-logfile-2-1-in-sh-script/77868 "2006-12-01T16:38:24Z")

</div>

People, I quite frequently have something like: exec \> $logfile 2\>&1 at the top of my shell scripts to output everything that follows (including errors) into a log file - is there some way of doing the equivalent in…

---

## [Ruby and TAPI](https://www.ruby-forum.com/t/ruby-and-tapi/77761)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 4\
**Last updated:** [December 1, 2006, 3:46pm UTC](https://www.ruby-forum.com/t/ruby-and-tapi/77761 "2006-12-01T15:46:11Z")

</div>

Has anybody been succesfull combining Windows Telephone API (TAPI) with ruby. What I need is start a ruby program on call and receive a caller number. I need to know if this has been done with ruby so I can further de…

---

## [How to get value of constants in Excel using WIN32OLE](https://www.ruby-forum.com/t/how-to-get-value-of-constants-in-excel-using-win32ole/77874)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 2\
**Last updated:** [December 1, 2006, 3:43pm UTC](https://www.ruby-forum.com/t/how-to-get-value-of-constants-in-excel-using-win32ole/77874 "2006-12-01T15:43:21Z")

</div>

Hi all, I have a script to store all Excel constants in an array. ButI can’t return the value for each constant. By using “inspect” method I think all the constants in the array are turn into a string. The only chance…

---

## [Why does openstruct not respond to =?](https://www.ruby-forum.com/t/why-does-openstruct-not-respond-to/77902)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 5\
**Last updated:** [December 1, 2006, 2:35pm UTC](https://www.ruby-forum.com/t/why-does-openstruct-not-respond-to/77902 "2006-12-01T14:35:55Z")

</div>

Took me aback - there seems to be no reason for OpenStruct not to permit member access via ostruct\[:field\] and ostruct\[‘field’\]. martin

---

## [Newby question determining name of an array at run-time](https://www.ruby-forum.com/t/newby-question-determining-name-of-an-array-at-run-time/77854)

<div class="topic-metadata">

**Author:** [@Alfonso](https://www.ruby-forum.com/u/Alfonso)\
**Replies:** 3\
**Last updated:** [December 1, 2006, 1:07pm UTC](https://www.ruby-forum.com/t/newby-question-determining-name-of-an-array-at-run-time/77854 "2006-12-01T13:07:40Z")

</div>

(Sorry for not finding a better title to my question. I’m not shure if this has something to do with metaprogramming… I have hear about that, but never had time to learn about it, so I don’t know what is metaprogrammi…

---

## [How can someone see my webserver if I have a wireless router](https://www.ruby-forum.com/t/how-can-someone-see-my-webserver-if-i-have-a-wireless-router/77871)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [December 1, 2006, 12:05pm UTC](https://www.ruby-forum.com/t/how-can-someone-see-my-webserver-if-i-have-a-wireless-router/77871 "2006-12-01T12:05:33Z")

</div>

Here is my question. I have a laptop and I run a ruby/rails based web brick server which serves up html pages. I have emailed people a way to access this webserver through a URL that looks sort of like: http://201.120…

---

## [How to create object of class name of which is in text strin](https://www.ruby-forum.com/t/how-to-create-object-of-class-name-of-which-is-in-text-strin/77891)

<div class="topic-metadata">

**Author:** [@xTRiM](https://www.ruby-forum.com/u/xTRiM)\
**Replies:** 2\
**Last updated:** [December 1, 2006, 11:25am UTC](https://www.ruby-forum.com/t/how-to-create-object-of-class-name-of-which-is-in-text-strin/77891 "2006-12-01T11:25:19Z")

</div>

I know what this is about Abstract Factory pattern. But in example at rubygarden we passing a class to factory and it creates an object from it. But how can i pass a text string to factory which will create an object …

---

## [Test::Unit and drb](https://www.ruby-forum.com/t/test-unit-and-drb/77784)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [December 1, 2006, 10:55am UTC](https://www.ruby-forum.com/t/test-unit-and-drb/77784 "2006-12-01T10:55:16Z")

</div>

Anybody have any tips to share about unit testing code that uses drb? My problem is, I can test all the the logic in smaller chunks, but as soon as I integrate everyhting and have code in place that verifies and recov…

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

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