# Ruby

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

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

---

## [Hash keys](https://www.ruby-forum.com/t/hash-keys/135732)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 4\
**Last updated:** [April 24, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/hash-keys/135732 "2008-04-24T17:45:55Z")

</div>

Morning, I am working on some code to gather accounts and their balances from a text file and have a question about adding that data to a hash. While checking to see if the account number is a key in the existing …

---

## [FasterCSV.foreach lineno?](https://www.ruby-forum.com/t/fastercsv-foreach-lineno/135722)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 4\
**Last updated:** [April 24, 2008, 5:26pm UTC](https://www.ruby-forum.com/t/fastercsv-foreach-lineno/135722 "2008-04-24T17:26:48Z")

</div>

OK, so I can’t think my way out of a paper this morning. Can I access FasterCVS#lineno while inside a foreach? For example, $ cat \<\< EOF \> csv\_file one two three EOF $ ruby -rubygems -e’require “fastercsv”;Fast…

---

## [Create controller dynamically?](https://www.ruby-forum.com/t/create-controller-dynamically/196653)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 1\
**Last updated:** [April 24, 2008, 4:53pm UTC](https://www.ruby-forum.com/t/create-controller-dynamically/196653 "2008-04-24T16:53:42Z")

</div>

Hi All, I wanna create controller dynamically through my ruby code. Please help me out. Suppose i have one controller if i call a function of this controller so i wanna create another controller dynamically.That can …

---

## [How secure is replacing "to\_s" method?](https://www.ruby-forum.com/t/how-secure-is-replacing-to-s-method/135730)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 1\
**Last updated:** [April 24, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/how-secure-is-replacing-to-s-method/135730 "2008-04-24T16:31:16Z")

</div>

Hi, I’ve a class like this: class Request attr\_accessor :method, :code def to\_s “#{method} #{code}” end end So if I print directly an instance I see a string containing both attributes: message = Request.new me…

---

## [Re: Ruby & Artificial Intelligence](https://www.ruby-forum.com/t/re-ruby-artificial-intelligence/135737)

<div class="topic-metadata">

**Author:** [@Ed\_Davey](https://www.ruby-forum.com/u/Ed_Davey)\
**Replies:** 0\
**Last updated:** [April 24, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/re-ruby-artificial-intelligence/135737 "2008-04-24T15:49:22Z")

</div>

Hi there, Ilya G. has posted a series of detailed and practical articles on supervised learning, decision trees, bayesian filtering etc. http://www.igvita.com/2008/01/07/support-vector-machines-svm-in-ruby/ Ed

---

## [Parsing arrays and searching match on index](https://www.ruby-forum.com/t/parsing-arrays-and-searching-match-on-index/135733)

<div class="topic-metadata">

**Author:** [@shinji](https://www.ruby-forum.com/u/shinji)\
**Replies:** 0\
**Last updated:** [April 24, 2008, 3:13pm UTC](https://www.ruby-forum.com/t/parsing-arrays-and-searching-match-on-index/135733 "2008-04-24T15:13:05Z")

</div>

I am finding that the following logic works, yet when applied in the attached file, it fails… a = \[\[‘head1’,‘head2’,‘head3’\],\[‘a’,‘b’,‘c’\],\[‘x’,‘y’,‘z’\]\] puts a.class headings =a\[0\] puts headings.class b = a #puts …

---

## [Rcairo 1.6.1](https://www.ruby-forum.com/t/rcairo-1-6-1/135728)

<div class="topic-metadata">

**Author:** [@Kouhei\_S](https://www.ruby-forum.com/u/Kouhei_S)\
**Replies:** 0\
**Last updated:** [April 24, 2008, 2:57pm UTC](https://www.ruby-forum.com/t/rcairo-1-6-1/135728 "2008-04-24T14:57:11Z")

</div>

Hi, I released rcairo 1.6.1. rcairo is the Ruby bindings for cairo(\*) that is used by GTK+, Firefox, WebKit/GTK+ and so on. (\*) from cairo’s README: Cairo is a 2D graphics library with support for multiple output d…

---

## [Executing systems commands](https://www.ruby-forum.com/t/executing-systems-commands/135714)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 2\
**Last updated:** [April 24, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/executing-systems-commands/135714 "2008-04-24T14:35:53Z")

</div>

=begin Hey chaps. I’m using an array to find the locations of various commands on a system. Three versions of the same thing. Two work and one doesn’t. Any one know why? =end here’s an array of commands that we wa…

---

## [Any reason for having no module exclusion functionality in R](https://www.ruby-forum.com/t/any-reason-for-having-no-module-exclusion-functionality-in-r/135533)

<div class="topic-metadata">

**Author:** [@yrashk](https://www.ruby-forum.com/u/yrashk)\
**Replies:** 5\
**Last updated:** [April 24, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/any-reason-for-having-no-module-exclusion-functionality-in-r/135533 "2008-04-24T14:31:44Z")

</div>

Hello, May be I am missing something (since I am not MRI hacker), but why there is no module exclusion functionality â€” i.e. you can extend object with module, but can’t reverse this operation? Any specific reason f…

---

## [Deadlock in DRb](https://www.ruby-forum.com/t/deadlock-in-drb/135461)

<div class="topic-metadata">

**Author:** [@larsch](https://www.ruby-forum.com/u/larsch)\
**Replies:** 5\
**Last updated:** [April 24, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/deadlock-in-drb/135461 "2008-04-24T14:15:47Z")

</div>

In a program with two DRb servers running (two time start\_service), i get the following deadlock after a while of running with a client connecting to both servers: deadlock 0x284c748: sleep:J(0x2c84f7c) (main) - serve…

---

## [Puzzeling little inconsistency](https://www.ruby-forum.com/t/puzzeling-little-inconsistency/135707)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 5\
**Last updated:** [April 24, 2008, 12:19pm UTC](https://www.ruby-forum.com/t/puzzeling-little-inconsistency/135707 "2008-04-24T12:19:18Z")

</div>

I just stumbled upon this, not sure what is going on here. BTW Ruby, Ruby1.9 and JRuby behave all the like. 546/46 \> cat syntax.rb && echo “—\>” && ruby syntax.rb module M def % z puts z end extend self self % “To…

---

## [Hashes](https://www.ruby-forum.com/t/hashes/135525)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 9\
**Last updated:** [April 24, 2008, 12:18pm UTC](https://www.ruby-forum.com/t/hashes/135525 "2008-04-24T12:18:08Z")

</div>

Can Ruby create a hash and have a key and the value be an array? I am taking account information from a txt file like such: 000123456778900000000-1234567890000000000000000000230000000 IÂ¹m getting the account number a…

---

## [WIN32OLE disable busy dialog etc](https://www.ruby-forum.com/t/win32ole-disable-busy-dialog-etc/135027)

<div class="topic-metadata">

**Author:** [@calande](https://www.ruby-forum.com/u/calande)\
**Replies:** 6\
**Last updated:** [April 24, 2008, 11:25am UTC](https://www.ruby-forum.com/t/win32ole-disable-busy-dialog-etc/135027 "2008-04-24T11:25:36Z")

</div>

Hi, I sometimes have a problem whereby during a long operation using WIN32OLE, I get a message box, which says: “This action cannot be completed because the other program is busy. Choose switch to activate the busy p…

---

## [Crossword Solver (#132)](https://www.ruby-forum.com/t/crossword-solver-132/110562)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 12\
**Last updated:** [April 24, 2008, 10:48am UTC](https://www.ruby-forum.com/t/crossword-solver-132/110562 "2008-04-24T10:48:45Z")

</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: …

---

## [Fast XML output](https://www.ruby-forum.com/t/fast-xml-output/135527)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 3\
**Last updated:** [April 24, 2008, 7:00am UTC](https://www.ruby-forum.com/t/fast-xml-output/135527 "2008-04-24T07:00:48Z")

</div>

Hi, we just started playing with ruby and ActiveRecord a few days ago at my company and we’re having major troubles of outputting xml fast enough. Pure xml output from ActiveRecord::Base takes approx 20s for 500 obj…

---

## [Ruby WATIR](https://www.ruby-forum.com/t/ruby-watir/135626)

<div class="topic-metadata">

**Author:** [@evhjim](https://www.ruby-forum.com/u/evhjim)\
**Replies:** 6\
**Last updated:** [April 24, 2008, 6:38am UTC](https://www.ruby-forum.com/t/ruby-watir/135626 "2008-04-24T06:38:01Z")

</div>

I am a local resource manager, and I am trying to understand a technology that I had been previously unaware of. I am looking for consultants for a position in Columbus with one of our local clients. We are looking te…

---

## [Best GNU Emacs for Ruby on Mac OSX](https://www.ruby-forum.com/t/best-gnu-emacs-for-ruby-on-mac-osx/135668)

<div class="topic-metadata">

**Author:** [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Replies:** 2\
**Last updated:** [April 24, 2008, 6:00am UTC](https://www.ruby-forum.com/t/best-gnu-emacs-for-ruby-on-mac-osx/135668 "2008-04-24T06:00:00Z")

</div>

I’m extremely pleased with GNU Emacs 23.0.60.2 running on Ubuntu Linux, but I’m going to be doing some development on OSX, so I’m soliciting opinions regarding the best GNU Emacs for that platform. I’ve come across Ca…

---

## [Wsdl2ruby](https://www.ruby-forum.com/t/wsdl2ruby/135675)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 1\
**Last updated:** [April 24, 2008, 5:11am UTC](https://www.ruby-forum.com/t/wsdl2ruby/135675 "2008-04-24T05:11:29Z")

</div>

Hello, I’m stuck in the begining. Could someone point me to what I’ve to do be able to run this wsdl2ruby.rb script? It seems that my system lacks a proper script to invoke the generator provided by wsdl2ruby. I have…

---

## [Did using Yacc in the Ruby parser require a lot of messy hacking?](https://www.ruby-forum.com/t/did-using-yacc-in-the-ruby-parser-require-a-lot-of-messy-hacking/135532)

<div class="topic-metadata">

**Author:** [@robert](https://www.ruby-forum.com/u/robert)\
**Replies:** 2\
**Last updated:** [April 24, 2008, 4:28am UTC](https://www.ruby-forum.com/t/did-using-yacc-in-the-ruby-parser-require-a-lot-of-messy-hacking/135532 "2008-04-24T04:28:06Z")

</div>

I’m assuming that the grammar of Ruby does not follow the LALR grammar rules that Yacc assumes? Can anyone give a plain english definition of what LALR actually means? Or context free? Or does the grammar of Ruby fit …

---

## [Dud require for Plist gem](https://www.ruby-forum.com/t/dud-require-for-plist-gem/135670)

<div class="topic-metadata">

**Author:** [@tcm614ce](https://www.ruby-forum.com/u/tcm614ce)\
**Replies:** 1\
**Last updated:** [April 24, 2008, 3:51am UTC](https://www.ruby-forum.com/t/dud-require-for-plist-gem/135670 "2008-04-24T03:51:31Z")

</div>

Hi there, I’m sorry about this, I’m just working on my first ruby script which goes as follows: require ‘Plist’ require ‘optparse’ #Class for handling the plist file. class PlistHash def initialize(path) @path=pa…

---

## [Compression](https://www.ruby-forum.com/t/compression/135654)

<div class="topic-metadata">

**Author:** [@amslonewolf](https://www.ruby-forum.com/u/amslonewolf)\
**Replies:** 1\
**Last updated:** [April 24, 2008, 2:06am UTC](https://www.ruby-forum.com/t/compression/135654 "2008-04-24T02:06:36Z")

</div>

How do I compress a string in ruby?

---

## [Generate Barcode in PDF?](https://www.ruby-forum.com/t/generate-barcode-in-pdf/114501)

<div class="topic-metadata">

**Author:** [@reynar](https://www.ruby-forum.com/u/reynar)\
**Replies:** 3\
**Last updated:** [April 24, 2008, 1:52am UTC](https://www.ruby-forum.com/t/generate-barcode-in-pdf/114501 "2008-04-24T01:52:33Z")

</div>

Hi, I am searching for a way to dynamically generate a barcode as part of a PDF. I have come across a number of older threads and discussions but no one seemed to confirm a tested working solution. I wondered if any…

---

## [Ruby and object paradigm](https://www.ruby-forum.com/t/ruby-and-object-paradigm/135558)

<div class="topic-metadata">

**Author:** [@andres](https://www.ruby-forum.com/u/andres)\
**Replies:** 8\
**Last updated:** [April 23, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/ruby-and-object-paradigm/135558 "2008-04-23T23:26:09Z")

</div>

Hi ruby list, I´m a smalltalk developer and now i’m beginning with Ruby. I found words like “puts” on the ruby syntax that i don´t understand. The basic object paradigm formula is “receiver + message”, an emisor send…

---

## [String#chop chops last byte, not char](https://www.ruby-forum.com/t/string-chop-chops-last-byte-not-char/135656)

<div class="topic-metadata">

**Author:** [@ebelin](https://www.ruby-forum.com/u/ebelin)\
**Replies:** 2\
**Last updated:** [April 23, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/string-chop-chops-last-byte-not-char/135656 "2008-04-23T23:12:41Z")

</div>

This is happening in ruby 1.8.6: % ruby --version ruby 1.8.6 (2007-09-23 patchlevel 110) \[i686-darwin9.1.0\] Documentation says: % ri String#chop …Returns a new +String+ with the last character removed. If… This is …

---

## [Irb's readline history](https://www.ruby-forum.com/t/irbs-readline-history/135653)

<div class="topic-metadata">

**Author:** [@alby](https://www.ruby-forum.com/u/alby)\
**Replies:** 3\
**Last updated:** [April 23, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/irbs-readline-history/135653 "2008-04-23T22:23:14Z")

</div>

irb is nice, because is uses readline. I can press to bring to life previously typed lines. That’s good. But if I exist irb and then return to it the history is gone. So it’s not like bash(1) and mysql(1) that save t…

---

## [Win32-service-0.6.1 using a Rails Model](https://www.ruby-forum.com/t/win32-service-0-6-1-using-a-rails-model/135243)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 5\
**Last updated:** [April 23, 2008, 10:21pm UTC](https://www.ruby-forum.com/t/win32-service-0-6-1-using-a-rails-model/135243 "2008-04-23T22:21:29Z")

</div>

Windows 2000 SP4 Ruby 1.8.6 Rail 1.2.6 I’m trying to create a Rail application for our internal use to provide a one stop access to services. I’m currently trying to get the Server.status, Service.stop and Service.s…

---

## [Installing tk after the fact?](https://www.ruby-forum.com/t/installing-tk-after-the-fact/135641)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 3\
**Last updated:** [April 23, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/installing-tk-after-the-fact/135641 "2008-04-23T22:18:30Z")

</div>

Is it even possible to install tk support after the fact for ruby 1.8? Most of the boxes at work are running CentOS (RHEL clone), and I was going to write some small frontends in ruby/tk this morning. Lo and behold, …

---

## [Announcing the beta of Agile Web Development with Rails, Third Edition](https://www.ruby-forum.com/t/announcing-the-beta-of-agile-web-development-with-rails-third-edition/135652)

<div class="topic-metadata">

**Author:** [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Replies:** 0\
**Last updated:** [April 23, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/announcing-the-beta-of-agile-web-development-with-rails-third-edition/135652 "2008-04-23T22:00:14Z")

</div>

(I know this is the RUby list, and I won;t post here again about the book. But I know many Rails developers who read this list but not the Rails one…) If a dog year is 7 human years, then a Rails year is a lifetime. T…

---

## [Re: Triangle Area (#160)](https://www.ruby-forum.com/t/re-triangle-area-160/196652)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [April 23, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/re-triangle-area-160/196652 "2008-04-23T21:21:03Z")

</div>

Thanks for your work in keeping up RubyQuiz! My spare thinking time has been taken up by other work lately, but this one’s simple enough that I feel fairly confident in typing up this solution while away from the near…

---

## [Re: Triangle Area (#160)](https://www.ruby-forum.com/t/re-triangle-area-160/135646)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [April 23, 2008, 9:15pm UTC](https://www.ruby-forum.com/t/re-triangle-area-160/135646 "2008-04-23T21:15:39Z")

</div>

Thanks for your work in keeping up RubyQuiz! My spare thinking time has been taken up by other work lately, but this one’s simple enough that I feel fairly confident in typing up this solution while away from the near…

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

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