# Ruby

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

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

---

## [What is a stable way to use postgres with Ruby?](https://www.ruby-forum.com/t/what-is-a-stable-way-to-use-postgres-with-ruby/86267)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [March 23, 2006, 11:32pm UTC](https://www.ruby-forum.com/t/what-is-a-stable-way-to-use-postgres-with-ruby/86267 "2006-03-23T23:32:06Z")

</div>

From the web, I gather the “postgres ruby extension” and “postgres pure ruby” are two different ways to use SQL from ruby via postgres. Are the two methods about the same with respect to their “maturity” and stabil…

---

## [Perl regexp to ruby one conversion?](https://www.ruby-forum.com/t/perl-regexp-to-ruby-one-conversion/85925)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 13\
**Last updated:** [March 23, 2006, 10:53pm UTC](https://www.ruby-forum.com/t/perl-regexp-to-ruby-one-conversion/85925 "2006-03-23T22:53:58Z")

</div>

i’ve a perl regexp : $field =~ m/^( \[\\x09\\x0A\\x0D\\x20-\\x7E\] # ASCII | \[\\xC2-\\xDF\]\[\\x80-\\xBF\] # non-overlong 2-byte | \\xE0\[\\xA0-\\xBF\]\[\\x80-\\xBF\] # excluding overlongs | \[\\xE1-\\xEC\\xEE\\…

---

## [Is this a kind of design patterns?](https://www.ruby-forum.com/t/is-this-a-kind-of-design-patterns/55587)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 22\
**Last updated:** [March 23, 2006, 10:31pm UTC](https://www.ruby-forum.com/t/is-this-a-kind-of-design-patterns/55587 "2006-03-23T22:31:49Z")

</div>

Hi! Sometimes a class provides object instantiation methods other than new. See an example. class Color def initialize r, g, b @r = r @g = g @b = b end def to\_s "R: #{@r}, G: #{@g}, B: #{@b}" end class \<\< s…

---

## [Re: undefined method \`add\_assertion' for nil:NilClass](https://www.ruby-forum.com/t/re-undefined-method-add-assertion-for-nil-nilclass/55798)

<div class="topic-metadata">

**Author:** [@PaatschS\_Bernd](https://www.ruby-forum.com/u/PaatschS_Bernd)\
**Replies:** 0\
**Last updated:** [March 23, 2006, 10:15pm UTC](https://www.ruby-forum.com/t/re-undefined-method-add-assertion-for-nil-nilclass/55798 "2006-03-23T22:15:40Z")

</div>

I found my problem. I added following two lines to my code in my include section, which is at the begin of my main program: require 'test/unit/assertions' include Test::Unit::Assertions This solved all my assert pro…

---

## [Language in Time.to\_s?](https://www.ruby-forum.com/t/language-in-time-to-s/55795)

<div class="topic-metadata">

**Author:** [@fxn](https://www.ruby-forum.com/u/fxn)\
**Replies:** 1\
**Last updated:** [March 23, 2006, 9:59pm UTC](https://www.ruby-forum.com/t/language-in-time-to-s/55795 "2006-03-23T21:59:47Z")

</div>

Is there a way to ensure Time.to\_s uses English? – fxn

---

## [Test unit with ARGV input](https://www.ruby-forum.com/t/test-unit-with-argv-input/55787)

<div class="topic-metadata">

**Author:** [@rtilley](https://www.ruby-forum.com/u/rtilley)\
**Replies:** 3\
**Last updated:** [March 23, 2006, 9:54pm UTC](https://www.ruby-forum.com/t/test-unit-with-argv-input/55787 "2006-03-23T21:54:00Z")

</div>

I can’t get test/unit to work with command line scripts that take user input via ARGV. Any tips on this? I continually get ‘initialize’: wrong number of arguments (0 for 1) (ArgumentError) that go back to my initializ…

---

## [Unhandled exception in thread causes ruby to lose control](https://www.ruby-forum.com/t/unhandled-exception-in-thread-causes-ruby-to-lose-control/55774)

<div class="topic-metadata">

**Author:** [@Shea\_M](https://www.ruby-forum.com/u/Shea_M)\
**Replies:** 1\
**Last updated:** [March 23, 2006, 9:52pm UTC](https://www.ruby-forum.com/t/unhandled-exception-in-thread-causes-ruby-to-lose-control/55774 "2006-03-23T21:52:22Z")

</div>

Thread.abort\_on\_exception = true t = Thread.new{ puts “here” raise “exception” } sleep 3 puts “t thread is #{t.alive?}” exit 0 The above code will cause ruby to eatup 100% cpu, for an infinite amount of time o…

---

## [Ruby::Watir Forum?](https://www.ruby-forum.com/t/ruby-watir-forum/54858)

<div class="topic-metadata">

**Author:** [@kalensr](https://www.ruby-forum.com/u/kalensr)\
**Replies:** 3\
**Last updated:** [March 23, 2006, 9:48pm UTC](https://www.ruby-forum.com/t/ruby-watir-forum/54858 "2006-03-23T21:48:55Z")

</div>

Hello All! I was wondering if there was any interest in starting a Watir forum? I have some questions around using Watir to do some web app testing, and from time to time I have general Ruby questions also. Thanks, K…

---

## [Best way to slurp a file into a string?](https://www.ruby-forum.com/t/best-way-to-slurp-a-file-into-a-string/85605)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 7\
**Last updated:** [March 23, 2006, 9:27pm UTC](https://www.ruby-forum.com/t/best-way-to-slurp-a-file-into-a-string/85605 "2006-03-23T21:27:46Z")

</div>

All, I would like to capture the entire contents of a file in to a string (a la Perl) - is this the best way to do it? File.open(@document.path, r) do |f| @lines = f.readlines html = @lines.join end so that the ht…

---

## [DATA.readlines in an inner file](https://www.ruby-forum.com/t/data-readlines-in-an-inner-file/55759)

<div class="topic-metadata">

**Author:** [@agorilla](https://www.ruby-forum.com/u/agorilla)\
**Replies:** 2\
**Last updated:** [March 23, 2006, 9:05pm UTC](https://www.ruby-forum.com/t/data-readlines-in-an-inner-file/55759 "2006-03-23T21:05:53Z")

</div>

Is there any way to use DATA.readlines to read the data (below END) in a file that’s been required/included? I want the read code to be inside the included/required file.

---

## [Questions/suggestions from a Ruby newbie](https://www.ruby-forum.com/t/questions-suggestions-from-a-ruby-newbie/85313)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 13\
**Last updated:** [March 23, 2006, 8:28pm UTC](https://www.ruby-forum.com/t/questions-suggestions-from-a-ruby-newbie/85313 "2006-03-23T20:28:17Z")

</div>

Hi, first of all let me say I really really like Ruby, and I look forward to use it in my projects. There are however a couple of questions I have and features I miss from my other languages (mainly Fortran and C++… …

---

## [Ruby IPC In an OpenMosix Cluster](https://www.ruby-forum.com/t/ruby-ipc-in-an-openmosix-cluster/85614)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 7\
**Last updated:** [March 23, 2006, 8:19pm UTC](https://www.ruby-forum.com/t/ruby-ipc-in-an-openmosix-cluster/85614 "2006-03-23T20:19:00Z")

</div>

I’m undertaking a project that will eventually become a processing pipeline application of sorts. It will receive data in a common format, transform it into one of many other formats, compile and send it off to vario…

---

## [Problem seeing classes in rubygem](https://www.ruby-forum.com/t/problem-seeing-classes-in-rubygem/86113)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 4\
**Last updated:** [March 23, 2006, 7:47pm UTC](https://www.ruby-forum.com/t/problem-seeing-classes-in-rubygem/86113 "2006-03-23T19:47:56Z")

</div>

Ruby 1.8.2 I am trying to take advantage of a Rubygem named RubyfulSoup (a port of the PHP BeautifulSoup module). I have installed the gem correctly (it shows up when I do gem -list) and my require\_gem statement succ…

---

## [Re: Ruby history](https://www.ruby-forum.com/t/re-ruby-history/85564)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 7\
**Last updated:** [March 23, 2006, 6:15pm UTC](https://www.ruby-forum.com/t/re-ruby-history/85564 "2006-03-23T18:15:50Z")

</div>

language and for this report, but also to learn, understand, and advance my knowledge of computing in general. Any new languages I learn helps me become a better programmer. Please e-mail me at removed\_email\_addre…

---

## [Upgrading from Ruby 1.8.2. to 1.8.4](https://www.ruby-forum.com/t/upgrading-from-ruby-1-8-2-to-1-8-4/86112)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [March 23, 2006, 5:47pm UTC](https://www.ruby-forum.com/t/upgrading-from-ruby-1-8-2-to-1-8-4/86112 "2006-03-23T17:47:41Z")

</div>

All, I am currently running Ruby 1.8.2 and Rails 1.0.0 on Windows XP. I’d like to upgrade from Ruby 1.8.2 to Ruby 1.8.4. Do I just download a tarball and unzip it into my Ruby install directory? Do I need to do anyt…

---

## [Proxy question when using soap/wsdlDriver](https://www.ruby-forum.com/t/proxy-question-when-using-soap-wsdldriver/86041)

<div class="topic-metadata">

**Author:** [@Jared\_R](https://www.ruby-forum.com/u/Jared_R)\
**Replies:** 1\
**Last updated:** [March 23, 2006, 4:57pm UTC](https://www.ruby-forum.com/t/proxy-question-when-using-soap-wsdldriver/86041 "2006-03-23T16:57:51Z")

</div>

Hi all, I’m going through the Brian M. web services article (http://www.testing.com/writings/behind-the-screens.pdf), but at my day job I’m behind a proxy/firewall. To run a Ruby gem I have to do something like this …

---

## [Specify a mandatory block parameter](https://www.ruby-forum.com/t/specify-a-mandatory-block-parameter/55076)

<div class="topic-metadata">

**Author:** [@Shea\_M](https://www.ruby-forum.com/u/Shea_M)\
**Replies:** 14\
**Last updated:** [March 23, 2006, 4:48pm UTC](https://www.ruby-forum.com/t/specify-a-mandatory-block-parameter/55076 "2006-03-23T16:48:26Z")

</div>

I think I know the answer to this already, but… Is there a what to make a block parameter mandatory? def no\_block( p\_str ) puts "#{p\_str}" end def block( &p\_block ) puts “#{p\_block}” end no\_block #this will cause …

---

## [How to make readline work in IRB?](https://www.ruby-forum.com/t/how-to-make-readline-work-in-irb/55646)

<div class="topic-metadata">

**Author:** [@randy\_k](https://www.ruby-forum.com/u/randy_k)\
**Replies:** 5\
**Last updated:** [March 23, 2006, 4:43pm UTC](https://www.ruby-forum.com/t/how-to-make-readline-work-in-irb/55646 "2006-03-23T16:43:15Z")

</div>

I did mention this in another thread, but (I think) think I’ve learned a little more, and decided to start a new thread. My problem is that after compiling Ruby 1.8.4 and installing it in place of the Mandriva2006 pa…

---

## [Problem with RubyWebDialogs and Ruby 1.8.4](https://www.ruby-forum.com/t/problem-with-rubywebdialogs-and-ruby-1-8-4/86040)

<div class="topic-metadata">

**Author:** [@blair](https://www.ruby-forum.com/u/blair)\
**Replies:** 0\
**Last updated:** [March 23, 2006, 4:29pm UTC](https://www.ruby-forum.com/t/problem-with-rubywebdialogs-and-ruby-1-8-4/86040 "2006-03-23T16:29:52Z")

</div>

Hi, I try to use RubyWebDialogs 0.2.0 (which seems really great) under Windows XP SP2. But when I try run an example script, I get this error: Insecure operation - system (SecurityError) On the web site, it is on the…

---

## [Space Merchant (#71)](https://www.ruby-forum.com/t/space-merchant-71/85965)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 1\
**Last updated:** [March 23, 2006, 4:15pm UTC](https://www.ruby-forum.com/t/space-merchant-71/85965 "2006-03-23T16:15:01Z")

</div>

The primary focus of this quiz, for me, was to see how well a handful of developers could quickly throw something together, without much knowledge of what the other guys were doing. I think it went very well. I forg…

---

## [Require Math](https://www.ruby-forum.com/t/require-math/85924)

<div class="topic-metadata">

**Author:** [@Lindsay\_B](https://www.ruby-forum.com/u/Lindsay_B)\
**Replies:** 4\
**Last updated:** [March 23, 2006, 2:58pm UTC](https://www.ruby-forum.com/t/require-math/85924 "2006-03-23T14:58:55Z")

</div>

I need to access the sqrt method in my rails app. I believe I need the Math library for this: irb(main):010:0\> require “Math” LoadError: no such file to load – Math Could someone tell me where I download the Math lib…

---

## [Space Merchant (#71)](https://www.ruby-forum.com/t/space-merchant-71/55161)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 38\
**Last updated:** [March 23, 2006, 2:56pm UTC](https://www.ruby-forum.com/t/space-merchant-71/55161 "2006-03-23T14:56:12Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Noob question about layout in FXRuby](https://www.ruby-forum.com/t/noob-question-about-layout-in-fxruby/55629)

<div class="topic-metadata">

**Author:** [@Arie\_van\_Wingerden](https://www.ruby-forum.com/u/Arie_van_Wingerden)\
**Replies:** 3\
**Last updated:** [March 23, 2006, 12:59pm UTC](https://www.ruby-forum.com/t/noob-question-about-layout-in-fxruby/55629 "2006-03-23T12:59:00Z")

</div>

Hi all, I am new to Ruby as well as FXRuby. When I tried to dig in, I wrote the next small program (which I derived from the FXRuby user’s guide). #===================================================================…

---

## [Nkf #guess1 and #guess2 on html files](https://www.ruby-forum.com/t/nkf-guess1-and-guess2-on-html-files/85842)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [March 23, 2006, 12:53pm UTC](https://www.ruby-forum.com/t/nkf-guess1-and-guess2-on-html-files/85842 "2006-03-23T12:53:57Z")

</div>

may be i’m not using correctly nkf #guess1 but it gaves me return type 3 (suuposed to be UTF-8) for ISO-8859-1 encoded files. it gaves me also 3 for UTF-8 encoded files ??? my code is simply : NKF.guess1(string) wit…

---

## [Net::HTTP timeout](https://www.ruby-forum.com/t/net-http-timeout/55599)

<div class="topic-metadata">

**Author:** [@Alexandru\_ESUngur](https://www.ruby-forum.com/u/Alexandru_ESUngur)\
**Replies:** 5\
**Last updated:** [March 23, 2006, 12:00pm UTC](https://www.ruby-forum.com/t/net-http-timeout/55599 "2006-03-23T12:00:27Z")

</div>

Hi all, Is there a way to set the timout limit that affects Net::HTTP ? This is what I’m trying to do: body = Net::HTTP.get(URI.parse(url)) and I do know that the target script (url) takes a long time to do its proc…

---

## [Making use of buttons](https://www.ruby-forum.com/t/making-use-of-buttons/55727)

<div class="topic-metadata">

**Author:** [@sri\_ram](https://www.ruby-forum.com/u/sri_ram)\
**Replies:** 0\
**Last updated:** [March 23, 2006, 9:19am UTC](https://www.ruby-forum.com/t/making-use-of-buttons/55727 "2006-03-23T09:19:01Z")

</div>

HI I am trying to create a user interface for a client side of a socket programming structure.I created those terminal using ruby ncurses and it is working too.but problem is to create a button in that terminal for m…

---

## [XmlStruct-1.0.0 released](https://www.ruby-forum.com/t/xmlstruct-1-0-0-released/55673)

<div class="topic-metadata">

**Author:** [@neilw](https://www.ruby-forum.com/u/neilw)\
**Replies:** 5\
**Last updated:** [March 23, 2006, 9:09am UTC](https://www.ruby-forum.com/t/xmlstruct-1-0-0-released/55673 "2006-03-23T09:09:31Z")

</div>

XmlStruct http://rubyforge.org/projects/xmlstruct/ Documentation http://xmlstruct.rubyforge.org/ About XML Markup the simple way. I’ve uploaded a small library to Rubyforge that allows you to markup data using XML…

---

## [Two build issues with 1.8.4](https://www.ruby-forum.com/t/two-build-issues-with-1-8-4/55519)

<div class="topic-metadata">

**Author:** [@sgware](https://www.ruby-forum.com/u/sgware)\
**Replies:** 4\
**Last updated:** [March 23, 2006, 7:15am UTC](https://www.ruby-forum.com/t/two-build-issues-with-1-8-4/55519 "2006-03-23T07:15:05Z")

</div>

In attempting to build a completely static ruby, I’ve discovered a few issues. The setup… I’ve built static versions of readline, zlib, iconv, dbm, and openssl. My intention is to build a completely static ruby, inclu…

---

## [Seeking some of that old-time Smalltalk religion](https://www.ruby-forum.com/t/seeking-some-of-that-old-time-smalltalk-religion/102887)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 6\
**Last updated:** [March 23, 2006, 6:32am UTC](https://www.ruby-forum.com/t/seeking-some-of-that-old-time-smalltalk-religion/102887 "2006-03-23T06:32:41Z")

</div>

I know there are some Smalltalk folks who hang out here, so I’d like to pose perhaps a fairly ignorant question: How far away is irb from a Smalltalk development environment? Put another way, what must need to be don…

---

## [\[ANN\] Houston RoR/Ruby Group](https://www.ruby-forum.com/t/ann-houston-ror-ruby-group/55711)

<div class="topic-metadata">

**Author:** [@klancaster](https://www.ruby-forum.com/u/klancaster)\
**Replies:** 0\
**Last updated:** [March 23, 2006, 4:40am UTC](https://www.ruby-forum.com/t/ann-houston-ror-ruby-group/55711 "2006-03-23T04:40:48Z")

</div>

(x-posted to Rails group) All, The Houston RoR/Ruby Group is getting off the ground at last. We are trying to meet once a month, with the next meeting the first or second week of April. If you are in the Houston ar…

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

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