# Ruby

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

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

---

## [Ruby script to rebuild a directory structure](https://www.ruby-forum.com/t/ruby-script-to-rebuild-a-directory-structure/164500)

<div class="topic-metadata">

**Author:** [@emmek](https://www.ruby-forum.com/u/emmek)\
**Replies:** 5\
**Last updated:** [April 2, 2009, 8:22pm UTC](https://www.ruby-forum.com/t/ruby-script-to-rebuild-a-directory-structure/164500 "2009-04-02T20:22:27Z")

</div>

I have the following problem to solve. I have some logo images in the following directory structure: /users/a/adam/logos/jdkajsdns.jpg /users/a/alan/logos/skdjaksxa.jpg (…) /users/b/bob(…) (…) etc. (there are als…

---

## [Error --\> undefined method 'length' for nil:NilClass](https://www.ruby-forum.com/t/error-undefined-method-length-for-nil-nilclass/164583)

<div class="topic-metadata">

**Author:** [@Robert\_J.on](https://www.ruby-forum.com/u/Robert_J.on)\
**Replies:** 1\
**Last updated:** [April 2, 2009, 8:02pm UTC](https://www.ruby-forum.com/t/error-undefined-method-length-for-nil-nilclass/164583 "2009-04-02T20:02:53Z")

</div>

I just updated my local repo from gitHub and when I run rake compile I see the following error: C:\\Users\\Robert\\bob-code-repo\\ironruby\_working\\Merlin\\Main\\Languages\\Ruby\>rake compile (in C:/Users/Robert/bob-code-rep…

---

## [Shoes, Gems, Oh, My!](https://www.ruby-forum.com/t/shoes-gems-oh-my/164195)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 3\
**Last updated:** [April 2, 2009, 6:59pm UTC](https://www.ruby-forum.com/t/shoes-gems-oh-my/164195 "2009-04-02T18:59:31Z")

</div>

I’ll ask this question that I asked on stackoverflow (to a resounding silence). I’m sure someone here knows the answer. I’m not completely grokking how Shoes handles gems and, more importantly, what the lifetime of ob…

---

## [How to make a\[2\]\[2\]\[3\]=4 work?](https://www.ruby-forum.com/t/how-to-make-a-2-2-3-4-work/106586)

<div class="topic-metadata">

**Author:** [@gpygood](https://www.ruby-forum.com/u/gpygood)\
**Replies:** 16\
**Last updated:** [April 2, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/how-to-make-a-2-2-3-4-work/106586 "2009-04-02T18:25:22Z")

</div>

a=Hash.new{|h,k| h\[k\]={} } p a\[1\]=1 a\[2\]\[1\]=2 #a\[2\]\[2\]\[3\]=4 p a

---

## [Incrementing field through a link](https://www.ruby-forum.com/t/incrementing-field-through-a-link/164502)

<div class="topic-metadata">

**Author:** [@hadoob024](https://www.ruby-forum.com/u/hadoob024)\
**Replies:** 2\
**Last updated:** [April 2, 2009, 6:09pm UTC](https://www.ruby-forum.com/t/incrementing-field-through-a-link/164502 "2009-04-02T18:09:09Z")

</div>

I’m still new to Ruby, so am having issues even beginning to deal with this. Tried doing some searches, but nothing turned up, and none of the tutorials that I ran through covered this. Anyway here’s my issue, we ha…

---

## [Problems with GC.. again](https://www.ruby-forum.com/t/problems-with-gc-again/164296)

<div class="topic-metadata">

**Author:** [@peterz](https://www.ruby-forum.com/u/peterz)\
**Replies:** 5\
**Last updated:** [April 2, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/problems-with-gc-again/164296 "2009-04-02T16:40:32Z")

</div>

Hi. Again, I ran into some kind of wrongly garbage collected object, but can’t determine exactly which one. Sources is at: http://files.whitequark.ru/rlua.tgz Try: ruby1.9 extconf.rb make ruby1.9 test.rb A segfa…

---

## [Vim pplugin](https://www.ruby-forum.com/t/vim-pplugin/164548)

<div class="topic-metadata">

**Author:** [@vetrivel](https://www.ruby-forum.com/u/vetrivel)\
**Replies:** 2\
**Last updated:** [April 2, 2009, 4:38pm UTC](https://www.ruby-forum.com/t/vim-pplugin/164548 "2009-04-02T16:38:11Z")

</div>

I need Automatic Header to \*.rb file. Example Filename: myprogram.rb Description: Version: 1.0 Created: 01/19/09 20:23:25 Revision: none Any vim plugin is there. I have vim plugin fo…

---

## [Anything better than klass = eval("#{task\_class}")](https://www.ruby-forum.com/t/anything-better-than-klass-eval-task-class/164448)

<div class="topic-metadata">

**Author:** [@Paganoni](https://www.ruby-forum.com/u/Paganoni)\
**Replies:** 9\
**Last updated:** [April 2, 2009, 4:18pm UTC](https://www.ruby-forum.com/t/anything-better-than-klass-eval-task-class/164448 "2009-04-02T16:18:17Z")

</div>

Hi, well subject is self explanatory… Seems a bit to verbose for me but I don’t know any other solution to convert a string containing a class name to a constant of that class name… Excepted rails way : task\_class.cam…

---

## [Adding Zlib::GzipFile#path](https://www.ruby-forum.com/t/adding-zlib-gzipfile-path/164555)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 0\
**Last updated:** [April 2, 2009, 3:09pm UTC](https://www.ruby-forum.com/t/adding-zlib-gzipfile-path/164555 "2009-04-02T15:09:07Z")

</div>

ã€€Zlib::GzipFile#path ã‚’è¿½åŠ ã™ã‚‹ãƒ‘ãƒƒãƒã§ã™ã€‚zgrep ã¿ãŸã„ãªã®ã‚’ æ›¸ãã¨ãã«ä½¿ãˆã¾ã™ã€‚ ã€€ãƒ†ã‚¹ãƒˆã®å¾ŒåŠã¯ StringIO#path ã®å‰Šé™¤ãŒå‰æãªã®ã§ã€ãã¡ã‚‰ã®å‹•å‘ æ¬¡ç¬¬ã§å‰Šã‚‹ã…

---

## [Read and modify logs](https://www.ruby-forum.com/t/read-and-modify-logs/164378)

<div class="topic-metadata">

**Author:** [@mifi](https://www.ruby-forum.com/u/mifi)\
**Replies:** 3\
**Last updated:** [April 2, 2009, 2:16pm UTC](https://www.ruby-forum.com/t/read-and-modify-logs/164378 "2009-04-02T14:16:53Z")

</div>

I’m trying to read the entries in a logfile so I can enter its contents in a database, the lines are results I want to record, but in order to be sure that I don’t have duplicates I’d like to be able to remove entries…

---

## [A 64bit question?](https://www.ruby-forum.com/t/a-64bit-question/164355)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 1\
**Last updated:** [April 2, 2009, 12:46pm UTC](https://www.ruby-forum.com/t/a-64bit-question/164355 "2009-04-02T12:46:12Z")

</div>

I have been trying to implement the music sequencer in the mac frameworks library. Most of the calls seem to work with the exception of those that use the “MusicTimeStamp” type. This I think should be cast as a double…

---

## [How to create blocks with arity known at runtime](https://www.ruby-forum.com/t/how-to-create-blocks-with-arity-known-at-runtime/164539)

<div class="topic-metadata">

**Author:** [@abc](https://www.ruby-forum.com/u/abc)\
**Replies:** 2\
**Last updated:** [April 2, 2009, 12:25pm UTC](https://www.ruby-forum.com/t/how-to-create-blocks-with-arity-known-at-runtime/164539 "2009-04-02T12:25:37Z")

</div>

Hi everyone, is it possible to create blocks of arity known at runtime, other than simply using a variable list of params: Proc.new { |\*a| … } I’m looking for somthing like: params = \[:a, :b\] Proc.new { |\*params| … …

---

## [Agdlr test w/ ruby string](https://www.ruby-forum.com/t/agdlr-test-w-ruby-string/164447)

<div class="topic-metadata">

**Author:** [@Jb\_Evain](https://www.ruby-forum.com/u/Jb_Evain)\
**Replies:** 3\
**Last updated:** [April 2, 2009, 10:24am UTC](https://www.ruby-forum.com/t/agdlr-test-w-ruby-string/164447 "2009-04-02T10:24:29Z")

</div>

Hey, Moonlight currently fails the following agldr test: it ‘verifies SetProperty works’ do new\_ctl = HtmlPage.Document.CreateElement(‘div’) new\_value = “This is added by Merlin SL Test!” new\_ctl.SetProperty(“innerH…

---

## [Official poll - unit testing](https://www.ruby-forum.com/t/official-poll-unit-testing/164516)

<div class="topic-metadata">

**Author:** [@john\_maclean](https://www.ruby-forum.com/u/john_maclean)\
**Replies:** 7\
**Last updated:** [April 2, 2009, 10:01am UTC](https://www.ruby-forum.com/t/official-poll-unit-testing/164516 "2009-04-02T10:01:00Z")

</div>

Hello, My name is Mr Official and I am hereby asking you to participating in my poll. “Do you really do unit testing?” Acceptable answers; Janet Jackme does my dishes cos I unit test all of the time I only unit test…

---

## [GNU Radio with SCA](https://www.ruby-forum.com/t/gnu-radio-with-sca/164507)

<div class="topic-metadata">

**Author:** [@sheng](https://www.ruby-forum.com/u/sheng)\
**Replies:** 1\
**Last updated:** [April 2, 2009, 8:43am UTC](https://www.ruby-forum.com/t/gnu-radio-with-sca/164507 "2009-04-02T08:43:36Z")

</div>

Hi all, Does anyone try to build a system with GNU Radio(BBN 802.11 or OpenBTS) and Software Communications Architecture(SCA)? I installed GNURadio and TAO (a standards-compliant real-time implementation of CORBA). I …

---

## [1.8.7 RSS test failure](https://www.ruby-forum.com/t/1-8-7-rss-test-failure/164518)

<div class="topic-metadata">

**Author:** [@Urabe\_S](https://www.ruby-forum.com/u/Urabe_S)\
**Replies:** 2\
**Last updated:** [April 2, 2009, 7:38am UTC](https://www.ruby-forum.com/t/1-8-7-rss-test-failure/164518 "2009-04-02T07:38:37Z")

</div>

e$BKNIt$G$9!#$A$g$C$H$4AjCL!#e(B 1.8.7e$B$r%j%j!\<%9$G$-$F$J$$M}M3$N0l$D$Ke(BRSSe$B$N%F%9%H$,DL$i$J$$$+$i$H$$$&$N$,$"$j$^$9e(B(e$B2\<5-e(B)e$B!#e(B e$B$3$l$Oe(B1.8.8deve$B$+$i%F%9%H$@$1;}$C$F$-$?$+$i$J$N$G!"$J$s$i$+BP1~$…

---

## [Ask bout net-ping](https://www.ruby-forum.com/t/ask-bout-net-ping/196927)

<div class="topic-metadata">

**Author:** [@vgenjr](https://www.ruby-forum.com/u/vgenjr)\
**Replies:** 2\
**Last updated:** [April 2, 2009, 6:26am UTC](https://www.ruby-forum.com/t/ask-bout-net-ping/196927 "2009-04-02T06:26:06Z")

</div>

hi, can anybody help me? i wanna create a RoR monitoring application for my project. i have a database with table named nodes in that nodes i have id and ipadd. here’s my code: #nodes\_controller.rb require ‘net/pi…

---

## [Lol.. google undo send definitely is a fad](https://www.ruby-forum.com/t/lol-google-undo-send-definitely-is-a-fad/164384)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 5\
**Last updated:** [April 2, 2009, 4:18am UTC](https://www.ruby-forum.com/t/lol-google-undo-send-definitely-is-a-fad/164384 "2009-04-02T04:18:09Z")

</div>

It took me more than the 2 seconds I get from google to realize that I sent the previous email to the wrong address.

---

## [Strange errors with Net::SSH and all network libraries](https://www.ruby-forum.com/t/strange-errors-with-net-ssh-and-all-network-libraries/164496)

<div class="topic-metadata">

**Author:** [@hoshbad](https://www.ruby-forum.com/u/hoshbad)\
**Replies:** 2\
**Last updated:** [April 2, 2009, 2:00am UTC](https://www.ruby-forum.com/t/strange-errors-with-net-ssh-and-all-network-libraries/164496 "2009-04-02T02:00:08Z")

</div>

Hello all, I’m getting the strangest errors today whenever I use a library that needs to over the network. I’m thinking this could be because I have a really old network card? I’ve traced through and the problem seem…

---

## [Newbie: Install mysql gem? jdbc the only way?](https://www.ruby-forum.com/t/newbie-install-mysql-gem-jdbc-the-only-way/164512)

<div class="topic-metadata">

**Author:** [@drub](https://www.ruby-forum.com/u/drub)\
**Replies:** 0\
**Last updated:** [April 2, 2009, 1:55am UTC](https://www.ruby-forum.com/t/newbie-install-mysql-gem-jdbc-the-only-way/164512 "2009-04-02T01:55:18Z")

</div>

Just installed jruby. Installed Rails 2.0.2. Verified with “gem install list”. “gem install mysql” fails with the following error. JRuby limited openssl loaded. gem install jruby-openssl for full support. http://w…

---

## [Cannot run shell scripts (cannot allocate memory)](https://www.ruby-forum.com/t/cannot-run-shell-scripts-cannot-allocate-memory/164491)

<div class="topic-metadata">

**Author:** [@LSSSSszlSSSSBSSSSc](https://www.ruby-forum.com/u/LSSSSszlSSSSBSSSSc)\
**Replies:** 1\
**Last updated:** [April 2, 2009, 12:43am UTC](https://www.ruby-forum.com/t/cannot-run-shell-scripts-cannot-allocate-memory/164491 "2009-04-02T00:43:42Z")

</div>

I’m running a Rails application with Tomcat and I keep getting this error: IOError in Admin/profilesController#update Cannot run program “/bin/sh” (in directory “/opt/apache-tomcat-6.0.18/webapps/ROOT/WEB-INF”): java…

---

## [Connection failures with JNDI LDAP in Glassfish](https://www.ruby-forum.com/t/connection-failures-with-jndi-ldap-in-glassfish/164469)

<div class="topic-metadata">

**Author:** [@sumwutdum](https://www.ruby-forum.com/u/sumwutdum)\
**Replies:** 1\
**Last updated:** [April 2, 2009, 12:42am UTC](https://www.ruby-forum.com/t/connection-failures-with-jndi-ldap-in-glassfish/164469 "2009-04-02T00:42:32Z")

</div>

Hi all, I’ve written a bit of code to access an LDAP server from my JRuby/Rails app via a Glassfish external JNDI resource - I’ve been using the pure-ruby gem ruby-net-ldap, but since I need to use SSL and do more th…

---

## [Mysterious closed stream (IOError) exception](https://www.ruby-forum.com/t/mysterious-closed-stream-ioerror-exception/164456)

<div class="topic-metadata">

**Author:** [@skiz](https://www.ruby-forum.com/u/skiz)\
**Replies:** 1\
**Last updated:** [April 2, 2009, 12:36am UTC](https://www.ruby-forum.com/t/mysterious-closed-stream-ioerror-exception/164456 "2009-04-02T00:36:06Z")

</div>

Hi, Sorry to keep bothering everybody with what are probably very beginnerish questions. Thanks to everybody who has already helped me out in answering questions. This time I am complete mystified as to what is go…

---

## [When to use instance variables @](https://www.ruby-forum.com/t/when-to-use-instance-variables/164281)

<div class="topic-metadata">

**Author:** [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Replies:** 19\
**Last updated:** [April 2, 2009, 12:20am UTC](https://www.ruby-forum.com/t/when-to-use-instance-variables/164281 "2009-04-02T00:20:51Z")

</div>

Hi, I have a couple questions about instance variables in Ruby. do i need to declare them at the top of my class file - I do understand the accessors are automatic but I’m not sure if I can just pull a @product in t…

---

## [RDoc::usage has gone](https://www.ruby-forum.com/t/rdoc-usage-has-gone/164501)

<div class="topic-metadata">

**Author:** [@James\_Ponder](https://www.ruby-forum.com/u/James_Ponder)\
**Replies:** 1\
**Last updated:** [April 2, 2009, 12:06am UTC](https://www.ruby-forum.com/t/rdoc-usage-has-gone/164501 "2009-04-02T00:06:46Z")

</div>

Hi RDoc::usage was removed from ruby at the beginning of 2008, and thus is not present in Ruby 1.9.1: Fri Jan 11 18:28:49 2008 Eric H. \* lib/rdoc/usage.rb: Removed. \* lib/getoptlong.rb: Update example to not use l…

---

## [Hpricot 0.7](https://www.ruby-forum.com/t/hpricot-0-7/163149)

<div class="topic-metadata">

**Author:** [@S\_why](https://www.ruby-forum.com/u/S_why)\
**Replies:** 24\
**Last updated:** [April 1, 2009, 10:35pm UTC](https://www.ruby-forum.com/t/hpricot-0-7/163149 "2009-04-01T22:35:36Z")

</div>

Please enjoy a succulent, new Hpricot. A bit faster, some Ruby 1.9 support, and assorted fixes. gem install hpricot --source http://code.whytheluckystiff.net It should show up at Rubyforge in a bit. I’m sure you’re w…

---

## [Ruby Embedding](https://www.ruby-forum.com/t/ruby-embedding/164475)

<div class="topic-metadata">

**Author:** [@mperham](https://www.ruby-forum.com/u/mperham)\
**Replies:** 2\
**Last updated:** [April 1, 2009, 10:01pm UTC](https://www.ruby-forum.com/t/ruby-embedding/164475 "2009-04-01T22:01:31Z")

</div>

Hello everybody. I downloaded the ruby 1.9.1 for windows and i’m trying to embed using C++ for 3 days and, i don’t know but for some reason i’m getting crashes with these functions: … rb\_load\_file ruby\_incpush rub…

---

## [\[patch\] agdlr: Fix for Package.NormalizePath](https://www.ruby-forum.com/t/patch-agdlr-fix-for-package-normalizepath/164457)

<div class="topic-metadata">

**Author:** [@Jb\_Evain](https://www.ruby-forum.com/u/Jb_Evain)\
**Replies:** 4\
**Last updated:** [April 1, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/patch-agdlr-fix-for-package-normalizepath/164457 "2009-04-01T21:06:21Z")

</div>

Hey, This patch is part of a bunch I sent to Jimmy privately. But they haven’t been applied, so am resending them here for review. Package.NormalizePath transforms paths in the xap that use \\ as a directory separator…

---

## [ActionMailer:Base Validation](https://www.ruby-forum.com/t/actionmailer-base-validation/164481)

<div class="topic-metadata">

**Author:** [@sandeepcasp](https://www.ruby-forum.com/u/sandeepcasp)\
**Replies:** 0\
**Last updated:** [April 1, 2009, 8:37pm UTC](https://www.ruby-forum.com/t/actionmailer-base-validation/164481 "2009-04-01T20:37:45Z")

</div>

Hi all, I’ve used below link to send mass emails to people.I am able to send using the same code without any issues. Now,Is that i need to validate Subject,Recipient,Message text boxes.Can you please suggest me how …

---

## [Change of behaviour for sleep(0) in 1.9](https://www.ruby-forum.com/t/change-of-behaviour-for-sleep-0-in-1-9/164373)

<div class="topic-metadata">

**Author:** [@sean](https://www.ruby-forum.com/u/sean)\
**Replies:** 8\
**Last updated:** [April 1, 2009, 6:26pm UTC](https://www.ruby-forum.com/t/change-of-behaviour-for-sleep-0-in-1-9/164373 "2009-04-01T18:26:28Z")

</div>

Hi, Just thought I’d share this to save anyone else the bafflement it caused me. In ruby 1.8.x and jruby, sleep(0) means do not sleep at all. In 1.9, it appears to mean sleep forever. In both cases, sleep with no ar…

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

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