# Ruby

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

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

---

## [How to use fxri](https://www.ruby-forum.com/t/how-to-use-fxri/179384)

<div class="topic-metadata">

**Author:** [@taras](https://www.ruby-forum.com/u/taras)\
**Replies:** 4\
**Last updated:** [November 24, 2009, 9:47pm UTC](https://www.ruby-forum.com/t/how-to-use-fxri/179384 "2009-11-24T21:47:00Z")

</div>

hello, total newbie here. i have gem installed fxirb, fxri, and fxruby. now i’d like to open hopefully a standalone fxri interactive window. how do i do this? cheers, taras

---

## [Dispatcher.Invoke](https://www.ruby-forum.com/t/dispatcher-invoke/179432)

<div class="topic-metadata">

**Author:** [@Patrick\_Brown](https://www.ruby-forum.com/u/Patrick_Brown)\
**Replies:** 6\
**Last updated:** [November 24, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/dispatcher-invoke/179432 "2009-11-24T21:37:03Z")

</div>

Hello Is it possible to call the Control.Dispatcher.Invoke in IronRuby? I have been digging around and trying various approaches for quite a while and can’t quite seem to get it to work. The most simple example I b…

---

## [Issues with Kernel#select](https://www.ruby-forum.com/t/issues-with-kernel-select/179314)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 8\
**Last updated:** [November 24, 2009, 8:54pm UTC](https://www.ruby-forum.com/t/issues-with-kernel-select/179314 "2009-11-24T20:54:54Z")

</div>

Waking up a thread that is waiting in Kernel#select does not appear to work in ruby 1.9 Can someone please confirm that this is the case. Is this the intended behavior, or is this a bug? cat a.rb require ‘socket’ …

---

## [Welcome here](https://www.ruby-forum.com/t/welcome-here/179431)

<div class="topic-metadata">

**Author:** [@one4time](https://www.ruby-forum.com/u/one4time)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/welcome-here/179431 "2009-11-24T19:45:50Z")

</div>

http://www.smsvoip.co.cc

---

## [Ideas for a "parameter sweep" program?](https://www.ruby-forum.com/t/ideas-for-a-parameter-sweep-program/179376)

<div class="topic-metadata">

**Author:** [@diego\_v](https://www.ruby-forum.com/u/diego_v)\
**Replies:** 10\
**Last updated:** [November 24, 2009, 6:45pm UTC](https://www.ruby-forum.com/t/ideas-for-a-parameter-sweep-program/179376 "2009-11-24T18:45:33Z")

</div>

Hello, I often need to run my computational experiments with a combination of parameter values, and I was thinking of automatising it with Ruby. Any idea on what would be the best way to go about it? What would be th…

---

## [Best way to search through an array for an item matching a s](https://www.ruby-forum.com/t/best-way-to-search-through-an-array-for-an-item-matching-a-s/179369)

<div class="topic-metadata">

**Author:** [@dewie](https://www.ruby-forum.com/u/dewie)\
**Replies:** 7\
**Last updated:** [November 24, 2009, 6:34pm UTC](https://www.ruby-forum.com/t/best-way-to-search-through-an-array-for-an-item-matching-a-s/179369 "2009-11-24T18:34:51Z")

</div>

Hi everyone, am trying to find a nice easy/simple way to search through an array of strings match the string I’ve input use that index to print out the word before in the array. for example \[ahoy there,hello,me hea…

---

## [Game Development, anyone?](https://www.ruby-forum.com/t/game-development-anyone/179428)

<div class="topic-metadata">

**Author:** [@Eric\_Joe](https://www.ruby-forum.com/u/Eric_Joe)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 6:33pm UTC](https://www.ruby-forum.com/t/game-development-anyone/179428 "2009-11-24T18:33:51Z")

</div>

As someone who recently began recruiting for social games, I’ve noticed that many ruby on rails developers love games, but gravitate towards web development. Very few people realize that social games can essentially …

---

## [What is \_\_FILE\_\_ and $0? (newbie question)](https://www.ruby-forum.com/t/what-is-file-and-0-newbie-question/179390)

<div class="topic-metadata">

**Author:** [@tutiplain](https://www.ruby-forum.com/u/tutiplain)\
**Replies:** 4\
**Last updated:** [November 24, 2009, 3:48pm UTC](https://www.ruby-forum.com/t/what-is-file-and-0-newbie-question/179390 "2009-11-24T15:48:47Z")

</div>

Hello everyone, I am new to Ruby, learning the basics, and the basics of FXRuby (I know this is not the FXRuby forum, but I think this question pertains Ruby per se). I’ve noticed the “recommended” way of creating th…

---

## [More on psuedo arrays; Better way?](https://www.ruby-forum.com/t/more-on-psuedo-arrays-better-way/179354)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 14\
**Last updated:** [November 24, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/more-on-psuedo-arrays-better-way/179354 "2009-11-24T15:25:28Z")

</div>

Newbie here: Consider: N\_X\_METHODS = 20 class X 20.times do |i| define\_method “x%02d=” % i do |arg| # the puts, below, is just a placeholder for a more complicated method puts "Hi " + i.to\_s + arg.to\_s end end …

---

## [Simple Ruby Project](https://www.ruby-forum.com/t/simple-ruby-project/179410)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 4\
**Last updated:** [November 24, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/simple-ruby-project/179410 "2009-11-24T15:07:42Z")

</div>

Hello all, I’ve just started with Ruby and decided to do a little project. Since this is my first time doing something related with the internet, I could sure use some guidelines. Let me first tell you what my projec…

---

## [How i can jump from one line to another line](https://www.ruby-forum.com/t/how-i-can-jump-from-one-line-to-another-line/179379)

<div class="topic-metadata">

**Author:** [@sql\_injection](https://www.ruby-forum.com/u/sql_injection)\
**Replies:** 3\
**Last updated:** [November 24, 2009, 1:36pm UTC](https://www.ruby-forum.com/t/how-i-can-jump-from-one-line-to-another-line/179379 "2009-11-24T13:36:30Z")

</div>

hi How i can jump from one line to another line ?? for exaple i have 7 line codes like here: line 1: code line 2: code line 3: code line 4: code line 5: code line 6: code line 7: code no i wanna know when line …

---

## [Programming ruby 1.9- question on page 37](https://www.ruby-forum.com/t/programming-ruby-1-9-question-on-page-37/179406)

<div class="topic-metadata">

**Author:** [@4895](https://www.ruby-forum.com/u/4895)\
**Replies:** 2\
**Last updated:** [November 24, 2009, 12:01pm UTC](https://www.ruby-forum.com/t/programming-ruby-1-9-question-on-page-37/179406 "2009-11-24T12:01:34Z")

</div>

not sure what to do which that code at the bottom of page 37. I enter this code into the command prompt and obviously that isn’t right. I created the folder that I was told to before but I can’t remember it though I d…

---

## [Eventmachine](https://www.ruby-forum.com/t/eventmachine/179293)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 2\
**Last updated:** [November 24, 2009, 11:40am UTC](https://www.ruby-forum.com/t/eventmachine/179293 "2009-11-24T11:40:37Z")

</div>

Anybody wanna join in getting eventmachine working on IronRuby? We can probably do 1 better than the C based implementation on windows simply because .NET has all the necessary classes and exposes the events we need. …

---

## [String::gsub$B$K$\*$1$k(Binvalid byte sequence$B$N8!=P$K$D$$$F(B](https://www.ruby-forum.com/t/string-gsub-b-k-1-k-binvalid-byte-sequence-b-n8-p-k-d-f-b/179247)

<div class="topic-metadata">

**Author:** [@TAKEGAWA\_Hiroshi](https://www.ruby-forum.com/u/TAKEGAWA_Hiroshi)\
**Replies:** 6\
**Last updated:** [November 24, 2009, 11:12am UTC](https://www.ruby-forum.com/t/string-gsub-b-k-1-k-binvalid-byte-sequence-b-n8-p-k-d-f-b/179247 "2009-11-24T11:12:32Z")

</div>

ç«¹å·ã¨ç”³ã—ã¾ã™ã€‚ ruby 1.9ã§ã€ã‚ã‚‹UTF-8ã®Stringã«å¯¾ã—ã¦gsubã‚’å‘¼ã³å‡ºã—ãŸã¨ã“ã‚ã€ä»¥ä¸‹ã®ã‚¨ ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ã€‚ $ cat sample/testdata.txt | ruby sample/gsub.rb sample/gsub.rb:5:in gsub'…

---

## [\[Bug #2390\] Marshal.dump pass a hidden object](https://www.ruby-forum.com/t/bug-2390-marshal-dump-pass-a-hidden-object/179249)

<div class="topic-metadata">

**Author:** [@SSwanabe](https://www.ruby-forum.com/u/SSwanabe)\
**Replies:** 4\
**Last updated:** [November 24, 2009, 10:44am UTC](https://www.ruby-forum.com/t/bug-2390-marshal-dump-pass-a-hidden-object/179249 "2009-11-24T10:44:26Z")

</div>

Bug #2390: Marshal.dump pass a hidden object http://redmine.ruby-lang.org/issues/show/2390 e$B5/I\<\<Te(B: \_ wanabe e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low e$B%+%F%4%je(B: core ruby -v: ruby 1.9.2dev (2009-11-20 tru…

---

## [RubyGems current load paths](https://www.ruby-forum.com/t/rubygems-current-load-paths/179263)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 6\
**Last updated:** [November 24, 2009, 8:42am UTC](https://www.ruby-forum.com/t/rubygems-current-load-paths/179263 "2009-11-24T08:42:08Z")

</div>

Hi– I need to get a list of the “current” gem load paths. I learned that I can get a list of all the latest load paths via: Gem.latest\_load\_paths which is great. But lets say I specify an older version of a lib, eg: …

---

## [Mechanize Help](https://www.ruby-forum.com/t/mechanize-help/179371)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 2\
**Last updated:** [November 24, 2009, 7:11am UTC](https://www.ruby-forum.com/t/mechanize-help/179371 "2009-11-24T07:11:22Z")

</div>

I checked out the page response, and this is what I got back page.response =\> {“cache-control”=\>“private”, “connection”=\>“close”, “p3p”=\>“policyref="http://p3p.yahoo.com/w3c/p3p.xml\\”, CP="CAO DSP COR CUR ADM DEV T…

---

## [Re\_template 0.0.1.2](https://www.ruby-forum.com/t/re-template-0-0-1-2/179403)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 6:44am UTC](https://www.ruby-forum.com/t/re-template-0-0-1-2/179403 "2009-11-24T06:44:29Z")

</div>

A very simple template engine based on Regular Expressions. gem install re\_template or No meaningful changes, or changelog. From the README: Features Regular expressions or plain text Can be used for HTML-\>HTML (…

---

## [Nokogiri help](https://www.ruby-forum.com/t/nokogiri-help/179117)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 4\
**Last updated:** [November 24, 2009, 6:35am UTC](https://www.ruby-forum.com/t/nokogiri-help/179117 "2009-11-24T06:35:04Z")

</div>

I keep getting this error “encoding error : output conversion failed due to conv error, bytes 0xA0 0x69 0x64 0xC2 I/O error : encoder error” whenever I try to append my html string to Nokogiri::HTML. When I write th…

---

## [JRuby-Rack JMS support - RubyThread leak](https://www.ruby-forum.com/t/jruby-rack-jms-support-rubythread-leak/179050)

<div class="topic-metadata">

**Author:** [@sumwutdum](https://www.ruby-forum.com/u/sumwutdum)\
**Replies:** 4\
**Last updated:** [November 24, 2009, 6:27am UTC](https://www.ruby-forum.com/t/jruby-rack-jms-support-rubythread-leak/179050 "2009-11-24T06:27:31Z")

</div>

Hi, We’ve been using the JRuby-Rack JMS support in production for while now, since JRuby 1.1.6. It’s a Rails app running in Glassfish which additionally receives messages from ActiveMQ. It works well, but we’ve alway…

---

## [\[Bug #2369\] ENV's strange behavior on WinXP](https://www.ruby-forum.com/t/bug-2369-envs-strange-behavior-on-winxp/179397)

<div class="topic-metadata">

**Author:** [@Usaku\_NAKAMURA](https://www.ruby-forum.com/u/Usaku_NAKAMURA)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 5:23am UTC](https://www.ruby-forum.com/t/bug-2369-envs-strange-behavior-on-winxp/179397 "2009-11-24T05:23:44Z")

</div>

e$B%A%1%C%He(B #2369 e$B$,99?7$5$l$^$7$?!#e(B (by Usaku NAKAMURA) (e$BC1$J$k%a%b$G$9e(B) Vistae$B$G$bLdBj$J$7!#e(B e$BBP1~$9$Y$-$+$I$&$+HyL/$K$J$C$F$-$^$7$?!#e(B http://redmine.ruby-lang.org/issues/show/2369

---

## [Rubygems 1.3.5 can't load 'rubygems/defaults/operating\_sy..'](https://www.ruby-forum.com/t/rubygems-1-3-5-cant-load-rubygems-defaults-operating-sy/179392)

<div class="topic-metadata">

**Author:** [@erubin](https://www.ruby-forum.com/u/erubin)\
**Replies:** 3\
**Last updated:** [November 24, 2009, 3:15am UTC](https://www.ruby-forum.com/t/rubygems-1-3-5-cant-load-rubygems-defaults-operating-sy/179392 "2009-11-24T03:15:53Z")

</div>

Hello, I had troubles using net-ssh gem and when debugged my script it raised the following: $ruby -dw sshtry.rb Exception LoadError' at /usr/lib/ruby/1.8/rubygems.rb:1113 - no such file to load -- rubygems/defaults/…

---

## [Code Review: CV](https://www.ruby-forum.com/t/code-review-cv/179395)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 2:55am UTC](https://www.ruby-forum.com/t/code-review-cv/179395 "2009-11-24T02:55:04Z")

</div>

tfpt review “/shelveset:CV;REDMOND\\tomat” Comment : Shri’s fix to ConditionalVariable: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3151. Tomas

---

## [Printing from Ruby](https://www.ruby-forum.com/t/printing-from-ruby/179387)

<div class="topic-metadata">

**Author:** [@Seebs](https://www.ruby-forum.com/u/Seebs)\
**Replies:** 3\
**Last updated:** [November 24, 2009, 2:45am UTC](https://www.ruby-forum.com/t/printing-from-ruby/179387 "2009-11-24T02:45:42Z")

</div>

Long story short: I wanted to make pretty-printed stuff. I have, after several hours, gotten something that can produce acceptable output by rendering as HTML, which I then run through Firefox – with five mostly und…

---

## [Code Review: Loops20](https://www.ruby-forum.com/t/code-review-loops20/179391)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 2:00am UTC](https://www.ruby-forum.com/t/code-review-loops20/179391 "2009-11-24T02:00:03Z")

</div>

tfpt review “/shelveset:Loops20;REDMOND\\tomat” Implements adaptive loop compilation. This feature needed major changes to local variable handling and control flow implementation in interpreter. Local variables Repla…

---

## [Rubygems 1.3.5 can't load 'rubygems/defaults/operating\_sy..'](https://www.ruby-forum.com/t/rubygems-1-3-5-cant-load-rubygems-defaults-operating-sy/179388)

<div class="topic-metadata">

**Author:** [@erubin](https://www.ruby-forum.com/u/erubin)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 1:54am UTC](https://www.ruby-forum.com/t/rubygems-1-3-5-cant-load-rubygems-defaults-operating-sy/179388 "2009-11-24T01:54:22Z")

</div>

Hello, I had troubles using net-ssh gem and when debugged my script it raised the following: $ruby -dw sshtry.rb Exception LoadError' at /usr/lib/ruby/1.8/rubygems.rb:1113 - no such file to load -- rubygems/defaults/…

---

## [Mail Gem version 1.3.0](https://www.ruby-forum.com/t/mail-gem-version-1-3-0/179389)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 1:31am UTC](https://www.ruby-forum.com/t/mail-gem-version-1-3-0/179389 "2009-11-24T01:31:57Z")

</div>

So, mail Gem version 1.3.0 has been released. The upgrades have been mainly in getting ActionMailer to work with Mail instead of TMail. This really put Mail through it’s paces and I found a lot of little edge case bu…

---

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

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [November 24, 2009, 1:30am UTC](https://www.ruby-forum.com/t/code-review-glob3/179386 "2009-11-24T01:30:12Z")

</div>

tfpt review “/shelveset:glob3;REDMOND\\tomat” Enables FxCop rules in Globalization group for Ruby assemblies and fixes all violations. Tomas

---

## [How to alias\_method\_chain initialize from a mixin](https://www.ruby-forum.com/t/how-to-alias-method-chain-initialize-from-a-mixin/179327)

<div class="topic-metadata">

**Author:** [@evansenter](https://www.ruby-forum.com/u/evansenter)\
**Replies:** 2\
**Last updated:** [November 24, 2009, 1:05am UTC](https://www.ruby-forum.com/t/how-to-alias-method-chain-initialize-from-a-mixin/179327 "2009-11-24T01:05:26Z")

</div>

Hi, I’ve been having a little trouble the past couple days getting an alias\_method\_chain working on the initialize method via a module getting mixed into a class. For example: module Dsl def self.included(base) ba…

---

## [RubyInline - passing pointer from one function to another](https://www.ruby-forum.com/t/rubyinline-passing-pointer-from-one-function-to-another/179255)

<div class="topic-metadata">

**Author:** [@Marcin\_L](https://www.ruby-forum.com/u/Marcin_L)\
**Replies:** 3\
**Last updated:** [November 24, 2009, 12:18am UTC](https://www.ruby-forum.com/t/rubyinline-passing-pointer-from-one-function-to-another/179255 "2009-11-24T00:18:47Z")

</div>

Hi, I’m trying to write ruby interface to JACK audio library. I’ve chosen RubyInline due it’s simplicity. What I want to achieve is to have ruby code like this: client = JACK::Client.new “my\_name” puts client.get\_sa…

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

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