# Ruby

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

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

---

## [Getting warning messages about gem obsolete](https://www.ruby-forum.com/t/getting-warning-messages-about-gem-obsolete/85170)

<div class="topic-metadata">

**Author:** [@Rae](https://www.ruby-forum.com/u/Rae)\
**Replies:** 2\
**Last updated:** [February 11, 2007, 4:20am UTC](https://www.ruby-forum.com/t/getting-warning-messages-about-gem-obsolete/85170 "2007-02-11T04:20:23Z")

</div>

I uninstalled my old ruby (v 1.8521 I think it was), and installed 1.8522 (windows installer). When the interactive Ruby console comes up it states: C:0:Warning: require\_gem is obsolete. Use gem instead. C:0:Warning:…

---

## [Cisco and network products for sales](https://www.ruby-forum.com/t/cisco-and-network-products-for-sales/85190)

<div class="topic-metadata">

**Author:** [@Arnold](https://www.ruby-forum.com/u/Arnold)\
**Replies:** 0\
**Last updated:** [February 11, 2007, 3:27am UTC](https://www.ruby-forum.com/t/cisco-and-network-products-for-sales/85190 "2007-02-11T03:27:04Z")

</div>

S. A. TRADING (UK) LIMITED Reg No.05797734 / VAT Reg NO: 735 773 701 Address: 69 MARLEY BUILDINGS, JARROM, COURT, 40 DEACON STREET LEICESTER, LE2 7EF UNITED KINGDOM Incorporation Date: 27-04-2006 Email: removed\_em…

---

## [Gem update --system broke rubygems?](https://www.ruby-forum.com/t/gem-update-system-broke-rubygems/85189)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 3\
**Last updated:** [February 11, 2007, 2:41am UTC](https://www.ruby-forum.com/t/gem-update-system-broke-rubygems/85189 "2007-02-11T02:41:18Z")

</div>

Hi, I’m running ruby 1.8.5 (2006-08-25) \[i686-linux\] I tried: gem update --system And, at the end of the install, got the following error: Successfully built RubyGem Name: sources Version: 0.0.1 File: sources-0.0…

---

## [Validates\_confirmation\_of not working](https://www.ruby-forum.com/t/validates-confirmation-of-not-working/85186)

<div class="topic-metadata">

**Author:** [@j-merrill](https://www.ruby-forum.com/u/j-merrill)\
**Replies:** 1\
**Last updated:** [February 11, 2007, 1:09am UTC](https://www.ruby-forum.com/t/validates-confirmation-of-not-working/85186 "2007-02-11T01:09:13Z")

</div>

well, here I am again :slight\_smile: validates\_confirmation\_of is not working heres my model class User \< ActiveRecord::Base attr\_accessor :password attr\_accessible :email, :first\_name, :last\_name, :screen\_name, :p…

---

## [Generating instance variable for a class](https://www.ruby-forum.com/t/generating-instance-variable-for-a-class/85184)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [February 11, 2007, 1:02am UTC](https://www.ruby-forum.com/t/generating-instance-variable-for-a-class/85184 "2007-02-11T01:02:12Z")

</div>

What I am trying to do is use a hash to tie attributes to an input record layout from which the attribute will be created and their values are set. What I am thinking is that the hash can provide the record layout to…

---

## [Getting Time in specified timezone/offset](https://www.ruby-forum.com/t/getting-time-in-specified-timezone-offset/85104)

<div class="topic-metadata">

**Author:** [@gnufied](https://www.ruby-forum.com/u/gnufied)\
**Replies:** 2\
**Last updated:** [February 11, 2007, 12:44am UTC](https://www.ruby-forum.com/t/getting-time-in-specified-timezone-offset/85104 "2007-02-11T00:44:17Z")

</div>

I have got following method in my code: def to\_time if time? then Time.mktime(year,month,day\_of\_month,hour,minute,second,usec) else Time.mktime(year,month,day\_of\_month) end end In my class, I also have timezone/u…

---

## [Tr does not work with non-english chars](https://www.ruby-forum.com/t/tr-does-not-work-with-non-english-chars/85167)

<div class="topic-metadata">

**Author:** [@j-merrill](https://www.ruby-forum.com/u/j-merrill)\
**Replies:** 9\
**Last updated:** [February 11, 2007, 12:38am UTC](https://www.ruby-forum.com/t/tr-does-not-work-with-non-english-chars/85167 "2007-02-11T00:38:47Z")

</div>

Hi, if I do this ?\> puts “usa”.tr(‘a’,‘b’) usb =\> nil it works but with this: puts “usa”.tr(‘Ã£’,‘b’) It stays forever waiting for not sure about what. Does not work what I’m doing wrong?

---

## [Cgi.rb $B$N%U%!%$%kL\>\<hF@=hM}(B](https://www.ruby-forum.com/t/cgi-rb-b-n-u-kl-hf-hm-b/83243)

<div class="topic-metadata">

**Author:** [@SSSBSHS\_SSSSS5SRSmS](https://www.ruby-forum.com/u/SSSBSHS_SSSSS5SRSmS)\
**Replies:** 1\
**Last updated:** [February 10, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/cgi-rb-b-n-u-kl-hf-hm-b/83243 "2007-02-10T23:50:08Z")

</div>

e$B$H$\_$?$G$9!#e(B CGI e$B$G%U%!%$%kL\>Cf$K!Ve(B"e$B!W$d!Ve(B;e$B!W$r4^$\`%U%!%$%k$re(B POST e$B$9$k$H!"e(Bcgi.rb e$B$,$=$l0J9\_$NJ8;z$rMn$H$7$F$7$^$$$^$9!#e(B — cgi.rb.orig 2006-12-03 17:06:27.000000000 +0900 +++ cgi…

---

## [Disabling DRbUndumped](https://www.ruby-forum.com/t/disabling-drbundumped/85082)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [February 10, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/disabling-drbundumped/85082 "2007-02-10T23:35:07Z")

</div>

anyone got a slick way of temporaily disabling DRbUndumped? -a

---

## [Typo? in CGI#read\_multipart](https://www.ruby-forum.com/t/typo-in-cgi-read-multipart/83051)

<div class="topic-metadata">

**Author:** [@sugie](https://www.ruby-forum.com/u/sugie)\
**Replies:** 1\
**Last updated:** [February 10, 2007, 11:34pm UTC](https://www.ruby-forum.com/t/typo-in-cgi-read-multipart/83051 "2007-02-10T23:34:07Z")

</div>

e$B$3$s$P$s$O!":XF#$H?=$7$^$9!#e(B CGIe$B%i%$%V%i%j$N;EMM$rD4$Y$F$$$?$i!"e(B\[ruby-list:38714\]e$B$K$^$G$?$I$jCe$$$Fe(B typoe$B$i$7$-$b$N$r8+$D$1$^$7$?!#\<B32$O$^$C$?$/$J$$$H;W$&$N$G$9$,!"e(B(e$BK\\Ev$Ke(B) e$B$$$A$\*$&Ej9…

---

## [Upgrading standard libs in ruby (soap4r)](https://www.ruby-forum.com/t/upgrading-standard-libs-in-ruby-soap4r/85159)

<div class="topic-metadata">

**Author:** [@jurglic](https://www.ruby-forum.com/u/jurglic)\
**Replies:** 1\
**Last updated:** [February 10, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/upgrading-standard-libs-in-ruby-soap4r/85159 "2007-02-10T23:14:05Z")

</div>

Hi guys, I’m trying to upgrade my soap4r ruby standard library. I’ve installed the soap4r gem, but it seems it’s still the old lib that’s being used. So can someone tell me what is the right way to upgrade std library…

---

## [Idiom for dynamic loading of an unknown class from a known f](https://www.ruby-forum.com/t/idiom-for-dynamic-loading-of-an-unknown-class-from-a-known-f/85171)

<div class="topic-metadata">

**Author:** [@Nasir\_K](https://www.ruby-forum.com/u/Nasir_K)\
**Replies:** 2\
**Last updated:** [February 10, 2007, 10:57pm UTC](https://www.ruby-forum.com/t/idiom-for-dynamic-loading-of-an-unknown-class-from-a-known-f/85171 "2007-02-10T22:57:04Z")

</div>

I need to load a class at runtime, whose name I do not know in advance, but all I know is a file name. Say “a.rb” which is class A … end So I want to do something like (pseudo code) load a.rb (this will create…

---

## [Call a method before a method is called?](https://www.ruby-forum.com/t/call-a-method-before-a-method-is-called/85161)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 4\
**Last updated:** [February 10, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/call-a-method-before-a-method-is-called/85161 "2007-02-10T22:42:59Z")

</div>

Does ruby have “hooks”. Where I can define, let’s say, a method called \_\_before that will be called before ANY method call for that class? Thanks for your help.

---

## [Your favorite bit of ruby code?](https://www.ruby-forum.com/t/your-favorite-bit-of-ruby-code/84967)

<div class="topic-metadata">

**Author:** [@phillyloco](https://www.ruby-forum.com/u/phillyloco)\
**Replies:** 36\
**Last updated:** [February 10, 2007, 10:02pm UTC](https://www.ruby-forum.com/t/your-favorite-bit-of-ruby-code/84967 "2007-02-10T22:02:53Z")

</div>

Hello, I’m just curious what your favorite bit of ruby code is? Do you have any small bits, methods, classes, or anything else, that just make you say “Wow, that is sweet!” I’d like to see some of them! thanks, -ca…

---

## [Do not understand this](https://www.ruby-forum.com/t/do-not-understand-this/85160)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 4\
**Last updated:** [February 10, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/do-not-understand-this/85160 "2007-02-10T21:42:26Z")

</div>

I am going through Dave T.'s Programming Ruby Second Edition book. I am trying to execute the code given on page 89 of the book which is as follows: Sample code from Programing Ruby, page 83 alias old\_backquote def(cm…

---

## [WIN32OLE in ruby windows one click installer](https://www.ruby-forum.com/t/win32ole-in-ruby-windows-one-click-installer/84426)

<div class="topic-metadata">

**Author:** [@shin\_guey](https://www.ruby-forum.com/u/shin_guey)\
**Replies:** 5\
**Last updated:** [February 10, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/win32ole-in-ruby-windows-one-click-installer/84426 "2007-02-10T15:26:18Z")

</div>

Hello, I am new to ruby for programming win32ole. I install ruby on windows using ruby one click installer windows version 1.8.5-21. I check the win32ole.c inside the src/ruby-1.8.5/ext/win32ole directory and the ver…

---

## [The meaning of Benchmark's times](https://www.ruby-forum.com/t/the-meaning-of-benchmarks-times/85092)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 1\
**Last updated:** [February 10, 2007, 2:57pm UTC](https://www.ruby-forum.com/t/the-meaning-of-benchmarks-times/85092 "2007-02-10T14:57:13Z")

</div>

Hi all, I thought I understood what user and system times meant. Then I saw this from Benchmark, while comparing response times of a WEBrick server and a Mongrel server: user system t…

---

## [TupleSpace performance (TupleBag really)](https://www.ruby-forum.com/t/tuplespace-performance-tuplebag-really/84786)

<div class="topic-metadata">

**Author:** [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Replies:** 13\
**Last updated:** [February 10, 2007, 10:13am UTC](https://www.ruby-forum.com/t/tuplespace-performance-tuplebag-really/84786 "2007-02-10T10:13:50Z")

</div>

We’ve been struggling with this problem for months. We use TupleSpace to implement a distributed processing framework and periodically if the number of objects in the TupleBag gets large (not ridiculous but 50,000 or…

---

## [One-Click Ruby Installer for Windows: 185-22 Final](https://www.ruby-forum.com/t/one-click-ruby-installer-for-windows-185-22-final/85134)

<div class="topic-metadata">

**Author:** [@curthibbs](https://www.ruby-forum.com/u/curthibbs)\
**Replies:** 0\
**Last updated:** [February 10, 2007, 9:47am UTC](https://www.ruby-forum.com/t/one-click-ruby-installer-for-windows-185-22-final/85134 "2007-02-10T09:47:49Z")

</div>

The only change since RC3 was to fix rake.bat to use ‘gem’ instead of the deprecated ‘require\_gem’. This release updates Ruby to 1.8.5 patch level 12 (lots of bugs fixed), and most of the included extensions to their …

---

## [Simple Server Question](https://www.ruby-forum.com/t/simple-server-question/84621)

<div class="topic-metadata">

**Author:** [@dfg59](https://www.ruby-forum.com/u/dfg59)\
**Replies:** 3\
**Last updated:** [February 10, 2007, 8:40am UTC](https://www.ruby-forum.com/t/simple-server-question/84621 "2007-02-10T08:40:45Z")

</div>

Guys - I’m working on a simple Chat Server/Client just to become familiar with ruby socket programming. I’ve put together this very simple server that accepts a connect and prints out the first message received. I’ve …

---

## [Rake and rake aborted! Rake aborted! undefined method \`gem'](https://www.ruby-forum.com/t/rake-and-rake-aborted-rake-aborted-undefined-method-gem/85085)

<div class="topic-metadata">

**Author:** [@peppermonkey](https://www.ruby-forum.com/u/peppermonkey)\
**Replies:** 2\
**Last updated:** [February 10, 2007, 5:44am UTC](https://www.ruby-forum.com/t/rake-and-rake-aborted-rake-aborted-undefined-method-gem/85085 "2007-02-10T05:44:38Z")

</div>

Hi, there must be some configuration mistake but can someone help me out? I have ruby, gem, rails and such installed. version ruby: 1.8.4 gem: 0.8.11 rails 1.2.2 If I do a rake rails:update I get the following: …

---

## [Go daddy problem](https://www.ruby-forum.com/t/go-daddy-problem/85113)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 0\
**Last updated:** [February 10, 2007, 2:45am UTC](https://www.ruby-forum.com/t/go-daddy-problem/85113 "2007-02-10T02:45:26Z")

</div>

I am trying to deploy an app on godaddy but every time I create an app and the upload the app. I get: Not Found The requested URL /steve/\[F\] was not found on this server. Additionally, a 404 Not Found error was encou…

---

## [Drb object client - call and continue?](https://www.ruby-forum.com/t/drb-object-client-call-and-continue/85100)

<div class="topic-metadata">

**Author:** [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Replies:** 1\
**Last updated:** [February 10, 2007, 1:06am UTC](https://www.ruby-forum.com/t/drb-object-client-call-and-continue/85100 "2007-02-10T01:06:08Z")

</div>

Hello, I’m working on a script which calls to a drb object. I’m wondering if there is a way to invoke the drb process without the caller waiting for the drb process to complete. I’ll be more descriptive. Here is my…

---

## [Rake aborted! undefined method \`gem' for main:Object](https://www.ruby-forum.com/t/rake-aborted-undefined-method-gem-for-main-object/102682)

<div class="topic-metadata">

**Author:** [@peppermonkey](https://www.ruby-forum.com/u/peppermonkey)\
**Replies:** 4\
**Last updated:** [February 9, 2007, 11:51pm UTC](https://www.ruby-forum.com/t/rake-aborted-undefined-method-gem-for-main-object/102682 "2007-02-09T23:51:00Z")

</div>

Hi, there must be some configuration mistake but can someone help me out? I have ruby, gem, rails and such installed. version ruby: 1.8.4 gem: 0.8.11 rails 1.2.2 If I do a rake rails:update I get the following: …

---

## [Test errors on rake project (gem)](https://www.ruby-forum.com/t/test-errors-on-rake-project-gem/85086)

<div class="topic-metadata">

**Author:** [@thebox](https://www.ruby-forum.com/u/thebox)\
**Replies:** 0\
**Last updated:** [February 9, 2007, 10:56pm UTC](https://www.ruby-forum.com/t/test-errors-on-rake-project-gem/85086 "2007-02-09T22:56:53Z")

</div>

I’m not sure this is meaningful or if it makes any sense, but just for curiosity I tried to execute rake tests against the rake gem itself and I got a few errors (to be precise 3 failures and 5 errors in total). Firs…

---

## [Willing to take a pay cut to work with ruby](https://www.ruby-forum.com/t/willing-to-take-a-pay-cut-to-work-with-ruby/84871)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [February 9, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/willing-to-take-a-pay-cut-to-work-with-ruby/84871 "2007-02-09T22:21:44Z")

</div>

Hi there, Would you consider taking on an experienced software developer as a junior ruby developer? I have 15 years good software development experience and I have good software disciplines, instincts and principles…

---

## [Playing defined system sounds](https://www.ruby-forum.com/t/playing-defined-system-sounds/85017)

<div class="topic-metadata">

**Author:** [@pedro\_mg](https://www.ruby-forum.com/u/pedro_mg)\
**Replies:** 1\
**Last updated:** [February 9, 2007, 9:49pm UTC](https://www.ruby-forum.com/t/playing-defined-system-sounds/85017 "2007-02-09T21:49:32Z")

</div>

Hi, i’d like to play linux system sounds for my app events. Anyone worked with this already ? playing sounds accessing system defined sounds Regards,

---

## [Nicer way to convert array of int to array of string](https://www.ruby-forum.com/t/nicer-way-to-convert-array-of-int-to-array-of-string/85073)

<div class="topic-metadata">

**Author:** [@S\_Kanakakorn](https://www.ruby-forum.com/u/S_Kanakakorn)\
**Replies:** 3\
**Last updated:** [February 9, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/nicer-way-to-convert-array-of-int-to-array-of-string/85073 "2007-02-09T21:30:30Z")

</div>

Hi, I’m quite new in Ruby. Here is what I wrote to convert array of integer to array of string. I’m sure there is more compact and nicer way to do this. Can I see the “ruby” way here ? def convert(intArray) strin…

---

## [Segmentation fault: Ruby 1.8.5 Under VC++ express 2005](https://www.ruby-forum.com/t/segmentation-fault-ruby-1-8-5-under-vc-express-2005/85035)

<div class="topic-metadata">

**Author:** [@zmzmzm](https://www.ruby-forum.com/u/zmzmzm)\
**Replies:** 3\
**Last updated:** [February 9, 2007, 8:00pm UTC](https://www.ruby-forum.com/t/segmentation-fault-ruby-1-8-5-under-vc-express-2005/85035 "2007-02-09T20:00:18Z")

</div>

Hi, Have anybody tried to compile the 1.8.5 code with VC++ express 2005 SP1 and Windows platform SDK 2003 R2? I have pass the compile. And when it run miniruby, coredump happens. ----------------\>8-------------------…

---

## [Iterators and blocks question](https://www.ruby-forum.com/t/iterators-and-blocks-question/84981)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 13\
**Last updated:** [February 9, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/iterators-and-blocks-question/84981 "2007-02-09T19:46:17Z")

</div>

I am new to ruby and am trying to learn my way around it. I saw the following example somewhere on the net to read a file line by line and list it to the console: IO.foreach(“test.txt”) {|line| puts line} This works…

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

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