# Ruby

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

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

---

## [All occurances of a character in a string](https://www.ruby-forum.com/t/all-occurances-of-a-character-in-a-string/135933)

<div class="topic-metadata">

**Author:** [@amslonewolf](https://www.ruby-forum.com/u/amslonewolf)\
**Replies:** 13\
**Last updated:** [April 30, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/all-occurances-of-a-character-in-a-string/135933 "2008-04-30T17:24:37Z")

</div>

Hi - I am trying to figure out the ruby way of printing all occurances of a character in a string… The index method on string gives only the first occurance only. Example input string - abbccdaab desired output - ‘a’…

---

## [I have installed Ruby-186-26, why is there no usr/local/bin/ruby directory?](https://www.ruby-forum.com/t/i-have-installed-ruby-186-26-why-is-there-no-usr-local-bin-ruby-directory/136275)

<div class="topic-metadata">

**Author:** [@tenxian](https://www.ruby-forum.com/u/tenxian)\
**Replies:** 5\
**Last updated:** [April 30, 2008, 5:22pm UTC](https://www.ruby-forum.com/t/i-have-installed-ruby-186-26-why-is-there-no-usr-local-bin-ruby-directory/136275 "2008-04-30T17:22:19Z")

</div>

When I installed it, I just changed the path to e:\\ruby. I often meet No such file or directory errors. Any idea?

---

## [Help regarding using winsystem command](https://www.ruby-forum.com/t/help-regarding-using-winsystem-command/136273)

<div class="topic-metadata">

**Author:** [@pranjal\_jain](https://www.ruby-forum.com/u/pranjal_jain)\
**Replies:** 1\
**Last updated:** [April 30, 2008, 4:56pm UTC](https://www.ruby-forum.com/t/help-regarding-using-winsystem-command/136273 "2008-04-30T16:56:20Z")

</div>

HI all I am trying to invoke the system commands by means of Ruby. I am using the ‘winsystem’ command for it, but unfortunately it is giving me the error as follows : example.rb:2: undefined method ‘winsystem’ for …

---

## [Dynamic class instantiation by iteration](https://www.ruby-forum.com/t/dynamic-class-instantiation-by-iteration/136272)

<div class="topic-metadata">

**Author:** [@Frisco\_Del\_R](https://www.ruby-forum.com/u/Frisco_Del_R)\
**Replies:** 4\
**Last updated:** [April 30, 2008, 4:32pm UTC](https://www.ruby-forum.com/t/dynamic-class-instantiation-by-iteration/136272 "2008-04-30T16:32:49Z")

</div>

I’m curious as to why the following does not create three instances of class Cat: class Cat def initialize(name) @name = name end end toons = \[“Felix”, “Garfield”, “Heathcliff”\] toons.each {|t| t = Cat.new(t)} I…

---

## [Documentation Patch: Preventing XPath Injection attacks](https://www.ruby-forum.com/t/documentation-patch-preventing-xpath-injection-attacks/136167)

<div class="topic-metadata">

**Author:** [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Replies:** 5\
**Last updated:** [April 30, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/documentation-patch-preventing-xpath-injection-attacks/136167 "2008-04-30T16:13:55Z")

</div>

Here’s a patch to rexml/xpath.rb which documents the variables parameter in REXML::XPath. — xpath.rb.old 2008-04-24 17:31:51.000000000 -0500 +++ xpath.rb 2008-04-24 17:37:38.000000000 -0500 @@ -15,10 +15,15 @@ # …

---

## [Levenshtein\_distance and recreate the string](https://www.ruby-forum.com/t/levenshtein-distance-and-recreate-the-string/136247)

<div class="topic-metadata">

**Author:** [@amslonewolf](https://www.ruby-forum.com/u/amslonewolf)\
**Replies:** 11\
**Last updated:** [April 30, 2008, 2:48pm UTC](https://www.ruby-forum.com/t/levenshtein-distance-and-recreate-the-string/136247 "2008-04-30T14:48:17Z")

</div>

Hi - A general computer science question- Given the levenshtein distance between two strings and one of the strings S1, is it possible to re-create the second string. For example - S1 = “RUBY” S2 = “BRUY” lev\_dist…

---

## [Status of SQL Server Support for IronRuby on Rails](https://www.ruby-forum.com/t/status-of-sql-server-support-for-ironruby-on-rails/136263)

<div class="topic-metadata">

**Author:** [@softmind](https://www.ruby-forum.com/u/softmind)\
**Replies:** 1\
**Last updated:** [April 30, 2008, 2:04pm UTC](https://www.ruby-forum.com/t/status-of-sql-server-support-for-ironruby-on-rails/136263 "2008-04-30T14:04:15Z")

</div>

Hi, I would like to work with IronRuby on Rails with Active Record and DataMapper. I understand the adapter for SQL Server 2005/2008 is under preparation by the asp.net team. Can some one help me with the details of…

---

## [Getting array index for non-zero elements](https://www.ruby-forum.com/t/getting-array-index-for-non-zero-elements/136217)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 5\
**Last updated:** [April 30, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/getting-array-index-for-non-zero-elements/136217 "2008-04-30T13:45:28Z")

</div>

Team, Given multi-dimension array @ga: @ga = \[ \[0,0,0,0,1,9,0,4,0\], \[0,0,4,8,0,0,6,0,0\], \[7,5,0,0,0,0,0,0,2\], \[0,9,0,1,0,2,0,0,4\], \[0,0,0,0,0,3,0,0,0\], \[5,0,0,4,0,6,0,3,0…

---

## [Installing RMagick with Gmagick on xp64!](https://www.ruby-forum.com/t/installing-rmagick-with-gmagick-on-xp64/136268)

<div class="topic-metadata">

**Author:** [@Chris\_Gunn](https://www.ruby-forum.com/u/Chris_Gunn)\
**Replies:** 4\
**Last updated:** [April 30, 2008, 1:31pm UTC](https://www.ruby-forum.com/t/installing-rmagick-with-gmagick-on-xp64/136268 "2008-04-30T13:31:24Z")

</div>

With Ruby -186-26 I installed GMagic first. v 1.1.11 q16 as I wanted some simple graphics. lines etc. Then I installed RMagic 2.3.0 Now, it’s in the gem list: \*\*\* LOCAL GEMS \*\*\* fxri (0.3.6) fxruby (1.6.12) hpric…

---

## [Watir : Working in same session of IE](https://www.ruby-forum.com/t/watir-working-in-same-session-of-ie/136281)

<div class="topic-metadata">

**Author:** [@anukulsinghal](https://www.ruby-forum.com/u/anukulsinghal)\
**Replies:** 4\
**Last updated:** [April 30, 2008, 12:31pm UTC](https://www.ruby-forum.com/t/watir-working-in-same-session-of-ie/136281 "2008-04-30T12:31:58Z")

</div>

Hi, Actually am stuck in a problem. I am performing the following set of commands: require ‘watir’ ie = Watir::IE.new ie.goto(“http://www.google.com”) When I execute, it successfully opens a new browser with the co…

---

## [Ruby-oci8 proxy-authentication?](https://www.ruby-forum.com/t/ruby-oci8-proxy-authentication/123657)

<div class="topic-metadata">

**Author:** [@pytlik](https://www.ruby-forum.com/u/pytlik)\
**Replies:** 2\
**Last updated:** [April 30, 2008, 10:07am UTC](https://www.ruby-forum.com/t/ruby-oci8-proxy-authentication/123657 "2008-04-30T10:07:28Z")

</div>

Is it possible to use oracle proxy-authentication with ruby-oci8? We would like to use Rails to connect with a “technical user” as usual, but having the “real user” in the the oracle peudo-variable “USER”. Oracle off…

---

## [Sprintf: what does mean the percent symbol?](https://www.ruby-forum.com/t/sprintf-what-does-mean-the-percent-symbol/136094)

<div class="topic-metadata">

**Author:** [@toki](https://www.ruby-forum.com/u/toki)\
**Replies:** 8\
**Last updated:** [April 30, 2008, 9:58am UTC](https://www.ruby-forum.com/t/sprintf-what-does-mean-the-percent-symbol/136094 "2008-04-30T09:58:04Z")

</div>

Hi all! I’m testing the functionality of sprintf and I know that I can use it in two way: sprintf("%.3f", “1.2345”) =\> “1.234” Or “%.3f” % “1.2345” =\> “1.234” In the second example, what does mean the percent sym…

---

## [RubyOnRails Plugin: Auto Tags](https://www.ruby-forum.com/t/rubyonrails-plugin-auto-tags/136270)

<div class="topic-metadata">

**Author:** [@sur](https://www.ruby-forum.com/u/sur)\
**Replies:** 0\
**Last updated:** [April 30, 2008, 9:13am UTC](https://www.ruby-forum.com/t/rubyonrails-plugin-auto-tags/136270 "2008-04-30T09:13:08Z")

</div>

AutoTags, an open source project, is a plugin for RubyOnRails applications to automatically generate the relevant tags for the provided content. Its quite simple to use and provide easy integration with ActiveRecord. …

---

## [How to convert "ã‚½ãƒ¼" into "\\343\\202\\275\\343\\203\\274"?](https://www.ruby-forum.com/t/how-to-convert-a-a-into-343-202-275-343-203-274/136202)

<div class="topic-metadata">

**Author:** [@rollingwoods](https://www.ruby-forum.com/u/rollingwoods)\
**Replies:** 3\
**Last updated:** [April 30, 2008, 8:45am UTC](https://www.ruby-forum.com/t/how-to-convert-a-a-into-343-202-275-343-203-274/136202 "2008-04-30T08:45:14Z")

</div>

Want to covert “Rubyã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰å®Œå…¨è§£èª¬” into “Ruby\\343\\202\\275\\343\\203\\274\\343\\202\\271\\343\\202\\263\\343\\203\\274\\343\\203\\211\\345\\256\\214\\345\\205\\250\\350\\247\\243\\350\\252\\254”. To solve fxruby displaying asia s…

---

## [Interprocess Communication Windows?](https://www.ruby-forum.com/t/interprocess-communication-windows/136029)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 3\
**Last updated:** [April 30, 2008, 8:00am UTC](https://www.ruby-forum.com/t/interprocess-communication-windows/136029 "2008-04-30T08:00:56Z")

</div>

What is the best way to do interprocess communication under windows? I’ve tried: Process Signals, but trapping them doesn’t work Win32::Event but in the second Process i doesn’t get the handle Can somebody poin…

---

## [Hey, try out Flock](https://www.ruby-forum.com/t/hey-try-out-flock/136129)

<div class="topic-metadata">

**Author:** [@esceo](https://www.ruby-forum.com/u/esceo)\
**Replies:** 6\
**Last updated:** [April 30, 2008, 6:05am UTC](https://www.ruby-forum.com/t/hey-try-out-flock/136129 "2008-04-30T06:05:20Z")

</div>

Hello,I’m emailing you about Flock. I’m now using Flock as my default browser, and I love what it’s done for my whole Web experience. Flock is a social web browser that uniquely pulls together the people, photos, vi…

---

## [How can install Tk8.5 to Ruby1.8.6](https://www.ruby-forum.com/t/how-can-install-tk8-5-to-ruby1-8-6/136147)

<div class="topic-metadata">

**Author:** [@try4rb](https://www.ruby-forum.com/u/try4rb)\
**Replies:** 4\
**Last updated:** [April 30, 2008, 4:11am UTC](https://www.ruby-forum.com/t/how-can-install-tk8-5-to-ruby1-8-6/136147 "2008-04-30T04:11:17Z")

</div>

I am a newbie for Ruby, I d/l one-click of Ruby1.8.6 and install ,then it well used, I have learn ruby with GUI pratice , and found that TK8.5 is available ,but after installation, I try to simple run code with RDE ed…

---

## [I broke the autotest :(](https://www.ruby-forum.com/t/i-broke-the-autotest/136250)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 0\
**Last updated:** [April 30, 2008, 3:35am UTC](https://www.ruby-forum.com/t/i-broke-the-autotest/136250 "2008-04-30T03:35:33Z")

</div>

johnp:link\_fixer John$ autotest loading autotest/rails\_rspec /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S script/spec -O spec/spec.opts script/spec:4:in \`run’: wrong number of arguments (5 f…

---

## [Transpose a large file(\>2GB)](https://www.ruby-forum.com/t/transpose-a-large-file-2gb/135976)

<div class="topic-metadata">

**Author:** [@amslonewolf](https://www.ruby-forum.com/u/amslonewolf)\
**Replies:** 17\
**Last updated:** [April 30, 2008, 2:41am UTC](https://www.ruby-forum.com/t/transpose-a-large-file-2gb/135976 "2008-04-30T02:41:12Z")

</div>

Hi - What is the fast and ruby way to transpose a large file(\>2GB)?? I can’t read the whole file into memory due to the file sizes…

---

## [Code Review: contributions6](https://www.ruby-forum.com/t/code-review-contributions6/136240)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 2\
**Last updated:** [April 30, 2008, 1:38am UTC](https://www.ruby-forum.com/t/code-review-contributions6/136240 "2008-04-30T01:38:38Z")

</div>

tfpt review /shelveset:contributions6;REDMOND\\jflam Ruby only This wraps up a number of community contributions into a single shelveset for expediency. This shelveset passed SNAP this morning. We are now passing 2011…

---

## [Help with the ".times" command in ruby](https://www.ruby-forum.com/t/help-with-the-times-command-in-ruby/136235)

<div class="topic-metadata">

**Author:** [@ghysnon](https://www.ruby-forum.com/u/ghysnon)\
**Replies:** 2\
**Last updated:** [April 30, 2008, 1:27am UTC](https://www.ruby-forum.com/t/help-with-the-times-command-in-ruby/136235 "2008-04-30T01:27:51Z")

</div>

Hey guys, I’m trying to run a section of my ruby script 5000 times. Can someone show me how to do this, as I have no programming experience. Once I log into the BDI-3000 via Telnet, I just need to loop the section of…

---

## [Managing a fork pool to handle tasks](https://www.ruby-forum.com/t/managing-a-fork-pool-to-handle-tasks/136224)

<div class="topic-metadata">

**Author:** [@advany](https://www.ruby-forum.com/u/advany)\
**Replies:** 6\
**Last updated:** [April 30, 2008, 12:54am UTC](https://www.ruby-forum.com/t/managing-a-fork-pool-to-handle-tasks/136224 "2008-04-30T00:54:20Z")

</div>

Hey guys, I am doing some background processes in ruby, and I would like to use forks. But I can’t figure out how I can manage them. I want to create a pool of child processes (forks) running in the background, limi…

---

## [How to debug Ruby Programs](https://www.ruby-forum.com/t/how-to-debug-ruby-programs/136143)

<div class="topic-metadata">

**Author:** [@kittu21](https://www.ruby-forum.com/u/kittu21)\
**Replies:** 11\
**Last updated:** [April 30, 2008, 12:03am UTC](https://www.ruby-forum.com/t/how-to-debug-ruby-programs/136143 "2008-04-30T00:03:14Z")

</div>

Hi, I’m a newbee to Ruby, can any one you please suggest me ways to debug a Ruby P… Regards, Kittu.

---

## [Re: Regarding IronRuby... How true it sounds from	this blog](https://www.ruby-forum.com/t/re-regarding-ironruby-how-true-it-sounds-from-this-blog/136087)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 13\
**Last updated:** [April 29, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/re-regarding-ironruby-how-true-it-sounds-from-this-blog/136087 "2008-04-29T23:17:28Z")

</div>

So, as the new guy on the other (MSFT) side of the fence, I am interested in all of these suggestions and ideas. In addition, I have some questions/suggestions for you. Would mirroring our internal repo on a commit-b…

---

## [Re: forkoff - parallel processing for ruby enumerables](https://www.ruby-forum.com/t/re-forkoff-parallel-processing-for-ruby-enumerables/135404)

<div class="topic-metadata">

**Author:** [@bhoult](https://www.ruby-forum.com/u/bhoult)\
**Replies:** 2\
**Last updated:** [April 29, 2008, 11:14pm UTC](https://www.ruby-forum.com/t/re-forkoff-parallel-processing-for-ruby-enumerables/135404 "2008-04-29T23:14:55Z")

</div>

I had some issues using active record objects inside the code block. It seems that activerecord does not allow concurrency by default, and I ended up with “MySQL server has gone away” messages as a result. I found a…

---

## [Hacking arrays](https://www.ruby-forum.com/t/hacking-arrays/136120)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 6\
**Last updated:** [April 29, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/hacking-arrays/136120 "2008-04-29T22:01:15Z")

</div>

The code: http://pastie.caboo.se/188207 The question: Why isn’t it doing them like nested folders? I’d like to get .----------------- | Parent folder | .------------------ | | child folder | | child files | |\_…

---

## [Mixins](https://www.ruby-forum.com/t/mixins/136145)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 5\
**Last updated:** [April 29, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/mixins/136145 "2008-04-29T21:05:14Z")

</div>

Hi guys!!! My question is: Is any way to define variables in module which can be further used in mixin? The problem is that module I wanted to include into class has constant variables defined which are used within f…

---

## [Converting HTML input data to pre-format XML data](https://www.ruby-forum.com/t/converting-html-input-data-to-pre-format-xml-data/136200)

<div class="topic-metadata">

**Author:** [@phillyman](https://www.ruby-forum.com/u/phillyman)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 8:58pm UTC](https://www.ruby-forum.com/t/converting-html-input-data-to-pre-format-xml-data/136200 "2008-04-29T20:58:08Z")

</div>

Hi All, I am really new to Ruby and here is my dilemma. I need to write a ruby-cgi (.rb) script that just spits back pre-formatted XML. Basically, my script would accomplish the following: a.) Read in your form varia…

---

## [Debugging with Test::Unit](https://www.ruby-forum.com/t/debugging-with-test-unit/136209)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 0\
**Last updated:** [April 29, 2008, 8:41pm UTC](https://www.ruby-forum.com/t/debugging-with-test-unit/136209 "2008-04-29T20:41:30Z")

</div>

I’d like to use a debugger (‘debug’, ‘ruby-debug’, or even irb) with Test::Unit. So far, the standard ‘debug’ seems to work best with Test::Unit, but breakpoints don’t seem to work very well (compared to ‘ruby-debug’…

---

## [Monkeybars has moved to Gitorious](https://www.ruby-forum.com/t/monkeybars-has-moved-to-gitorious/136207)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [April 29, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/monkeybars-has-moved-to-gitorious/136207 "2008-04-29T20:40:16Z")

</div>

The Monkeybars project repo has moved to Gitorious: http://gitorious.org/projects/monkeybars Project tracking is now on Google Code http://code.google.com/p/monkeybars-lib Monkeybars is the easiest, most enjoyable wa…

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

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