# Ruby

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

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

---

## [Help with complicated problems](https://www.ruby-forum.com/t/help-with-complicated-problems/100932)

<div class="topic-metadata">

**Author:** [@lynxinator](https://www.ruby-forum.com/u/lynxinator)\
**Replies:** 7\
**Last updated:** [August 3, 2006, 2:23pm UTC](https://www.ruby-forum.com/t/help-with-complicated-problems/100932 "2006-08-03T14:23:18Z")

</div>

Hi all, I’ve been working about entirely in Ruby for the last 18 months on my open source automation project, Puppet\[1\]; I live, eat, and breathe this project and thus ruby. However, I find that I basically never rea…

---

## [Data Structure for n-dimension values with defaults](https://www.ruby-forum.com/t/data-structure-for-n-dimension-values-with-defaults/87371)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 11\
**Last updated:** [August 3, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/data-structure-for-n-dimension-values-with-defaults/87371 "2006-08-03T14:22:33Z")

</div>

Help! I can’t figure out how to store a rather particular set of data. An object in my system has properties. Each property has a value. However, the value of each property can change based on a number of “build axes”…

---

## [Possible Ruby-centric NASA SBIR area](https://www.ruby-forum.com/t/possible-ruby-centric-nasa-sbir-area/68616)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 19\
**Last updated:** [August 3, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/possible-ruby-centric-nasa-sbir-area/68616 "2006-08-03T14:22:21Z")

</div>

I’ve been asked to write a small topic area for our SBIR (small business innovation research) program, which is basically a method to fun small businesses in $70k, $500k, and $2-3M chunks for promising research topic…

---

## [Current Temperature (#68)](https://www.ruby-forum.com/t/current-temperature-68/73433)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [August 3, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/current-temperature-68/73433 "2006-08-03T14:22:18Z")

</div>

Author: Shane E. Allows retrieval of current temperature information. Pretty simple and straight forward. Uses match to extract data from the xml document that is returned. Sorry about the long lines, but I like pu…

---

## [Rubynuby - client side Ruby?](https://www.ruby-forum.com/t/rubynuby-client-side-ruby/71728)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 18\
**Last updated:** [August 3, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/rubynuby-client-side-ruby/71728 "2006-08-03T14:22:17Z")

</div>

I would like to be able to do client-side scripting things that in the past have been done with javascript embedded in html pages…with Ruby instead of javascript. With so many different projects going on in Ruby these…

---

## [Win32 taskscheduler setup](https://www.ruby-forum.com/t/win32-taskscheduler-setup/56091)

<div class="topic-metadata">

**Author:** [@rtilley](https://www.ruby-forum.com/u/rtilley)\
**Replies:** 2\
**Last updated:** [August 3, 2006, 2:21pm UTC](https://www.ruby-forum.com/t/win32-taskscheduler-setup/56091 "2006-08-03T14:21:58Z")

</div>

Is there a way to specify multiple schedules when setting up a task? I’d like to do something such as this: “trigger\_type” =\> TaskScheduler::ON\_IDLE & AT\_LOGON Also, I just heard that a Ruby Win32 is underway. That’s …

---

## [Small regexp question](https://www.ruby-forum.com/t/small-regexp-question/79434)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [August 3, 2006, 2:21pm UTC](https://www.ruby-forum.com/t/small-regexp-question/79434 "2006-08-03T14:21:56Z")

</div>

Hi all, I am writing some refactoring code for a C++ project. I need to change: class MyClass { ... } to: class IMP\_EXP MyClass { ... } The pattern I used to find a class definition line is: line =~ /^\\s\*cl…

---

## [How to print stuff in RTHML embedded code (equiv to php "ech](https://www.ruby-forum.com/t/how-to-print-stuff-in-rthml-embedded-code-equiv-to-php-ech/77619)

<div class="topic-metadata">

**Author:** [@Namor](https://www.ruby-forum.com/u/Namor)\
**Replies:** 7\
**Last updated:** [August 3, 2006, 2:21pm UTC](https://www.ruby-forum.com/t/how-to-print-stuff-in-rthml-embedded-code-equiv-to-php-ech/77619 "2006-08-03T14:21:54Z")

</div>

Hi I got a very noob question which i cant understand why i cant do things like this… eg… inside. helloworld.rhtml \<% puts "hello" puts "world" puts "something something" %\> I know …

---

## [\[ANN\] Composite Primary Keys support for Associations](https://www.ruby-forum.com/t/ann-composite-primary-keys-support-for-associations/100988)

<div class="topic-metadata">

**Author:** [@nicwilliams](https://www.ruby-forum.com/u/nicwilliams)\
**Replies:** 2\
**Last updated:** [August 3, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/ann-composite-primary-keys-support-for-associations/100988 "2006-08-03T14:11:08Z")

</div>

\[Cross-post from Ruby on Rails list\] Announcement: Composite Primary Keys gem now includes support for ActiveRecord Associations. Summary: Composite Primary Keys allows an ActiveRecord to support 2+ primary keys us…

---

## [Ruby Consulting work @ Where2GetIt.com](https://www.ruby-forum.com/t/ruby-consulting-work-where2getit-com/75021)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [August 3, 2006, 1:46pm UTC](https://www.ruby-forum.com/t/ruby-consulting-work-where2getit-com/75021 "2006-08-03T13:46:44Z")

</div>

If you do Ruby programming and would like to take on a consulting job to complete a project in the next 5 weeks, please give me a shout at removed\_email\_address@domain.invalid. This project entails adding additional f…

---

## [Setting $? manually - possible?](https://www.ruby-forum.com/t/setting-manually-possible/59482)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [August 3, 2006, 1:33pm UTC](https://www.ruby-forum.com/t/setting-manually-possible/59482 "2006-08-03T13:33:49Z")

</div>

Hi all, Ruby 1.8.4 I’m working on a custom Process.waitpid method (for Windows). It works fine, except that I want to be able to set the Process::Status ($?) manually within the method. Specifically, the exitstatus…

---

## [Can a ruby script perform a chdir on win xp?](https://www.ruby-forum.com/t/can-a-ruby-script-perform-a-chdir-on-win-xp/59483)

<div class="topic-metadata">

**Author:** [@agorilla](https://www.ruby-forum.com/u/agorilla)\
**Replies:** 22\
**Last updated:** [August 3, 2006, 1:32pm UTC](https://www.ruby-forum.com/t/can-a-ruby-script-perform-a-chdir-on-win-xp/59483 "2006-08-03T13:32:49Z")

</div>

I want to run a ruby script, and end up in a different directory. Possible? All of the obvious approaches (%x, \`\`, system()) can change directories, but only for their own process, once the script ends, you’re right …

---

## [Tk::Iwidgets::Scrolledhtml render problem](https://www.ruby-forum.com/t/tk-scrolledhtml-render-problem/59514)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [August 3, 2006, 1:30pm UTC](https://www.ruby-forum.com/t/tk-scrolledhtml-render-problem/59514 "2006-08-03T13:30:13Z")

</div>

I want a frame to pop up with this in it. $tbodytext is my var of html code. I did check the var before and after the render call, and it is correct (i know i should not use globa vars but its my first TK program and …

---

## [Extension module: Why does object get GCed?](https://www.ruby-forum.com/t/extension-module-why-does-object-get-gced/80305)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 7\
**Last updated:** [August 3, 2006, 1:27pm UTC](https://www.ruby-forum.com/t/extension-module-why-does-object-get-gced/80305 "2006-08-03T13:27:43Z")

</div>

I try to write an exentension module with containing the following method: It wraps a c++ and binds it to ruby global variable. void BindToRubyVariable(someObject\* native, char\* variableName) { VALUE klass = get\_ruby…

---

## [Parsing with delimeters ---new programmer](https://www.ruby-forum.com/t/parsing-with-delimeters-new-programmer/101021)

<div class="topic-metadata">

**Author:** [@ricardo](https://www.ruby-forum.com/u/ricardo)\
**Replies:** 7\
**Last updated:** [August 3, 2006, 1:21pm UTC](https://www.ruby-forum.com/t/parsing-with-delimeters-new-programmer/101021 "2006-08-03T13:21:16Z")

</div>

I’m trying to parse a file that looks like this: text… text… numbers… blalba bla and then somewhere in the file i have a table like this: IDS\_SOMETHIGN\_SOMETHING “giving you cookies in a sec” IDX\_SOMETHING\_SOMETH…

---

## [Errno::ENXIO (Device not configured) when using net/https fr](https://www.ruby-forum.com/t/errno-enxio-device-not-configured-when-using-net-https-fr/101137)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 1\
**Last updated:** [August 3, 2006, 1:14pm UTC](https://www.ruby-forum.com/t/errno-enxio-device-not-configured-when-using-net-https-fr/101137 "2006-08-03T13:14:39Z")

</div>

I have the following code that creates a https connection from within a rails controller. Works fine except that if it doesn’t get called for a few hours it starts throwing an exception until I restart rails (apache1…

---

## [Building plruby on Windows](https://www.ruby-forum.com/t/building-plruby-on-windows/101131)

<div class="topic-metadata">

**Author:** [@tma](https://www.ruby-forum.com/u/tma)\
**Replies:** 0\
**Last updated:** [August 3, 2006, 1:09pm UTC](https://www.ruby-forum.com/t/building-plruby-on-windows/101131 "2006-08-03T13:09:31Z")

</div>

Hello - Has anyone successfully implemented plruby on the Windows version of PostgreSQL? We have versions of our database on both Linux and Windows. Building and installing plruby on Linux was a piece of cake and wo…

---

## [Ruby 1.8.4 & MemCached 0.0.4](https://www.ruby-forum.com/t/ruby-1-8-4-memcached-0-0-4/101129)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [August 3, 2006, 1:08pm UTC](https://www.ruby-forum.com/t/ruby-1-8-4-memcached-0-0-4/101129 "2006-08-03T13:08:27Z")

</div>

I recently upgraded my Ruby from 1.8.2 to 1.8.4. I also installed MemCached 0.0.1 using ‘gem install’. When I try to upgrade the gem to 0.0.4 provided by Trac, (dev(E)iate) it gives me some weird errors. This did not…

---

## [Upgrade Problems on 1.8.4](https://www.ruby-forum.com/t/upgrade-problems-on-1-8-4/101078)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [August 3, 2006, 1:07pm UTC](https://www.ruby-forum.com/t/upgrade-problems-on-1-8-4/101078 "2006-08-03T13:07:05Z")

</div>

I just upgraded my ruby installation from 1.8.2-15 to 1.8.4-20. Now when trying to run my application in Webrick, the login page croaks with a syntax error I cant figure out! It used to work fine with 1.8.2-15! Here i…

---

## [SanDiego.rb Meeting Tomorrow, August 3rd](https://www.ruby-forum.com/t/sandiego-rb-meeting-tomorrow-august-3rd/101126)

<div class="topic-metadata">

**Author:** [@kdclark](https://www.ruby-forum.com/u/kdclark)\
**Replies:** 0\
**Last updated:** [August 3, 2006, 1:06pm UTC](https://www.ruby-forum.com/t/sandiego-rb-meeting-tomorrow-august-3rd/101126 "2006-08-03T13:06:05Z")

</div>

If you’re in the San Diego area we’d enjoy having you at the next sd.rb meeting tomorrow (August 3rd) at UCSD in the CSE Building, room 1202. We try to start at 7:30 though we usually start a few minutes late waiting …

---

## [Irb: Segmentation fault](https://www.ruby-forum.com/t/irb-segmentation-fault/101114)

<div class="topic-metadata">

**Author:** [@elgato](https://www.ruby-forum.com/u/elgato)\
**Replies:** 1\
**Last updated:** [August 3, 2006, 1:04pm UTC](https://www.ruby-forum.com/t/irb-segmentation-fault/101114 "2006-08-03T13:04:44Z")

</div>

Hello folks, in the following two cases irb fails (I’ve removed spaces from the =~/^irb/ lines to prevent line breaks): $ irb irb(main):001:0\>“ahoj”.split(//).join(’|’) =\> “a|h|o|j” irb(main):002:0\>“ahoj”.split(/(?\<…

---

## [I thought this was the one that worked?](https://www.ruby-forum.com/t/i-thought-this-was-the-one-that-worked/100741)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 138\
**Last updated:** [August 3, 2006, 1:01pm UTC](https://www.ruby-forum.com/t/i-thought-this-was-the-one-that-worked/100741 "2006-08-03T13:01:33Z")

</div>

\#!/usr/bin/env ruby repeat = 1 def run number\_of\_times = repeat number\_of\_times.downto(0) do puts number\_of\_times sleep 1 end end run Fails: undefined variable, “repeat” in first line of run method I would hav…

---

## [.irbrc Goodies](https://www.ruby-forum.com/t/irbrc-goodies/101112)

<div class="topic-metadata">

**Author:** [@Aleks\_Kissinger](https://www.ruby-forum.com/u/Aleks_Kissinger)\
**Replies:** 0\
**Last updated:** [August 3, 2006, 12:58pm UTC](https://www.ruby-forum.com/t/irbrc-goodies/101112 "2006-08-03T12:58:04Z")

</div>

I was wondering, what are some of your favourite .irbrc tricks? For example, the one I end up using the most is the mlike mixin, which I found in the comments on a Redhanded article: http://redhanded.hobix.com/inspec…

---

## [Nabaztag 0.2.0 The Curse of the Web-Rabbit](https://www.ruby-forum.com/t/nabaztag-0-2-0-the-curse-of-the-web-rabbit/101103)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 3\
**Last updated:** [August 3, 2006, 12:54pm UTC](https://www.ruby-forum.com/t/nabaztag-0-2-0-the-curse-of-the-web-rabbit/101103 "2006-08-03T12:54:45Z")

</div>

Good news, everybody! Version 0.2.0 of the indispensible Nabaztag library has been released. Now your cybernetic rabbit can speak either French or English, regardless of his or her settings. Not sure what a Nabaztag …

---

## [R: Ruby Cookbook](https://www.ruby-forum.com/t/r-ruby-cookbook/101082)

<div class="topic-metadata">

**Author:** [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Replies:** 2\
**Last updated:** [August 3, 2006, 12:53pm UTC](https://www.ruby-forum.com/t/r-ruby-cookbook/101082 "2006-08-03T12:53:06Z")

</div>

A must-buy. Le informazioni trasmesse attraverso la presente e-mail ed i suoi allegati sono diretti esclusivamente al destinatario e devono ritenersi riservati con divieto di diffusione e di uso. La diffusione e la c…

---

## [Using Win32OLE library for DAO](https://www.ruby-forum.com/t/using-win32ole-library-for-dao/100853)

<div class="topic-metadata">

**Author:** [@Jatinder\_S](https://www.ruby-forum.com/u/Jatinder_S)\
**Replies:** 5\
**Last updated:** [August 3, 2006, 12:52pm UTC](https://www.ruby-forum.com/t/using-win32ole-library-for-dao/100853 "2006-08-03T12:52:34Z")

</div>

I am trying to do something like following to connect to a MS Access db from ruby db = WIN32OLE.new(“DAO.Database”) but it gives me an error “accessQuery.rb:17:in initialize': unknown OLE server:DAO.Database’ (WIN32…

---

## [Golfing Eratosthenes](https://www.ruby-forum.com/t/golfing-eratosthenes/101063)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 20\
**Last updated:** [August 3, 2006, 12:52pm UTC](https://www.ruby-forum.com/t/golfing-eratosthenes/101063 "2006-08-03T12:52:00Z")

</div>

Hi all, I’ve been golfing around with the sieve of Eratosthenes. Here’s what I’ve got so far: a=(2…100).to\_a;p a.each{|c|a.map!{|d|c&&d&&c\<d&&d%c==0?nil:d}}.compact It’s already under 80 chars, but I’d still love to…

---

## [Proxy Authentication](https://www.ruby-forum.com/t/proxy-authentication/100855)

<div class="topic-metadata">

**Author:** [@nayak](https://www.ruby-forum.com/u/nayak)\
**Replies:** 4\
**Last updated:** [August 3, 2006, 12:45pm UTC](https://www.ruby-forum.com/t/proxy-authentication/100855 "2006-08-03T12:45:36Z")

</div>

Hi I’m behind an authenticated proxy and want to install few plugins (for rails and radrails) for which I tried using NTLM proxy Authenticator but could not succeed I also tried http://blog.pomozov.info/posts/the-…

---

## [Super-newbee Ruby regex help?](https://www.ruby-forum.com/t/super-newbee-ruby-regex-help/100916)

<div class="topic-metadata">

**Author:** [@lazer\_rash](https://www.ruby-forum.com/u/lazer_rash)\
**Replies:** 5\
**Last updated:** [August 3, 2006, 12:45pm UTC](https://www.ruby-forum.com/t/super-newbee-ruby-regex-help/100916 "2006-08-03T12:45:06Z")

</div>

This is pretty complex considering that I am just now reading “Learn to Program” by Chris P. (it is a book teaching you how to program in Ruby). It is very basic. I am somewhat good with PHP but and wanting to move …

---

## [Re: A left-exclusive Range class](https://www.ruby-forum.com/t/re-a-left-exclusive-range-class/101101)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [August 3, 2006, 12:44pm UTC](https://www.ruby-forum.com/t/re-a-left-exclusive-range-class/101101 "2006-08-03T12:44:46Z")

</div>

Cyrus, I see what you mean. As a quick fix, one might just convert the range (a…b) to an array: c=(a…b).to\_a and chop off the first element, and create a Range from the result. This may not be as concise as the … no…

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

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