# Ruby

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

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

---

## [Optparse and required switches](https://www.ruby-forum.com/t/optparse-and-required-switches/116661)

<div class="topic-metadata">

**Author:** [@g00nz](https://www.ruby-forum.com/u/g00nz)\
**Replies:** 7\
**Last updated:** [October 8, 2007, 7:25pm UTC](https://www.ruby-forum.com/t/optparse-and-required-switches/116661 "2007-10-08T19:25:37Z")

</div>

Hi … Im lost with optparse. Got a couple of questions if its OK. I’ve been reading the documentation but I cant get it into my thick head how I tell an option that it is required or optional? I guess all opts are …

---

## [How to extend builtin classes?](https://www.ruby-forum.com/t/how-to-extend-builtin-classes/116553)

<div class="topic-metadata">

**Author:** [@krishna](https://www.ruby-forum.com/u/krishna)\
**Replies:** 9\
**Last updated:** [October 8, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/how-to-extend-builtin-classes/116553 "2007-10-08T18:05:09Z")

</div>

Hi How do we extend inbuilt classes. For example Float doesn’t have \* method implemented. I tried adding this method: \[RubyMethodAttribute("\*", RubyMethodAttributes.PublicInstance)\] public static object Multiply(doub…

---

## [Anybody try to install the rubyforge gem?](https://www.ruby-forum.com/t/anybody-try-to-install-the-rubyforge-gem/116628)

<div class="topic-metadata">

**Author:** [@cnick](https://www.ruby-forum.com/u/cnick)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/anybody-try-to-install-the-rubyforge-gem/116628 "2007-10-08T18:01:03Z")

</div>

I just tried to install the rubyforge gem and got: ERROR: While executing gem … (Errno::ENOENT) File not found Anybody have any luck with this gem? –Chris

---

## [Compile error after pack('m')](https://www.ruby-forum.com/t/compile-error-after-pack-m/116666)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/compile-error-after-pack-m/116666 "2007-10-08T16:56:36Z")

</div>

I use array#pack to obfuscate some of my scripts. This last week, I had a user in French Polynesia try to run the script and it would not load. He got a compile error on the eval line of the script. He’s running the …

---

## [Java .class to ruby object](https://www.ruby-forum.com/t/java-class-to-ruby-object/116665)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/java-class-to-ruby-object/116665 "2007-10-08T16:28:57Z")

</div>

how to convert a \*.class (java bytecode) to ruby object…

---

## [Find](https://www.ruby-forum.com/t/find/116571)

<div class="topic-metadata">

**Author:** [@Bertram\_S](https://www.ruby-forum.com/u/Bertram_S)\
**Replies:** 7\
**Last updated:** [October 8, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/find/116571 "2007-10-08T16:28:53Z")

</div>

Hi, the Ruby built-in Find module lacks a lot of features the GNU find tools has. I wrote a new one (~170 lines). http://www.bertram-scharpf.de/tmp/find.rb Maybe somebody likes it. Bertram

---

## [JRuby Rails console and other quirks in Windows](https://www.ruby-forum.com/t/jruby-rails-console-and-other-quirks-in-windows/116655)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 4:07pm UTC](https://www.ruby-forum.com/t/jruby-rails-console-and-other-quirks-in-windows/116655 "2007-10-08T16:07:02Z")

</div>

I’m running JRuby for some Rails development and I’ve noticed some quirks with script/console as well as when running various rake tasks. For example, running an RSpec test, this is what my output looks like: e\[32m.e…

---

## [Subversion and unrecognized URL scheme error](https://www.ruby-forum.com/t/subversion-and-unrecognized-url-scheme-error/116651)

<div class="topic-metadata">

**Author:** [@dmiller3](https://www.ruby-forum.com/u/dmiller3)\
**Replies:** 5\
**Last updated:** [October 8, 2007, 3:17pm UTC](https://www.ruby-forum.com/t/subversion-and-unrecognized-url-scheme-error/116651 "2007-10-08T15:17:40Z")

</div>

Hello– I believe I have installed subversion and all of its dependencies correctly. I also edited the .bashrc and .bash\_profile files according to the numerous directions i found. (one of which is here, for bluehost: …

---

## [LDAP bind error](https://www.ruby-forum.com/t/ldap-bind-error/116631)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 4\
**Last updated:** [October 8, 2007, 2:25pm UTC](https://www.ruby-forum.com/t/ldap-bind-error/116631 "2007-10-08T14:25:57Z")

</div>

i am new to ruby … in java my ldap server is connecting like username=“myname” password="\*\*\*\*\*\*\*\*\*" LDAPConnection ld = new LDAPConnection(); ld.connect( “192.168.1.1”, 389); con=ld.authenticate (“uid=”+username+"…

---

## [Re: MATRIX PROBLEMS (AGAIN!)](https://www.ruby-forum.com/t/re-matrix-problems-again/116653)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 2:25pm UTC](https://www.ruby-forum.com/t/re-matrix-problems-again/116653 "2007-10-08T14:25:53Z")

</div>

Hi John Instead of this: line.each(’,’) { |this\_record| fields \<\< this\_record.chomp(",").strip() # read to the end of the file into ‘fields’, split into lines and chomp out the delimiter mat1\[r,c\] = fiel…

---

## [Memory leakage](https://www.ruby-forum.com/t/memory-leakage/116638)

<div class="topic-metadata">

**Author:** [@pragati](https://www.ruby-forum.com/u/pragati)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 11:55am UTC](https://www.ruby-forum.com/t/memory-leakage/116638 "2007-10-08T11:55:17Z")

</div>

Hi, Is there a problem of memory leakage in Rails application? How can i get the information about if it is happening in my application? Can i control it? Thanks, Pragati

---

## [Bug passing ruby objects through java objects](https://www.ruby-forum.com/t/bug-passing-ruby-objects-through-java-objects/116636)

<div class="topic-metadata">

**Author:** [@rjst](https://www.ruby-forum.com/u/rjst)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 11:18am UTC](https://www.ruby-forum.com/t/bug-passing-ruby-objects-through-java-objects/116636 "2007-10-08T11:18:33Z")

</div>

Hi, I've found that passing ruby objects to java classes that hold them and return them causes the returned object to not respond to methods that are not present in the java interface. See the code below for an examp…

---

## [Supressing RDoc links](https://www.ruby-forum.com/t/supressing-rdoc-links/116590)

<div class="topic-metadata">

**Author:** [@noagenda](https://www.ruby-forum.com/u/noagenda)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 9:36am UTC](https://www.ruby-forum.com/t/supressing-rdoc-links/116590 "2007-10-08T09:36:58Z")

</div>

I recently noticed some anomalies in the Mocha RDoc. Within a method RDoc comment, any word that happens to be the same as a method in the same class gets turned into a link. You can see an example \[2\] with the word …

---

## [Exec format error when installing Globalize Rails](https://www.ruby-forum.com/t/exec-format-error-when-installing-globalize-rails/116579)

<div class="topic-metadata">

**Author:** [@ohaleck](https://www.ruby-forum.com/u/ohaleck)\
**Replies:** 3\
**Last updated:** [October 8, 2007, 9:00am UTC](https://www.ruby-forum.com/t/exec-format-error-when-installing-globalize-rails/116579 "2007-10-08T09:00:32Z")

</div>

Hello, I must admit I am a complete noob in Rails. I need to develop an application with support for several languages so I decided to install Globalize just after installing Rails. I created a project named “first” …

---

## [Cygwin's Ruby (was: Re: Whats going on!?!?)](https://www.ruby-forum.com/t/cygwins-ruby-was-re-whats-going-on/116303)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 19\
**Last updated:** [October 8, 2007, 8:42am UTC](https://www.ruby-forum.com/t/cygwins-ruby-was-re-whats-going-on/116303 "2007-10-08T08:42:55Z")

</div>

2007/10/2, Phlip removed\_email\_address@domain.invalid: Get CygWin (but not its Ruby), and learn to use BASH, a real command line interface. After a little easy tuning it’s easier than mouse abuse. Hi Phlip, I’m cu…

---

## [Image libraries for Ruby?](https://www.ruby-forum.com/t/image-libraries-for-ruby/116533)

<div class="topic-metadata">

**Author:** [@forgottenwizard](https://www.ruby-forum.com/u/forgottenwizard)\
**Replies:** 4\
**Last updated:** [October 8, 2007, 5:27am UTC](https://www.ruby-forum.com/t/image-libraries-for-ruby/116533 "2007-10-08T05:27:16Z")

</div>

I’m trying to write out a script to help me sort out a bunch (more than 1,000) wallpapers, and do so by wallpaper size. I’ve done a little looking, but so far the only lib I have seen that might help is ImageMagick, a…

---

## [Interface](https://www.ruby-forum.com/t/interface/116614)

<div class="topic-metadata">

**Author:** [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Replies:** 4\
**Last updated:** [October 8, 2007, 4:03am UTC](https://www.ruby-forum.com/t/interface/116614 "2007-10-08T04:03:26Z")

</div>

Hi There, I have been using rails for the last 6 months and loving every minute of it. I decided it would be smart to dive into learning the in’s and out’s of Ruby. I bought Beginning Ruby, Programming Ruby, and the R…

---

## [Re: considering writing a book on Ruby/Rails?](https://www.ruby-forum.com/t/re-considering-writing-a-book-on-ruby-rails/116622)

<div class="topic-metadata">

**Author:** [@al\_batuul](https://www.ruby-forum.com/u/al_batuul)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 3:10am UTC](https://www.ruby-forum.com/t/re-considering-writing-a-book-on-ruby-rails/116622 "2007-10-08T03:10:03Z")

</div>

Hi, I think writing a book is a good idea. There are several topics and examples that can help students and developers in different applications; I am willing to assist in case you need help, beast, al\_batuul ----…

---

## [Where's rake?](https://www.ruby-forum.com/t/wheres-rake/116608)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 5\
**Last updated:** [October 8, 2007, 3:07am UTC](https://www.ruby-forum.com/t/wheres-rake/116608 "2007-10-08T03:07:54Z")

</div>

I installed rubygems, and I got help output when I issued the command: $ gem help so I think ruby gems installed correctly. But when I tried to install the Rake gem, this was the output: $ gem install -r rake Bulk …

---

## [Team system ? need some help](https://www.ruby-forum.com/t/team-system-need-some-help/116621)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 2:09am UTC](https://www.ruby-forum.com/t/team-system-need-some-help/116621 "2007-10-08T02:09:56Z")

</div>

hi, i’ve got to build some sort of team system where many users can add themselves to one team. now i’ve thought about doing this a couple of ways but one that sticks is creating a Team table with a record for each te…

---

## [Re: Itinerary for a Traveling Salesman (#142)](https://www.ruby-forum.com/t/re-itinerary-for-a-traveling-salesman-142/116620)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 1:20am UTC](https://www.ruby-forum.com/t/re-itinerary-for-a-traveling-salesman-142/116620 "2007-10-08T01:20:30Z")

</div>

On Oct 7, 2007, at 12:28 PM, James Edward G. II wrote: \<definitions of Grid and draw\_itin removed - see main solution below\> if n%2==0 draw\_itin(itin, “#{n}x#{n}tour2.jpg”) I believe there’s a typo in the above. …

---

## [Delegation vs. Duck Typing (was Re: The Case for Multiple-Inheritance)](https://www.ruby-forum.com/t/delegation-vs-duck-typing-was-re-the-case-for-multiple-inheritance/116595)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 12:38am UTC](https://www.ruby-forum.com/t/delegation-vs-duck-typing-was-re-the-case-for-multiple-inheritance/116595 "2007-10-08T00:38:53Z")

</div>

On Oct 6, 2007, at 7:48 PM, Jason P. wrote: (The one sticking point I would occasionally hit was delegation, as \[offlist\] I’m enjoying this thread. Would you please consider elaborating on this notion in the t…

---

## [Re: Ruby vs. PHP](https://www.ruby-forum.com/t/re-ruby-vs-php/116591)

<div class="topic-metadata">

**Author:** [@igouy](https://www.ruby-forum.com/u/igouy)\
**Replies:** 3\
**Last updated:** [October 7, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/re-ruby-vs-php/116591 "2007-10-07T22:00:20Z")

</div>

M. Edward (Ed) Borasky wrote: -snip- The raw numbers that went into this are from the Alioth shootout page, and what I haven’t done is checked out which versions of Perl, Python, YARV, Ruby, jRuby and PHP these test…

---

## [Re: Ruby vs. PHP](https://www.ruby-forum.com/t/re-ruby-vs-php/116594)

<div class="topic-metadata">

**Author:** [@igouy](https://www.ruby-forum.com/u/igouy)\
**Replies:** 0\
**Last updated:** [October 7, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/re-ruby-vs-php/116594 "2007-10-07T19:52:23Z")

</div>

Chad P. wrote: -snip- I’m also not sure the jruby implementation’s numbers here are representative of JRuby’s strengths. Does JRuby benefit from the benefits of Java’s optimizing VM for long-running processes? I k…

---

## [Re: Itinerary for a Traveling Salesman (#142)](https://www.ruby-forum.com/t/re-itinerary-for-a-traveling-salesman-142/116582)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 1\
**Last updated:** [October 7, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/re-itinerary-for-a-traveling-salesman-142/116582 "2007-10-07T19:29:29Z")

</div>

First, before I get to my main solution, I would like to show that, as Morton pointed out, yes, it is very possible to have a quick, exact solution. Here’s one that does so for N \>= 3 (N=2 and N=1 nevertheless draw co…

---

## [Re: Itinerary for a Traveling Salesman (#142)](https://www.ruby-forum.com/t/re-itinerary-for-a-traveling-salesman-142/116574)

<div class="topic-metadata">

**Author:** [@steve\_d](https://www.ruby-forum.com/u/steve_d)\
**Replies:** 1\
**Last updated:** [October 7, 2007, 7:19pm UTC](https://www.ruby-forum.com/t/re-itinerary-for-a-traveling-salesman-142/116574 "2007-10-07T19:19:31Z")

</div>

Hi all, You can find my solution here: http://rn86.net/~stevedp/salesman.tar.gz For this quiz I pretty much just implemented the GA described in the problem: exchanging and reversing. I pick random indexes in the arr…

---

## [Fwd: Ruby Quiz #142 Submission](https://www.ruby-forum.com/t/fwd-ruby-quiz-142-submission/229148)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [October 7, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/fwd-ruby-quiz-142-submission/229148 "2007-10-07T19:16:35Z")

</div>

Begin forwarded message:

---

## [Custom Packets](https://www.ruby-forum.com/t/custom-packets/114207)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 11\
**Last updated:** [October 7, 2007, 6:02pm UTC](https://www.ruby-forum.com/t/custom-packets/114207 "2007-10-07T18:02:35Z")

</div>

Hey all, So if packets are just streams of bytes sent out to a device… Why is crafting custom packets so hard? Couldn’t you just formulate a string of the information, and then send it to the device? From the Curious…

---

## [Difference between Distributed ruby and Rinda](https://www.ruby-forum.com/t/difference-between-distributed-ruby-and-rinda/113272)

<div class="topic-metadata">

**Author:** [@hemalatha](https://www.ruby-forum.com/u/hemalatha)\
**Replies:** 8\
**Last updated:** [October 7, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/difference-between-distributed-ruby-and-rinda/113272 "2007-10-07T17:15:01Z")

</div>

Can anyone tell me the difference between Distributed ruby and rinda?

---

## [Is using attr\_accessor for class variables possible?](https://www.ruby-forum.com/t/is-using-attr-accessor-for-class-variables-possible/116572)

<div class="topic-metadata">

**Author:** [@mobileamusement](https://www.ruby-forum.com/u/mobileamusement)\
**Replies:** 5\
**Last updated:** [October 7, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/is-using-attr-accessor-for-class-variables-possible/116572 "2007-10-07T15:58:46Z")

</div>

I know that attr\_accessor works for accessing instance variables, but it doesn’t seem to work for class ones. What is the best way to set/ retrieve the value of a class variable? Many thanks Gabriel

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

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