# Ruby

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

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

---

## [Class object creation and scope](https://www.ruby-forum.com/t/class-object-creation-and-scope/50509)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 1\
**Last updated:** [December 17, 2005, 6:11am UTC](https://www.ruby-forum.com/t/class-object-creation-and-scope/50509 "2005-12-17T06:11:32Z")

</div>

It appears that class objects (created via Class.new) are somewhat unusual. I’m trying to write some code to inject some non-Ruby data into these objects. I’m worried about what happens at GC time, so I need to use D…

---

## [Did the numbers for this list get reset?](https://www.ruby-forum.com/t/did-the-numbers-for-this-list-get-reset/50373)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 9\
**Last updated:** [December 17, 2005, 5:56am UTC](https://www.ruby-forum.com/t/did-the-numbers-for-this-list-get-reset/50373 "2005-12-17T05:56:30Z")

</div>

Hi – I just noticed that my last post to ruby-talk has mail-count number 95. Did something get reset? David – David A. Black removed\_email\_address@domain.invalid “Ruby for Rails”, forthcoming from Manning Publica…

---

## [Assigning a block to a variable in Ruby](https://www.ruby-forum.com/t/assigning-a-block-to-a-variable-in-ruby/66461)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 29\
**Last updated:** [December 17, 2005, 5:05am UTC](https://www.ruby-forum.com/t/assigning-a-block-to-a-variable-in-ruby/66461 "2005-12-17T05:05:24Z")

</div>

I am new to Ruby and curious as to how you emulate the following Javascript snippet (example in Windows, hence the call to Echo) var a = function§ {WScript.Echo§} bar(a); function bar(z) { z(1); WScript.Echo(z); …

---

## [How come I get two e-mails?](https://www.ruby-forum.com/t/how-come-i-get-two-e-mails/53831)

<div class="topic-metadata">

**Author:** [@Francis\_V](https://www.ruby-forum.com/u/Francis_V)\
**Replies:** 10\
**Last updated:** [December 17, 2005, 5:02am UTC](https://www.ruby-forum.com/t/how-come-i-get-two-e-mails/53831 "2005-12-17T05:02:23Z")

</div>

Hi, How come I get two e-mails everytime I post here?

---

## [Correct way to use DRb within a Rails Controller?](https://www.ruby-forum.com/t/correct-way-to-use-drb-within-a-rails-controller/50204)

<div class="topic-metadata">

**Author:** [@d0t1q](https://www.ruby-forum.com/u/d0t1q)\
**Replies:** 2\
**Last updated:** [December 17, 2005, 4:29am UTC](https://www.ruby-forum.com/t/correct-way-to-use-drb-within-a-rails-controller/50204 "2005-12-17T04:29:20Z")

</div>

\[not really rails specific\] I’m unsure about what should be placed where or if it even matters. Here’s the basic rails controller: -------please\_work\_controller.rb---------- class PleaseWork \< ApplicationController …

---

## [ActiveRecord on cygwin with sqlite3](https://www.ruby-forum.com/t/activerecord-on-cygwin-with-sqlite3/70521)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [December 17, 2005, 3:53am UTC](https://www.ruby-forum.com/t/activerecord-on-cygwin-with-sqlite3/70521 "2005-12-17T03:53:17Z")

</div>

I’ve successfully installed sqlite3-ruby on cygwin (can run a simple database fetch), but the activerecord test suite fails. I’m running it as described in the RUNNING\_UNIT\_TESTS doc: $ ~/gems/activerecord-1.13.1 $ …

---

## [Jedit rhtml autocompletion](https://www.ruby-forum.com/t/jedit-rhtml-autocompletion/70518)

<div class="topic-metadata">

**Author:** [@Matias\_S](https://www.ruby-forum.com/u/Matias_S)\
**Replies:** 0\
**Last updated:** [December 17, 2005, 2:41am UTC](https://www.ruby-forum.com/t/jedit-rhtml-autocompletion/70518 "2005-12-17T02:41:07Z")

</div>

Does the jedit ruby plugin have rhtml autocompletion??? (autocompletion of embedded ruby code and html tags…) thanks.

---

## [Debugging intermittent FastCGI failure](https://www.ruby-forum.com/t/debugging-intermittent-fastcgi-failure/50443)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [December 17, 2005, 1:41am UTC](https://www.ruby-forum.com/t/debugging-intermittent-fastcgi-failure/50443 "2005-12-17T01:41:02Z")

</div>

I’ve made a FastCGI application which, on the face of it, works well: it’s fast, responsive, and reasonably light on the processors. However, at seemingly random intervals (usually a few hours apart), it just stops re…

---

## [Library for html generation](https://www.ruby-forum.com/t/library-for-html-generation/50494)

<div class="topic-metadata">

**Author:** [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Replies:** 3\
**Last updated:** [December 17, 2005, 1:29am UTC](https://www.ruby-forum.com/t/library-for-html-generation/50494 "2005-12-17T01:29:01Z")

</div>

Is there a ruby library for generating HTML? I’m looking for something (other than what rails comes with), that’s not tied tightly to any particular web server framework. Basically i just want to be able to call a me…

---

## [Parsing xhtml with libxml](https://www.ruby-forum.com/t/parsing-xhtml-with-libxml/50493)

<div class="topic-metadata">

**Author:** [@hotjuneshen](https://www.ruby-forum.com/u/hotjuneshen)\
**Replies:** 2\
**Last updated:** [December 17, 2005, 1:13am UTC](https://www.ruby-forum.com/t/parsing-xhtml-with-libxml/50493 "2005-12-17T01:13:55Z")

</div>

If you get errors complaining of undefined entities like when parsing xhtml it means you need to install the DTD for xhtml 1.0 or 1.1. Example of a doctype for xhtml 1.1: You want to install the DTDs locally follo…

---

## [Re: Did the numbers for this list get reset?](https://www.ruby-forum.com/t/re-did-the-numbers-for-this-list-get-reset/50495)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [December 17, 2005, 12:40am UTC](https://www.ruby-forum.com/t/re-did-the-numbers-for-this-list-get-reset/50495 "2005-12-17T00:40:50Z")

</div>

So long as this message doesn’t have a Mail-Count of 10101010, we’re OK.

---

## [Challenge - regex which matches nothing](https://www.ruby-forum.com/t/challenge-regex-which-matches-nothing/66888)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 14\
**Last updated:** [December 17, 2005, 12:16am UTC](https://www.ruby-forum.com/t/challenge-regex-which-matches-nothing/66888 "2005-12-17T00:16:12Z")

</div>

this is the best i’ve come up with %r/^(?!.\*)$/m comments? -a

---

## [YAML for Ruby: How to turn off the boolean interpretations?](https://www.ruby-forum.com/t/yaml-for-ruby-how-to-turn-off-the-boolean-interpretations/49903)

<div class="topic-metadata">

**Author:** [@mikshir](https://www.ruby-forum.com/u/mikshir)\
**Replies:** 6\
**Last updated:** [December 17, 2005, 12:10am UTC](https://www.ruby-forum.com/t/yaml-for-ruby-how-to-turn-off-the-boolean-interpretations/49903 "2005-12-17T00:10:02Z")

</div>

I have YAML documents generated in Perl and Python that I process with Ruby. Problem: Ruby wants to auto-interpret boolean flagged words, example: words: yes put it on the off setting gets loaded in Ruby as \[true…

---

## [Using Float For Currency](https://www.ruby-forum.com/t/using-float-for-currency/50102)

<div class="topic-metadata">

**Author:** [@HunterSs\_Lists](https://www.ruby-forum.com/u/HunterSs_Lists)\
**Replies:** 20\
**Last updated:** [December 17, 2005, 12:04am UTC](https://www.ruby-forum.com/t/using-float-for-currency/50102 "2005-12-17T00:04:01Z")

</div>

Howdy, I have some methods that manipulate floats that represent a currency amount. I often end up with more precision than I need, i.e.: $9.756. What is the best way to scale that to 9.76? Cheers.

---

## [Math::PI?](https://www.ruby-forum.com/t/math-pi/70104)

<div class="topic-metadata">

**Author:** [@Daniel\_SchS\_le](https://www.ruby-forum.com/u/Daniel_SchS_le)\
**Replies:** 4\
**Last updated:** [December 16, 2005, 11:51pm UTC](https://www.ruby-forum.com/t/math-pi/70104 "2005-12-16T23:51:57Z")

</div>

Hello, sorry for such a basic question am I missing some module with math constants or are the users … me in this case :slight\_smile: supposed to define them on our own? I know and do now PI = Math.acos(-1) thx Da…

---

## [Ruby + Lotus Domino oh my!](https://www.ruby-forum.com/t/ruby-lotus-domino-oh-my/52878)

<div class="topic-metadata">

**Author:** [@kevin.jackson](https://www.ruby-forum.com/u/kevin.jackson)\
**Replies:** 4\
**Last updated:** [December 16, 2005, 11:39pm UTC](https://www.ruby-forum.com/t/ruby-lotus-domino-oh-my/52878 "2005-12-16T23:39:53Z")

</div>

Hi, Does anyone have any experience interfacing ruby to Notes/Domino? I only need to do a data extract, and I absolutely do not want to have to code up C/Java just to suck the data out of a Notes database. I could (…

---

## [Convert seconds to hours:minutes:seconds](https://www.ruby-forum.com/t/convert-seconds-to-hoursseconds/50222)

<div class="topic-metadata">

**Author:** [@SSp](https://www.ruby-forum.com/u/SSp)\
**Replies:** 9\
**Last updated:** [December 16, 2005, 11:00pm UTC](https://www.ruby-forum.com/t/convert-seconds-to-hoursseconds/50222 "2005-12-16T23:00:36Z")

</div>

hello! i am trying to convert a number of seconds to a nicely formatted string like this: 7683 seconds = 02:08:03 is there an easy way to accomplish this?

---

## [Rails with Lighttpd or Apache](https://www.ruby-forum.com/t/rails-with-lighttpd-or-apache/50455)

<div class="topic-metadata">

**Author:** [@rawn027](https://www.ruby-forum.com/u/rawn027)\
**Replies:** 1\
**Last updated:** [December 16, 2005, 10:00pm UTC](https://www.ruby-forum.com/t/rails-with-lighttpd-or-apache/50455 "2005-12-16T22:00:23Z")

</div>

I am doing a clean install of FreeBSD and was wondering the best webserver to use rails with. This will be strictly a remote deployment and devlopment box. I am also thinking about install gentoo or another linux dist…

---

## [Scoped\_require 0.0](https://www.ruby-forum.com/t/scoped-require-0-0/50432)

<div class="topic-metadata">

**Author:** [@twifkak](https://www.ruby-forum.com/u/twifkak)\
**Replies:** 3\
**Last updated:** [December 16, 2005, 9:57pm UTC](https://www.ruby-forum.com/t/scoped-require-0-0/50432 "2005-12-16T21:57:02Z")

</div>

… and from the substratum, it arises … One-liner: scoped\_require provides an optional parameter to Kernel#require to allow you to shove the created modules/classes into some sandboxy container module. I use it to prev…

---

## [Re: RRobots (#59)](https://www.ruby-forum.com/t/re-rrobots-59/50463)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 4\
**Last updated:** [December 16, 2005, 8:37pm UTC](https://www.ruby-forum.com/t/re-rrobots-59/50463 "2005-12-16T20:37:41Z")

</div>

From: Paul N. \[mailto:removed\_email\_address@domain.invalid\] Are team entries permitted/forbidden? The tournament will be 1on1 only. If your robot has the ability to act well in a team that’s fine, but will not help…

---

## [RSpec - should\_raise method?](https://www.ruby-forum.com/t/rspec-should-raise-method/50479)

<div class="topic-metadata">

**Author:** [@bct](https://www.ruby-forum.com/u/bct)\
**Replies:** 0\
**Last updated:** [December 16, 2005, 8:28pm UTC](https://www.ruby-forum.com/t/rspec-should-raise-method/50479 "2005-12-16T20:28:36Z")

</div>

Hello, Does RSpec provide a way to check if an exception gets raised? I would expect a method named should\_raise, but I cant find it. Something like the following should work in the specs, but a method should be add…

---

## [Re: Question of reference and (sub)strings](https://www.ruby-forum.com/t/re-question-of-reference-and-sub-strings/50319)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 10\
**Last updated:** [December 16, 2005, 7:49pm UTC](https://www.ruby-forum.com/t/re-question-of-reference-and-sub-strings/50319 "2005-12-16T19:49:26Z")

</div>

Given that I only want to compute the offsets once, an obvious solution would be to construct an Array of String - each element representing a sub-string of the original… but this would double memory use. What wou…

---

## [Smarter creation of redunant methods](https://www.ruby-forum.com/t/smarter-creation-of-redunant-methods/50462)

<div class="topic-metadata">

**Author:** [@Caleb\_T](https://www.ruby-forum.com/u/Caleb_T)\
**Replies:** 5\
**Last updated:** [December 16, 2005, 6:06pm UTC](https://www.ruby-forum.com/t/smarter-creation-of-redunant-methods/50462 "2005-12-16T18:06:48Z")

</div>

I have some methods in a class that look like this: def h\_coil(chan) raise NoDataError if @h\_coils\[chan\].nil? @h\_coils\[chan\] end def i\_coil(chan) raise NoDataError if @i\_coils\[chan\].nil? @i\_coils\[chan\] end and s…

---

## [Is ruby dbi still in development?](https://www.ruby-forum.com/t/is-ruby-dbi-still-in-development/50318)

<div class="topic-metadata">

**Author:** [@cap](https://www.ruby-forum.com/u/cap)\
**Replies:** 7\
**Last updated:** [December 16, 2005, 5:45pm UTC](https://www.ruby-forum.com/t/is-ruby-dbi-still-in-development/50318 "2005-12-16T17:45:39Z")

</div>

The lastest version of ruby’s dbi is build at 2003-09-07, 2 years ago And the las version of the perl 's is build at 2005-11-29… So when can we a newer version of ruby’s dbi ? The 0.0.21 is out of date and lack of ma…

---

## [Ldap install problem](https://www.ruby-forum.com/t/ldap-install-problem/49597)

<div class="topic-metadata">

**Author:** [@szot.shaun](https://www.ruby-forum.com/u/szot.shaun)\
**Replies:** 2\
**Last updated:** [December 16, 2005, 5:18pm UTC](https://www.ruby-forum.com/t/ldap-install-problem/49597 "2005-12-16T17:18:27Z")

</div>

Trying to install ruby-ldap on solaris x86 I keep recieving an error that I’m not sure how to resolve. Does anyone know what could be wrong or have any suggestions as to what I might try? ruby extconf.rb --with-openld…

---

## [RubyGems and bin/](https://www.ruby-forum.com/t/rubygems-and-bin/50454)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 2\
**Last updated:** [December 16, 2005, 4:54pm UTC](https://www.ruby-forum.com/t/rubygems-and-bin/50454 "2005-12-16T16:54:17Z")

</div>

I’ll readily admit that I haven’t looked into this much yet. I thought I would ask here first and get the 10,000 foot view and pointers for where to dig further. I’m interested in RubyGems multiple versions feature. …

---

## [Re: RRobots (#59)](https://www.ruby-forum.com/t/re-rrobots-59/69935)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 0\
**Last updated:** [December 16, 2005, 4:51pm UTC](https://www.ruby-forum.com/t/re-rrobots-59/69935 "2005-12-16T16:51:15Z")

</div>

\[…\] Is there a limit on the amount of time the tick() method may take? I can think of lots of interesting stuff I may want to try that could be quite expensive computationally. Great quiz! Basically no, I woul…

---

## [Re: Rails with Lighttpd or Apache](https://www.ruby-forum.com/t/re-rails-with-lighttpd-or-apache/50460)

<div class="topic-metadata">

**Author:** [@sgware](https://www.ruby-forum.com/u/sgware)\
**Replies:** 0\
**Last updated:** [December 16, 2005, 4:24pm UTC](https://www.ruby-forum.com/t/re-rails-with-lighttpd-or-apache/50460 "2005-12-16T16:24:05Z")

</div>

Hi Rawn027, Thanks for your message about Ruby on Rails. I think you’ll find that you’re likely to get a quicker and more accurate response to your message on the Ruby on Rails specific mailing list. For subscriptio…

---

## [Ruby GUI recommendations?](https://www.ruby-forum.com/t/ruby-gui-recommendations/50028)

<div class="topic-metadata">

**Author:** [@christer](https://www.ruby-forum.com/u/christer)\
**Replies:** 10\
**Last updated:** [December 16, 2005, 2:26pm UTC](https://www.ruby-forum.com/t/ruby-gui-recommendations/50028 "2005-12-16T14:26:25Z")

</div>

Which GUI lib is the best and which is the most widely used ? (Necessarily not the same :slight\_smile: ) I’m using Win XP. I’ve tried wxRuby so far, but would like to get some overview what’s available before decidin…

---

## [Hey Rubyistas!](https://www.ruby-forum.com/t/hey-rubyistas/68456)

<div class="topic-metadata">

**Author:** [@baalbek](https://www.ruby-forum.com/u/baalbek)\
**Replies:** 1\
**Last updated:** [December 16, 2005, 2:02pm UTC](https://www.ruby-forum.com/t/hey-rubyistas/68456 "2005-12-16T14:02:22Z")

</div>

Hey all Ruby folks! You recieve a lot of praise in the talk backs in this article at: http://www.businessweek.com/technology/content/dec2005/tc20051213\_042973.htm Just due to this article, I’m sincerely curious about …

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

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