# Ruby

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

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

---

## [WeBrick](https://www.ruby-forum.com/t/webrick/88127)

<div class="topic-metadata">

**Author:** [@Hanan\_M](https://www.ruby-forum.com/u/Hanan_M)\
**Replies:** 3\
**Last updated:** [March 8, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/webrick/88127 "2007-03-08T18:03:34Z")

</div>

Hello what could I use to start and shutdown webrick from within a ruby script an not direclty from the command prompt. please Help Thanks in advance

---

## [Array#sort -block with conditions for \<=\>'ing](https://www.ruby-forum.com/t/array-sort-block-with-conditions-for-ing/88145)

<div class="topic-metadata">

**Author:** [@carp](https://www.ruby-forum.com/u/carp)\
**Replies:** 4\
**Last updated:** [March 8, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/array-sort-block-with-conditions-for-ing/88145 "2007-03-08T17:09:07Z")

</div>

Hello Rubyists, I want to sort an array of objects of the same class (MyClass). The array should be sorted by arbitrary attributes of that class, but the problem is that one attribute can be nil. The code looks like …

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/102708)

<div class="topic-metadata">

**Author:** [@dvohra09](https://www.ruby-forum.com/u/dvohra09)\
**Replies:** 0\
**Last updated:** [March 8, 2007, 4:11pm UTC](https://www.ruby-forum.com/t/unsubscribe/102708 "2007-03-08T16:11:16Z")

</div>

unsubscribe

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/88159)

<div class="topic-metadata">

**Author:** [@dvohra09](https://www.ruby-forum.com/u/dvohra09)\
**Replies:** 0\
**Last updated:** [March 8, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/no-subject/88159 "2007-03-08T16:10:16Z")

</div>

unsubscribe

---

## [How do I instantiate a class who's name is dynamic?](https://www.ruby-forum.com/t/how-do-i-instantiate-a-class-whos-name-is-dynamic/69722)

<div class="topic-metadata">

**Author:** [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Replies:** 10\
**Last updated:** [March 8, 2007, 4:05pm UTC](https://www.ruby-forum.com/t/how-do-i-instantiate-a-class-whos-name-is-dynamic/69722 "2007-03-08T16:05:47Z")

</div>

I want to do the following, where ‘somefile’ is a dynamic value: require ‘somefile.rb’ ‘somefile.rb’ will have a module inside it named “Magic\_Module\_somefile” Inside that module there will be a class named “Magic\_Cla…

---

## [TkVariables and ".value" method](https://www.ruby-forum.com/t/tkvariables-and-value-method/88155)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 1\
**Last updated:** [March 8, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/tkvariables-and-value-method/88155 "2007-03-08T15:58:14Z")

</div>

The code below, which puts “Hello” in a label on press of a button, works if the command for the button is { a.value = “Hello” }, but not if it is { a = “Hello” }. I’m trying to understand “why”, and can’t find anyth…

---

## [Dealing with multiple encodings in the same app](https://www.ruby-forum.com/t/dealing-with-multiple-encodings-in-the-same-app/88131)

<div class="topic-metadata">

**Author:** [@Isak](https://www.ruby-forum.com/u/Isak)\
**Replies:** 2\
**Last updated:** [March 8, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/dealing-with-multiple-encodings-in-the-same-app/88131 "2007-03-08T15:26:08Z")

</div>

Our (rails) app is mainly utf-8, so we set kcode to u. However, we need to generate pdfs using the cp1252 encoding, as the FPDF library doesn’t have unicode support. Translating strings work fine using iconv, but the …

---

## [Gops (#116)](https://www.ruby-forum.com/t/gops-116/88148)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [March 8, 2007, 3:01pm UTC](https://www.ruby-forum.com/t/gops-116/88148 "2007-03-08T15:01:04Z")

</div>

When I was first solving this quiz I built a suite of functions that measured bidding power remaining and the ratio of your current score to the guaranteed victory score of 46 points. I then tried to fine tune a bot…

---

## [Horizontal scaling - advice needed](https://www.ruby-forum.com/t/horizontal-scaling-advice-needed/88044)

<div class="topic-metadata">

**Author:** [@Greg\_Loriman](https://www.ruby-forum.com/u/Greg_Loriman)\
**Replies:** 15\
**Last updated:** [March 8, 2007, 2:10pm UTC](https://www.ruby-forum.com/t/horizontal-scaling-advice-needed/88044 "2007-03-08T14:10:58Z")

</div>

Hi folks, I posted this in railsweenie, but it’s not really a rails question, and the post isn;t getting any answers. I’m not an experienced web developer. I’m still rather groping around. I come from a client serve…

---

## [Retrieving email message body only via 'net/pop'](https://www.ruby-forum.com/t/retrieving-email-message-body-only-via-net-pop/88124)

<div class="topic-metadata">

**Author:** [@dazzle](https://www.ruby-forum.com/u/dazzle)\
**Replies:** 1\
**Last updated:** [March 8, 2007, 1:30pm UTC](https://www.ruby-forum.com/t/retrieving-email-message-body-only-via-net-pop/88124 "2007-03-08T13:30:53Z")

</div>

Hi, Is it possible to retrieive just the email message body using ‘net/ pop’ or is there another Ruby POP3 library where you can do this? All help, code etc appreciated.

---

## [Looking for crc32-0.1.0](https://www.ruby-forum.com/t/looking-for-crc32-0-1-0/88090)

<div class="topic-metadata">

**Author:** [@s0nspark](https://www.ruby-forum.com/u/s0nspark)\
**Replies:** 3\
**Last updated:** [March 8, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/looking-for-crc32-0-1-0/88090 "2007-03-08T13:02:25Z")

</div>

I inherited some legacy ruby code that uses the Digest::CRC32 extension mentioned here: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/63994?help-en Unfortunately the source I was given only included that…

---

## [Regular expressions - Again](https://www.ruby-forum.com/t/regular-expressions-again/87791)

<div class="topic-metadata">

**Author:** [@j-merrill](https://www.ruby-forum.com/u/j-merrill)\
**Replies:** 13\
**Last updated:** [March 8, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/regular-expressions-again/87791 "2007-03-08T12:47:38Z")

</div>

I’m really bad with this things called regular expressions, so I’m looking for help again. Now, if I have a String like “some string some content this I want” And I want to use the scan function to extract what is be…

---

## [Extension in c, close file when script ends, rb\_io\_fptr\_fina](https://www.ruby-forum.com/t/extension-in-c-close-file-when-script-ends-rb-io-fptr-fina/88107)

<div class="topic-metadata">

**Author:** [@aflatter](https://www.ruby-forum.com/u/aflatter)\
**Replies:** 1\
**Last updated:** [March 8, 2007, 10:20am UTC](https://www.ruby-forum.com/t/extension-in-c-close-file-when-script-ends-rb-io-fptr-fina/88107 "2007-03-08T10:20:22Z")

</div>

hi, I wrote an extension that uses a file to handle an external device. The initialize method opens the file and it then is permanently open. I don’ t want to open and close it every time I write to it. I wondered h…

---

## [Sorting objects](https://www.ruby-forum.com/t/sorting-objects/88100)

<div class="topic-metadata">

**Author:** [@jasonb](https://www.ruby-forum.com/u/jasonb)\
**Replies:** 6\
**Last updated:** [March 8, 2007, 10:13am UTC](https://www.ruby-forum.com/t/sorting-objects/88100 "2007-03-08T10:13:22Z")

</div>

I have a series of objects in an array. Each object corresponds to an application and has several attributes. For instance I can call: @application.name @application.icon @application.ranking “ranking” is always an …

---

## [Setting default vales](https://www.ruby-forum.com/t/setting-default-vales/87989)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 7\
**Last updated:** [March 8, 2007, 10:09am UTC](https://www.ruby-forum.com/t/setting-default-vales/87989 "2007-03-08T10:09:21Z")

</div>

Hello, I want to have some function that will two parameters. First is the variable name and second is a value. Inside I will check: if the variable is existed I do nothing else I assign “value” to variable It shou…

---

## [Mocha raise exception first call, return value second call](https://www.ruby-forum.com/t/mocha-raise-exception-first-call-return-value-second-call/87957)

<div class="topic-metadata">

**Author:** [@nappin](https://www.ruby-forum.com/u/nappin)\
**Replies:** 3\
**Last updated:** [March 8, 2007, 9:38am UTC](https://www.ruby-forum.com/t/mocha-raise-exception-first-call-return-value-second-call/87957 "2007-03-08T09:38:34Z")

</div>

Is there a way to have mocha raise an exception the first time an stub is called, and then return a value the second time it is called? First example, I’m trying to connect to a server and test the case where my first…

---

## [Encrypted By Ezcrypto but cannot decrypt with PHP mcrypt](https://www.ruby-forum.com/t/encrypted-by-ezcrypto-but-cannot-decrypt-with-php-mcrypt/88094)

<div class="topic-metadata">

**Author:** [@kwon37xi](https://www.ruby-forum.com/u/kwon37xi)\
**Replies:** 1\
**Last updated:** [March 8, 2007, 9:24am UTC](https://www.ruby-forum.com/t/encrypted-by-ezcrypto-but-cannot-decrypt-with-php-mcrypt/88094 "2007-03-08T09:24:52Z")

</div>

Hello, I’m a Ruby newbie. Our site is developed with Ruby On Rails mainly, but some parts use PHP 5. So, in Ruby, it encrypt username with EzCrypto aes-128-cbc with a key and save it to browser cookie. But cannot de…

---

## [Smallest FizzBuzz program](https://www.ruby-forum.com/t/smallest-fizzbuzz-program/87441)

<div class="topic-metadata">

**Author:** [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Replies:** 32\
**Last updated:** [March 8, 2007, 8:49am UTC](https://www.ruby-forum.com/t/smallest-fizzbuzz-program/87441 "2007-03-08T08:49:11Z")

</div>

This is really bugging me. Someone posted a golf challenge to write a smallest FizzBuzz program here: anarchy golf - FizzBuzz (although the site was down when I checked it a few minutes ago) Basically, the challenge…

---

## [Just saying](https://www.ruby-forum.com/t/just-saying/88025)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 1\
**Last updated:** [March 8, 2007, 7:31am UTC](https://www.ruby-forum.com/t/just-saying/88025 "2007-03-08T07:31:05Z")

</div>

---

## [Speaker Selection for Gotham Ruby Conference](https://www.ruby-forum.com/t/speaker-selection-for-gotham-ruby-conference/88101)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [March 8, 2007, 6:27am UTC](https://www.ruby-forum.com/t/speaker-selection-for-gotham-ruby-conference/88101 "2007-03-08T06:27:00Z")

</div>

The organizers of GoRuCo, the Gotham Ruby Conference, are proud to announce the speakers for this year’s conference. Without further ado here is the list of speakers and their tentative session titles: Trotter Cashio…

---

## [Ruby Weekly News 26th February - 4th March 2007](https://www.ruby-forum.com/t/ruby-weekly-news-26th-february-4th-march-2007/87837)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 6\
**Last updated:** [March 8, 2007, 6:17am UTC](https://www.ruby-forum.com/t/ruby-weekly-news-26th-february-4th-march-2007/87837 "2007-03-08T06:17:00Z")

</div>

Links are at http://www.rubyweeklynews.org/20070304.html. Ruby Weekly News 26th February - 4th March 2007 Ruby Weekly News is a summary of the week’s activity on the ruby-talk mailing list / the comp.lang.ruby newsgro…

---

## [MouseHole 1.9.92/2.0B - Web Interface Problems](https://www.ruby-forum.com/t/mousehole-1-9-92-2-0b-web-interface-problems/88095)

<div class="topic-metadata">

**Author:** [@qYuri-us](https://www.ruby-forum.com/u/qYuri-us)\
**Replies:** 0\
**Last updated:** [March 8, 2007, 4:30am UTC](https://www.ruby-forum.com/t/mousehole-1-9-92-2-0b-web-interface-problems/88095 "2007-03-08T04:30:53Z")

</div>

I installed MouseHole v1.9.92 gem and all its dependencies. I’m having no problems getting the applications to run; however, none of the “\\Static” resources are loading for the web interface except doorway.css and th…

---

## [Really cool looking Ruby job](https://www.ruby-forum.com/t/really-cool-looking-ruby-job/88042)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 4\
**Last updated:** [March 8, 2007, 3:24am UTC](https://www.ruby-forum.com/t/really-cool-looking-ruby-job/88042 "2007-03-08T03:24:46Z")

</div>

CodeGear is looking for a Ruby/RoR evangalist! The job looks so cool I had to post something about it!

---

## [Making "require" just work with some dynamic load path manip](https://www.ruby-forum.com/t/making-require-just-work-with-some-dynamic-load-path-manip/88038)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 3\
**Last updated:** [March 8, 2007, 3:10am UTC](https://www.ruby-forum.com/t/making-require-just-work-with-some-dynamic-load-path-manip/88038 "2007-03-08T03:10:45Z")

</div>

The problem: If I have a simple file, “a.rb”: #!/usr/bin/env ruby require 'b' And it’s companion, “b.rb”: puts "Hello, world!" Running “a.rb” works fine if I start from the directory containing those files. If I ch…

---

## [NetBeans Ruby Support](https://www.ruby-forum.com/t/netbeans-ruby-support/88049)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 5\
**Last updated:** [March 8, 2007, 2:50am UTC](https://www.ruby-forum.com/t/netbeans-ruby-support/88049 "2007-03-08T02:50:51Z")

</div>

Has anyone successfully installed Ruby/Ruby on Rails plug-in modules in NetBeans? I have downloaded and installed the following file by unzipping it in the NetBeans folder. netbeans-6\_0-daily-bin-200703041900-4\_Mar\_2…

---

## [Using Java POI in ruby?](https://www.ruby-forum.com/t/using-java-poi-in-ruby/88087)

<div class="topic-metadata">

**Author:** [@Captain\_R](https://www.ruby-forum.com/u/Captain_R)\
**Replies:** 0\
**Last updated:** [March 8, 2007, 1:59am UTC](https://www.ruby-forum.com/t/using-java-poi-in-ruby/88087 "2007-03-08T01:59:50Z")

</div>

Does anyone have any idea how to use the Ruby bindings for the Java POI project in ruby? The main page for the project is here: POI Ruby Bindings. There seems to be some sort of precompiled binary file available, but …

---

## [Object\_\* and instance\_\* methods](https://www.ruby-forum.com/t/object-and-instance-methods/87240)

<div class="topic-metadata">

**Author:** [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Replies:** 37\
**Last updated:** [March 8, 2007, 1:45am UTC](https://www.ruby-forum.com/t/object-and-instance-methods/87240 "2007-03-08T01:45:39Z")

</div>

A while back there was a proposal to use a standard naming scheme for meta-programming methods. It went like this: object\_id object\_class (instead of class) object\_send (instead of send) object\_method (instead of me…

---

## [Regexp backtracking issues in 1.8](https://www.ruby-forum.com/t/regexp-backtracking-issues-in-1-8/87994)

<div class="topic-metadata">

**Author:** [@Vasile\_G](https://www.ruby-forum.com/u/Vasile_G)\
**Replies:** 3\
**Last updated:** [March 8, 2007, 1:42am UTC](https://www.ruby-forum.com/t/regexp-backtracking-issues-in-1-8/87994 "2007-03-08T01:42:43Z")

</div>

Basically Ruby 1.8 fails to backtrack correctly a number of regular expressions. The simplest one is probably: irb(main):036:0\> /a(ba|.)\*?a/.match(‘axba’) =\> nil There is more to it, and since I had to write it down…

---

## [Ferret 0.11.0-rc1](https://www.ruby-forum.com/t/ferret-0-11-0-rc1/86751)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 8\
**Last updated:** [March 8, 2007, 1:30am UTC](https://www.ruby-forum.com/t/ferret-0-11-0-rc1/86751 "2007-03-08T01:30:33Z")

</div>

Hey folks, Sorry for cross posting like this but this is an important announcement for all Ferret users. \*\* Description \*\* Firstly for those who don’t know, Ferret is a full-text search library which makes adding se…

---

## [Adding descriptive text to OptionParser output](https://www.ruby-forum.com/t/adding-descriptive-text-to-optionparser-output/88078)

<div class="topic-metadata">

**Author:** [@twp](https://www.ruby-forum.com/u/twp)\
**Replies:** 2\
**Last updated:** [March 8, 2007, 12:54am UTC](https://www.ruby-forum.com/t/adding-descriptive-text-to-optionparser-output/88078 "2007-03-08T00:54:31Z")

</div>

Hi, I’d like to add a paragraph of text to my usage message, describing the non-option arguments accepted by my script. I don’t see any way to do that in the OptionParser api; have I missed something? The closest t…

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

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