# Ruby

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

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

---

## [Ptools gem problem](https://www.ruby-forum.com/t/ptools-gem-problem/87146)

<div class="topic-metadata">

**Author:** [@bitsmith](https://www.ruby-forum.com/u/bitsmith)\
**Replies:** 3\
**Last updated:** [February 28, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/ptools-gem-problem/87146 "2007-02-28T20:50:55Z")

</div>

i tried ptools gem and after install win-file-stat and win-pr i get this error in irb… require ‘ptools’ untimeError: GetProcAddress: GetVolumePathNamesForVolumeName or GetVolumePathNa esForVolumeNameA from c:…

---

## [RSpec-0.8.0](https://www.ruby-forum.com/t/rspec-0-8-0/87198)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [February 28, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/rspec-0-8-0/87198 "2007-02-28T20:31:53Z")

</div>

The RSpec Development Team is pleased to announce the release of RSpec-0.8.0. This release introduces a new approach to handling expectations using Expression Matchers. It also improves the spec command line by addin…

---

## [Ruby datetime to mysql](https://www.ruby-forum.com/t/ruby-datetime-to-mysql/87148)

<div class="topic-metadata">

**Author:** [@peter](https://www.ruby-forum.com/u/peter)\
**Replies:** 7\
**Last updated:** [February 28, 2007, 8:00pm UTC](https://www.ruby-forum.com/t/ruby-datetime-to-mysql/87148 "2007-02-28T20:00:47Z")

</div>

I’m missing the boat on datetime. I’m trying to convert Ruby datetime to be compatible with mysql. I’m not getting any errors but the results always end up 0000-00-00-0000 I think it may have to do with the mysql req…

---

## [Ruby-postgres for Ruby 1.9](https://www.ruby-forum.com/t/ruby-postgres-for-ruby-1-9/87137)

<div class="topic-metadata">

**Author:** [@Chris\_Long](https://www.ruby-forum.com/u/Chris_Long)\
**Replies:** 1\
**Last updated:** [February 28, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/ruby-postgres-for-ruby-1-9/87137 "2007-02-28T19:16:42Z")

</div>

It looks like ruby-postgres needs some patching due to the changes in rubyio.h. I believe these two changes take care of the problem: /\* PQtrace(get\_pgconn(obj), fp-\>f2?fp-\>f2:fp-\>f); \*/ PQtrace(get\_pgconn(obj), fp…

---

## [DBI Timeout](https://www.ruby-forum.com/t/dbi-timeout/87155)

<div class="topic-metadata">

**Author:** [@gregarican](https://www.ruby-forum.com/u/gregarican)\
**Replies:** 4\
**Last updated:** [February 28, 2007, 7:12pm UTC](https://www.ruby-forum.com/t/dbi-timeout/87155 "2007-02-28T19:12:41Z")

</div>

I am currently trying to retrieve a rather large recordset from a remote MS SQL Server. The recordset is retrieved using Ruby DBI. The recordset is roughly 120,000 rows. The Ruby script bombs out with an SQL timeout e…

---

## [Q: variable "declarations"](https://www.ruby-forum.com/t/q-variable-declarations/55141)

<div class="topic-metadata">

**Author:** [@Ilja\_Tabachnik](https://www.ruby-forum.com/u/Ilja_Tabachnik)\
**Replies:** 4\
**Last updated:** [February 28, 2007, 6:50pm UTC](https://www.ruby-forum.com/t/q-variable-declarations/55141 "2007-02-28T18:50:35Z")

</div>

Hi All ! I’m new to Ruby so my question could look a bit… hmmm… stupied. However I do did a search in comp.lang.ruby archieves and found a lot of questions similar to the my one - but no definite answer. Reading Prog…

---

## [Re: Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/re-fwd-please-forward-ruby-quiz-submission/87160)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 0\
**Last updated:** [February 28, 2007, 5:07pm UTC](https://www.ruby-forum.com/t/re-fwd-please-forward-ruby-quiz-submission/87160 "2007-02-28T17:07:05Z")

</div>

Petr, we should hang out. :slight\_smile: Our solutions are pretty similar! One thing I learned is quoted-printable is already supported (via “unpack”). I didn’t catch that. Brian ----- Original Message ---- From:…

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/87152)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [February 28, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/87152 "2007-02-28T16:06:53Z")

</div>

Begin forwarded message:

---

## [Documentation on embedding ruby](https://www.ruby-forum.com/t/documentation-on-embedding-ruby/83418)

<div class="topic-metadata">

**Author:** [@Shea\_M](https://www.ruby-forum.com/u/Shea_M)\
**Replies:** 4\
**Last updated:** [February 28, 2007, 2:54pm UTC](https://www.ruby-forum.com/t/documentation-on-embedding-ruby/83418 "2007-02-28T14:54:58Z")

</div>

Is there any sort of documentation on embedding ruby? So far the best I have found has been the chapter in the pragmatic book, which is anything but a complete reference… ~S

---

## [How can I monitor a Regexp?](https://www.ruby-forum.com/t/how-can-i-monitor-a-regexp/87102)

<div class="topic-metadata">

**Author:** [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Replies:** 4\
**Last updated:** [February 28, 2007, 2:17pm UTC](https://www.ruby-forum.com/t/how-can-i-monitor-a-regexp/87102 "2007-02-28T14:17:22Z")

</div>

Because a regular expression can have different behaviors depending on its kcode (e.g. behavior of \\w) I decided that all my code should specify the kcode explicitly (e.g. /\\w+/n instead /\\w+/). So I tried to set up …

---

## [Win32::changenotify and multiple events](https://www.ruby-forum.com/t/win32-changenotify-and-multiple-events/87136)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 0\
**Last updated:** [February 28, 2007, 1:09pm UTC](https://www.ruby-forum.com/t/win32-changenotify-and-multiple-events/87136 "2007-02-28T13:09:06Z")

</div>

Could someone give me a minimal example of win32::changenotify code that will raise multiple events for, e.g. mkdir -p a/b/c or mv foo/bar baz? The following only catches one event, for instance: require “win32/change…

---

## [Stuck on simple problem!](https://www.ruby-forum.com/t/stuck-on-simple-problem/87117)

<div class="topic-metadata">

**Author:** [@chrisfinne](https://www.ruby-forum.com/u/chrisfinne)\
**Replies:** 4\
**Last updated:** [February 28, 2007, 11:20am UTC](https://www.ruby-forum.com/t/stuck-on-simple-problem/87117 "2007-02-28T11:20:55Z")

</div>

Can anyone please tell me how to resolve this error? I just want to use ptools but can’t?? Why doesn’t require ‘ptools’ work? gem install ptools Attempting local installation of ‘ptools’ Local gem file not found: …

---

## [Class method declarations help](https://www.ruby-forum.com/t/class-method-declarations-help/86764)

<div class="topic-metadata">

**Author:** [@eckie](https://www.ruby-forum.com/u/eckie)\
**Replies:** 6\
**Last updated:** [February 28, 2007, 10:35am UTC](https://www.ruby-forum.com/t/class-method-declarations-help/86764 "2007-02-28T10:35:45Z")

</div>

Hope everyone is having a great weekend! I was looking over some code concerning class method declarations as shown below: #2 class Animal attr\_accessor :species, :form def self.create\_from\_hash(hash) a = new a.s…

---

## [Test::Unit and one-time setup and teardown](https://www.ruby-forum.com/t/test-unit-and-one-time-setup-and-teardown/87058)

<div class="topic-metadata">

**Author:** [@ara-vartanian](https://www.ruby-forum.com/u/ara-vartanian)\
**Replies:** 4\
**Last updated:** [February 28, 2007, 9:25am UTC](https://www.ruby-forum.com/t/test-unit-and-one-time-setup-and-teardown/87058 "2007-02-28T09:25:39Z")

</div>

Does anyone know of a way of performing one-time setup and teardown per Test::Unit::TestCase? I have an integration test with an external component where, unfortunately, mocking out a server response is not feasible. …

---

## [Using mini\_magick](https://www.ruby-forum.com/t/using-mini-magick/87098)

<div class="topic-metadata">

**Author:** [@jonathan](https://www.ruby-forum.com/u/jonathan)\
**Replies:** 5\
**Last updated:** [February 28, 2007, 9:10am UTC](https://www.ruby-forum.com/t/using-mini-magick/87098 "2007-02-28T09:10:37Z")

</div>

thanks for all the help… I’m making progress… I installed rubygems, and used that to install mini\_magick. I tried using require “mini\_magick” but it returned ruby.rb:1:in \`require’: No such file to load – mini\_magi…

---

## [Webrick fails with large files](https://www.ruby-forum.com/t/webrick-fails-with-large-files/87063)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 5\
**Last updated:** [February 28, 2007, 4:54am UTC](https://www.ruby-forum.com/t/webrick-fails-with-large-files/87063 "2007-02-28T04:54:17Z")

</div>

So…apparently webrick does the following for serving pages: loads the page into a string object then sends that string to the requestor. Unfortunately this means that if it is a very large file being served that that…

---

## [Komodo is the IDE for Ruby and Ruby on Rails!](https://www.ruby-forum.com/t/komodo-is-the-ide-for-ruby-and-ruby-on-rails/86373)

<div class="topic-metadata">

**Author:** [@zoat](https://www.ruby-forum.com/u/zoat)\
**Replies:** 27\
**Last updated:** [February 28, 2007, 4:52am UTC](https://www.ruby-forum.com/t/komodo-is-the-ide-for-ruby-and-ruby-on-rails/86373 "2007-02-28T04:52:16Z")

</div>

The new Komodo IDE 4.0 is the first unified workspace for end-to-end development of dynamic web applications. A rich feature set for client- side Ajax languages such as CSS, HTML, JavaScript and XML, coupled with adva…

---

## [Is there something method in ruby like python's reduce()?](https://www.ruby-forum.com/t/is-there-something-method-in-ruby-like-pythons-reduce/87094)

<div class="topic-metadata">

**Author:** [@lnes](https://www.ruby-forum.com/u/lnes)\
**Replies:** 3\
**Last updated:** [February 28, 2007, 3:22am UTC](https://www.ruby-forum.com/t/is-there-something-method-in-ruby-like-pythons-reduce/87094 "2007-02-28T03:22:07Z")

</div>

there is python’s build-in function reduce()'s definition ===================================================================== reduce( function, sequence\[, initializer\]) Apply function of two arguments cumulativel…

---

## [RubyGems for Ruby 1.9](https://www.ruby-forum.com/t/rubygems-for-ruby-1-9/87000)

<div class="topic-metadata">

**Author:** [@threeeyedfish](https://www.ruby-forum.com/u/threeeyedfish)\
**Replies:** 1\
**Last updated:** [February 28, 2007, 12:29am UTC](https://www.ruby-forum.com/t/rubygems-for-ruby-1-9/87000 "2007-02-28T00:29:53Z")

</div>

Good day all! I have problems installing and running RubyGems with Ruby 1.9. Most of all they arise because of File.exists? method was changed to File.exist?, but there may be other inconsistencies as well. Has anyon…

---

## [RubyGems New gem() Method](https://www.ruby-forum.com/t/rubygems-new-gem-method/87071)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 2\
**Last updated:** [February 28, 2007, 12:21am UTC](https://www.ruby-forum.com/t/rubygems-new-gem-method/87071 "2007-02-28T00:21:52Z")

</div>

Am I understanding right that the new gem() does not actually perform the require? It just sets up version handling, right? Does this work for something like the soap4r gem? You can’t require that gem normally, beca…

---

## [Rake Namespaces](https://www.ruby-forum.com/t/rake-namespaces/87070)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 2\
**Last updated:** [February 28, 2007, 12:05am UTC](https://www.ruby-forum.com/t/rake-namespaces/87070 "2007-02-28T00:05:50Z")

</div>

Assuming the Rakefile: namespace :abc do task :foo do # … end end namespace :def do task :bar =\> ??? do # … end end Is there a way for me to reference the task abc:foo as a requirement where the ??? is? Than…

---

## [JavaScript-based Ruby lexer/parser for CSS syntax highlighti](https://www.ruby-forum.com/t/javascript-based-ruby-lexer-parser-for-css-syntax-highlighti/87053)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 3\
**Last updated:** [February 27, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/javascript-based-ruby-lexer-parser-for-css-syntax-highlighti/87053 "2007-02-27T23:55:49Z")

</div>

I’m looking for a JS library that will find (or otherwise-specified) elements on an HTML page and wrap bits in … type elements for CSS syntax coloring of the original source. I’ve found two JS-based syntax highlighte…

---

## [ED for Windows IDE released with comprehensive Ruby support](https://www.ruby-forum.com/t/ed-for-windows-ide-released-with-comprehensive-ruby-support/86908)

<div class="topic-metadata">

**Author:** [@nevf](https://www.ruby-forum.com/u/nevf)\
**Replies:** 5\
**Last updated:** [February 27, 2007, 11:16pm UTC](https://www.ruby-forum.com/t/ed-for-windows-ide-released-with-comprehensive-ruby-support/86908 "2007-02-27T23:16:43Z")

</div>

Folks here on the forum have been very helpful this past month with helping me work through nitty-gritty Ruby issues in relation to syntax highlighting etc. for our ED for Windows IDE. I finally released ED V4.30 last…

---

## [Time granularity](https://www.ruby-forum.com/t/time-granularity/87031)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [February 27, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/time-granularity/87031 "2007-02-27T22:36:40Z")

</div>

Hello, I need to create some time variables for our company’s accounting budget calendar. We have 13 budget periods in a year. The first one ends on the last Sunday of January of whatever year it is. Once I find that …

---

## [Comparing two arrays](https://www.ruby-forum.com/t/comparing-two-arrays/87030)

<div class="topic-metadata">

**Author:** [@rafa](https://www.ruby-forum.com/u/rafa)\
**Replies:** 7\
**Last updated:** [February 27, 2007, 9:26pm UTC](https://www.ruby-forum.com/t/comparing-two-arrays/87030 "2007-02-27T21:26:32Z")

</div>

Hi, im trying to compare two arrays and creating a new one with the values that are in the second array and the values that aren’t concatenated with “NOT FOUND”, here is the snippet code. Im getting a weird result im …

---

## [Install mini\_magick.gem](https://www.ruby-forum.com/t/install-mini-magick-gem/86965)

<div class="topic-metadata">

**Author:** [@jonathan](https://www.ruby-forum.com/u/jonathan)\
**Replies:** 2\
**Last updated:** [February 27, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/install-mini-magick-gem/86965 "2007-02-27T19:23:45Z")

</div>

In search of a way to resize images using ruby, I was pointed to http://rubyforge.org/projects/mini-magick/ which looks very promising. I downloaded the .gem file and it’s sitting on my desktop (mac OSX). I have nev…

---

## [Can't see ouput of executed command](https://www.ruby-forum.com/t/cant-see-ouput-of-executed-command/87021)

<div class="topic-metadata">

**Author:** [@schacke](https://www.ruby-forum.com/u/schacke)\
**Replies:** 3\
**Last updated:** [February 27, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/cant-see-ouput-of-executed-command/87021 "2007-02-27T18:13:41Z")

</div>

Hi, On a windows system, I execute a command using the ‘backtick’ notation, but I can’t see the output of the command. For example: echo Hello --\> no output mvn.bat -version --\> no output date --\> no output When I…

---

## [Interaction of debug.h and DRb](https://www.ruby-forum.com/t/interaction-of-debug-h-and-drb/87002)

<div class="topic-metadata">

**Author:** [@hanholl](https://www.ruby-forum.com/u/hanholl)\
**Replies:** 0\
**Last updated:** [February 27, 2007, 2:29pm UTC](https://www.ruby-forum.com/t/interaction-of-debug-h-and-drb/87002 "2007-02-27T14:29:52Z")

</div>

Hi, This is 1.8.4 on Linux This is try.rb: require ‘drb/drb’ socketpath = “/var/tmp/pgproxy” proxy = DRb::DRbObject.new(nil, “drbunix:/#{socketpath}”) end-of try.rb socketpath must be a valid unix domain socket of …

---

## [Generating negative random numbers](https://www.ruby-forum.com/t/generating-negative-random-numbers/83848)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 7\
**Last updated:** [February 27, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/generating-negative-random-numbers/83848 "2007-02-27T14:13:48Z")

</div>

I know how to generate positive random numbers, but is it possible to generate a random number in a range such \[-9…+9\] ? tfyh joss

---

## [Regular expression matches last occurrence instead of first](https://www.ruby-forum.com/t/regular-expression-matches-last-occurrence-instead-of-first/86995)

<div class="topic-metadata">

**Author:** [@andyo](https://www.ruby-forum.com/u/andyo)\
**Replies:** 1\
**Last updated:** [February 27, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/regular-expression-matches-last-occurrence-instead-of-first/86995 "2007-02-27T13:33:41Z")

</div>

I’ve found an anomoly in the way Ruby handles non-greedy regular expressions and wonder whether it’s been discussed before. A search of the documentation and a general Internet search didn’t turn up information on thi…

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

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