# Ruby

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

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

---

## [Ruby can't find installed gems](https://www.ruby-forum.com/t/ruby-cant-find-installed-gems/102166)

<div class="topic-metadata">

**Author:** [@chet](https://www.ruby-forum.com/u/chet)\
**Replies:** 3\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/ruby-cant-find-installed-gems/102166 "2006-08-15T14:17:29Z")

</div>

I’ve been fighting this all day, and I can’t grok where I’ve gone wrong. I hope someone here can help. I’m trying to write a fairly simple script to handle some periodic SFTP file submissions to a client’s vendor. Net…

---

## [Rails 1.1.6: Stronger fix, backports, and full disclosure](https://www.ruby-forum.com/t/rails-1-1-6-stronger-fix-backports-and-full-disclosure/102334)

<div class="topic-metadata">

**Author:** [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Replies:** 11\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/rails-1-1-6-stronger-fix-backports-and-full-disclosure/102334 "2006-08-15T14:17:24Z")

</div>

The cat is out of the bag, so here’s the full disclosure edition of the current security vulnerability. With Rails 1.1.0 through 1.1.5 (minus the short-lived 1.1.3), you can trigger the evaluation of Ruby code through…

---

## [Fix for rational.rb (accepting Rationals as num/den)](https://www.ruby-forum.com/t/fix-for-rational-rb-accepting-rationals-as-num-den/102146)

<div class="topic-metadata">

**Author:** [@apeiros](https://www.ruby-forum.com/u/apeiros)\
**Replies:** 2\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/fix-for-rational-rb-accepting-rationals-as-num-den/102146 "2006-08-15T14:17:23Z")

</div>

Hi, Rational currently doesn’t accept Rationals as Numerator/Denominator. I wrote a patch for it and look for feedback. Thanks. def Rational(a, b = 1) Rational.reduce(\*Rational.normalize(a,b)) end class Rational \< …

---

## [Load paths unions?](https://www.ruby-forum.com/t/load-paths-unions/101915)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 9\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/load-paths-unions/101915 "2006-08-15T14:17:22Z")

</div>

I want to be able to “union” some load paths. Eg. given lib/facets/more lib/facets/core I’d like to be able to do require ‘facets/foo.rb’ And have it search both more/ and core/ for foo.rb. What’s the best way to a…

---

## [\[ANN\] Mongrel 0.3.13.4 Pre-Release -- PID Files Working](https://www.ruby-forum.com/t/ann-mongrel-0-3-13-4-pre-release-pid-files-working/102435)

<div class="topic-metadata">

**Author:** [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Replies:** 0\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/ann-mongrel-0-3-13-4-pre-release-pid-files-working/102435 "2006-08-15T14:17:21Z")

</div>

Hi Folks, An update to tell everyone to try out the pre-release again: sudo gem install mongrel –source=http://mongrel.rubyforge.org/releases/ Nothing available for win32 yet, the next pre-release will have a win32 …

---

## [Ruby Cookbook now in PDF format](https://www.ruby-forum.com/t/ruby-cookbook-now-in-pdf-format/101985)

<div class="topic-metadata">

**Author:** [@Leonard\_Richardson](https://www.ruby-forum.com/u/Leonard_Richardson)\
**Replies:** 14\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/ruby-cookbook-now-in-pdf-format/101985 "2006-08-15T14:17:20Z")

</div>

You asked for it, you got it! O’Reilly is now selling the Ruby Cookbook as a downloadable PDF for 50% off the cover price. AFAIK this is the first full-length O’Reilly book to be sold as PDF, and if it goes well, othe…

---

## [Cryptographic Signatures: Ruby versus OpenSSL](https://www.ruby-forum.com/t/cryptographic-signatures-ruby-versus-openssl/102380)

<div class="topic-metadata">

**Author:** [@asinglenet](https://www.ruby-forum.com/u/asinglenet)\
**Replies:** 9\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/cryptographic-signatures-ruby-versus-openssl/102380 "2006-08-15T14:17:19Z")

</div>

Hello Everyone, I am having problems matching up a signature created with openssl on the command line with a signature created in Ruby. The signature I am trying to get is an RSA encryption with my 1024 bit private k…

---

## [Problem with Net::FTP#mtime](https://www.ruby-forum.com/t/problem-with-net-ftp-mtime/102432)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 1\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/problem-with-net-ftp-mtime/102432 "2006-08-15T14:17:19Z")

</div>

Hi all, Ruby 1.8.4 Solaris 10, connecting to a Solaris 8 remote host. I’ve got a code snippet like the one below. It connects fine, performs the chdir fine, performs the nlst fine, but chokes on mtime: FTP.open(ho…

---

## [How absurd is this?](https://www.ruby-forum.com/t/how-absurd-is-this/102431)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/how-absurd-is-this/102431 "2006-08-15T14:17:18Z")

</div>

Imagine you have in a method a block. Sometimes you will want that block to be executed via a mutex.synchronize() call. And sometimes you don’t want to synchronize. def y yield end def method\_with\_a\_block (dont…

---

## [Re: ParseDate.parsedate() and Time.now()](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/102428)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/102428 "2006-08-15T14:17:16Z")

</div>

=\> “Fri Aug 11 11:03:36 Central Daylight Time 2006” because “Central Daylight Time” should actually be replaced with the abbreviation “CDT”. Should? No. It’s up to your OS (and how it was configured when it was …

---

## [Ruby + openssl + self signed certificates = confusion](https://www.ruby-forum.com/t/ruby-openssl-self-signed-certificates-confusion/102430)

<div class="topic-metadata">

**Author:** [@Neumann](https://www.ruby-forum.com/u/Neumann)\
**Replies:** 0\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/ruby-openssl-self-signed-certificates-confusion/102430 "2006-08-15T14:17:16Z")

</div>

I’m trying to work a bit of CA ability into some code that I’m writing, and I need to create a self-signed certificate. This is not going so well. I’m able to create the certificate, and it seems to work OK, until I…

---

## [Assign an unknown value to an unknown variable](https://www.ruby-forum.com/t/assign-an-unknown-value-to-an-unknown-variable/102414)

<div class="topic-metadata">

**Author:** [@Vincent\_A](https://www.ruby-forum.com/u/Vincent_A)\
**Replies:** 1\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/assign-an-unknown-value-to-an-unknown-variable/102414 "2006-08-15T14:17:11Z")

</div>

Hello, I would like to read a configuration file written this way: abcd = one efgh = two ijkl = three I would like to read this file and be able to call variable abcd. I could do it using a hashtable, but I would …

---

## [Re: ParseDate.parsedate() and Time.now()](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/102422)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/102422 "2006-08-15T14:17:01Z")

</div>

irb(main):030:0\> ParseDate.parsedate(timeNow) =\> \[nil, 8, 11, 11, 3, 36, “Central”, 5\] Seems to me that it should return this: =\> \[2006, 8, 11, 11, 3, 36, “Central”, 5\] Or is it just me? This is a known issue, whe…

---

## [Codegolf - Pascals Triangle](https://www.ruby-forum.com/t/codegolf-pascals-triangle/102366)

<div class="topic-metadata">

**Author:** [@batguano](https://www.ruby-forum.com/u/batguano)\
**Replies:** 13\
**Last updated:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/codegolf-pascals-triangle/102366 "2006-08-15T14:17:01Z")

</div>

My take on the latest problem from http://www.codegolf.com a=\[\] 34.times{k=0;puts (a.map!{|i|k+k=i}\<\<1).join(" ")} 56 bytes. Best regards, Michael – Michael U. R&D Team ISIS Information Systems Austria tel: +43…

---

## [Instance\_eval vs. class\_eval context](https://www.ruby-forum.com/t/instance-eval-vs-class-eval-context/102106)

<div class="topic-metadata">

**Author:** [@esquilax](https://www.ruby-forum.com/u/esquilax)\
**Replies:** 3\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/instance-eval-vs-class-eval-context/102106 "2006-08-15T14:16:56Z")

</div>

Is it the same context when a class is the receiver of instance\_eval or class\_eval/module\_eval?

---

## [\[ANN} Ruby Performance Validator 1.14](https://www.ruby-forum.com/t/ann-ruby-performance-validator-1-14/102408)

<div class="topic-metadata">

**Author:** [@albino\_squirrel](https://www.ruby-forum.com/u/albino_squirrel)\
**Replies:** 0\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/ann-ruby-performance-validator-1-14/102408 "2006-08-15T14:16:52Z")

</div>

Ruby Performance Validator 1.14 has been released. This version of Ruby Performance Validator is between 2.5x and 12x faster than previous versions of Ruby Performance Validator depending upon the options selected and…

---

## [Start an external application - How?](https://www.ruby-forum.com/t/start-an-external-application-how/101508)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 10\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/start-an-external-application-how/101508 "2006-08-15T14:16:49Z")

</div>

I don’t need details, just a push in the right direction. How do you start a series of external applications from within ruby (on windows). For example, I want to start mywebcamapp.exe and myweatherapp.exe. Also, is…

---

## [Problem on enpanding array?](https://www.ruby-forum.com/t/problem-on-enpanding-array/102368)

<div class="topic-metadata">

**Author:** [@Matthias\_Ludwig](https://www.ruby-forum.com/u/Matthias_Ludwig)\
**Replies:** 1\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/problem-on-enpanding-array/102368 "2006-08-15T14:16:49Z")

</div>

Hi, i wrote a little class for thread-pools, but there is a problem expanding args on a method-call. def new\_thread(\*args, &action) wait until a slot in the pool is free … start thread threads \<\< Thread.new { action…

---

## [Access built-in shell commands like 'history' or 'fc'](https://www.ruby-forum.com/t/access-built-in-shell-commands-like-history-or-fc/64548)

<div class="topic-metadata">

**Author:** [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Replies:** 10\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/access-built-in-shell-commands-like-history-or-fc/64548 "2006-08-15T14:16:48Z")

</div>

How do I access built-in shell commands (like ‘history’ or ‘fc’) with a system call? Not what I was expecting: % ruby -e 'puts history’ -e:1: command not found: history But this works fine: % ruby -e 'puts pwd’ /h…

---

## [Question on setting up a class and searching on objects](https://www.ruby-forum.com/t/question-on-setting-up-a-class-and-searching-on-objects/102382)

<div class="topic-metadata">

**Author:** [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Replies:** 2\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/question-on-setting-up-a-class-and-searching-on-objects/102382 "2006-08-15T14:16:47Z")

</div>

I’m working from Ruby for Rails book but want to try and just replicate some of the examples in Ruby alone. One method in particular is called whole\_name and would give the user the ability to search a list by first\_n…

---

## [Is there a way to avoid having the library slurp-read the wh](https://www.ruby-forum.com/t/is-there-a-way-to-avoid-having-the-library-slurp-read-the-wh/101331)

<div class="topic-metadata">

**Author:** [@kivle](https://www.ruby-forum.com/u/kivle)\
**Replies:** 5\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-avoid-having-the-library-slurp-read-the-wh/101331 "2006-08-15T14:16:45Z")

</div>

Hi, I’m currently implementing a database application in Ruby, and I use PostgreSQL for the data store. At first I tried using DBI to make the data store as platform/database independent as possible, but when I came …

---

## [Replace my symbolobject](https://www.ruby-forum.com/t/replace-my-symbolobject/102403)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 0\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/replace-my-symbolobject/102403 "2006-08-15T14:16:43Z")

</div>

I havea symbolobject which i use as a array later. the definition is class SymbolObject def initialize(symb) puts symb @symbol=symb @name=@exchange=@news=@summary=@sector=@industry=@category=@otherInfo=@optionsDa…

---

## [Need to understand code](https://www.ruby-forum.com/t/need-to-understand-code/102381)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/need-to-understand-code/102381 "2006-08-15T14:16:42Z")

</div>

This is an extract from http://www.codeforpeople.com/lib/ruby/arrayfields/arrayfields-3.5.0/README that i am trying to understand. relation = pgconn.query sql relation.size #=\> 65536 # yikes! do we re…

---

## [Fortran 77](https://www.ruby-forum.com/t/fortran-77/64584)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 5\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/fortran-77/64584 "2006-08-15T14:16:35Z")

</div>

I just happened upon the the footnote on page 187 of the Pickaxe book about how RDoc can document Fortran 77. Does Dave T. write a lot of Fortran code? I had to ask.

---

## [\`Marshal#load': incompatible marshal file format (can't be r](https://www.ruby-forum.com/t/marshal-load-incompatible-marshal-file-format-cant-be-r/102374)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/marshal-load-incompatible-marshal-file-format-cant-be-r/102374 "2006-08-15T14:16:33Z")

</div>

e$B0J2\<$N$h$&$K!“e(BMarshal e$B$Ge(B dump e$B$7$?7k2L$,e(B load e$B$G$-$J$$$3$H$,$”$k$h$&$G$9!#e(B % ./ruby -e ‘Marshal.dump(0, STDOUT)’|./ruby -ve ‘Marshal.load(STDIN)’ ruby 1.9.0 (2006-08-09) \[i686-linux\] -e:1:in \`…

---

## [Unit test approach for Ruby extension](https://www.ruby-forum.com/t/unit-test-approach-for-ruby-extension/64634)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/unit-test-approach-for-ruby-extension/64634 "2006-08-15T14:16:29Z")

</div>

Hi, I am writing a Ruby extension in C++. Do we write unit test separately for the C++ code and the Ruby code? I am familar with cppunit and recently with Ruby’s build in unit testing facility. Could someone advice? …

---

## [Entering data into Excel, in specific iterated rows/columns](https://www.ruby-forum.com/t/entering-data-into-excel-in-specific-iterated-rows-columns/64567)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 9\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/entering-data-into-excel-in-specific-iterated-rows-columns/64567 "2006-08-15T14:16:03Z")

</div>

I have a script that spiders a page looking for elements. In this specific case, I’m looking for links (innerText and href). I have this script working so far to output data to a text file, but I’d like to output it …

---

## [SEGV in ruby\_re\_compile\_pattern](https://www.ruby-forum.com/t/segv-in-ruby-re-compile-pattern/102360)

<div class="topic-metadata">

**Author:** [@Tietew](https://www.ruby-forum.com/u/Tietew)\
**Replies:** 0\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/segv-in-ruby-re-compile-pattern/102360 "2006-08-15T14:16:03Z")

</div>

Tietewe$B$G$9!#e(B REXMLe$B$GHf3SE\*Bg$-$Je(BXHTMLe$B$r%Q!\<%9$7$F$$$k$H!“$?$^$Ke(BSEGVe$B$7$^$9!#F1e(B e$B$8J8\>O$r%Q!\<%9$7$F$b5/$3$k$H$-$H5/$3$i$J$$$H$-$,$”$j!"IT0BDj$G$9!#e(B e$BHyL/$K%P!\<%8%g%s$,8E$$$N$G$9$,$H$j$"$($…

---

## [Referring to an instance method using a variable](https://www.ruby-forum.com/t/referring-to-an-instance-method-using-a-variable/102353)

<div class="topic-metadata">

**Author:** [@Jos\_B](https://www.ruby-forum.com/u/Jos_B)\
**Replies:** 2\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/referring-to-an-instance-method-using-a-variable/102353 "2006-08-15T14:16:02Z")

</div>

As part of a larger program I am trying to convert the following Perl code to Ruby: lizzy:~% cat ptest sub equals { my($a, $b) = @\_; return $a eq $b ? 1 : 0; } my $ops = { '=' =\> sub { my ($a, $b) = @\_; return $a eq …

---

## [Overriding String#\[\]](https://www.ruby-forum.com/t/overriding-string/102120)

<div class="topic-metadata">

**Author:** [@wookie](https://www.ruby-forum.com/u/wookie)\
**Replies:** 4\
**Last updated:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/overriding-string/102120 "2006-08-15T14:16:01Z")

</div>

The generic question would be “does anyone know a decent and complete reference to Ruby’s syntax?” What interests me is the syntax required to define methods like \[\], \[\]=, getting their parameters in between the brace…

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

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