# Ruby

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

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

---

## [Question about split method](https://www.ruby-forum.com/t/question-about-split-method/130094)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 5\
**Last updated:** [March 16, 2009, 4:17pm UTC](https://www.ruby-forum.com/t/question-about-split-method/130094 "2009-03-16T16:17:00Z")

</div>

Hello, I’m wondering if there is a method for the String class that splits a string on some characters and keeps the split characters in the elements of the resulting array? The split method returns an array in this …

---

## [Commande % sudo apt-get install ruby irb rdoc](https://www.ruby-forum.com/t/commande-sudo-apt-get-install-ruby-irb-rdoc/162904)

<div class="topic-metadata">

**Author:** [@mosar](https://www.ruby-forum.com/u/mosar)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 2:50pm UTC](https://www.ruby-forum.com/t/commande-sudo-apt-get-install-ruby-irb-rdoc/162904 "2009-03-16T14:50:36Z")

</div>

N’ayant pas réussi à ce jour à utiliser convenablement irb (question des signes spéciaux comme @) j’ai décidé de charger Ubuntu sur mon PC.J’ai donc deux systèmes d’exploitation à disposition. Dans l’univers Window j’…

---

## [Does Ruby support package for GUI Testing?](https://www.ruby-forum.com/t/does-ruby-support-package-for-gui-testing/162962)

<div class="topic-metadata">

**Author:** [@ulrichmp](https://www.ruby-forum.com/u/ulrichmp)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/does-ruby-support-package-for-gui-testing/162962 "2009-03-16T14:33:02Z")

</div>

Hi, I would like to know if Ruby support some package for GUI Testing? My requirement is to test a .Net / C# based GUI application. Earlier I have used Ruby Watir for Web Testing. Please let me know on this Thanks, …

---

## [Rudamentary question](https://www.ruby-forum.com/t/rudamentary-question/162980)

<div class="topic-metadata">

**Author:** [@Hayden\_Smith](https://www.ruby-forum.com/u/Hayden_Smith)\
**Replies:** 3\
**Last updated:** [March 16, 2009, 1:56pm UTC](https://www.ruby-forum.com/t/rudamentary-question/162980 "2009-03-16T13:56:26Z")

</div>

Greetings, I’m looking to write a script to perform the functions listed as below, would anyone have any ideas as to how I might approach this situation: I have a file called “David Slater - Pensive Moments.txt” whic…

---

## [Daemons and Paths](https://www.ruby-forum.com/t/daemons-and-paths/162855)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [March 16, 2009, 1:51pm UTC](https://www.ruby-forum.com/t/daemons-and-paths/162855 "2009-03-16T13:51:43Z")

</div>

So I’ve written a daemon using the ‘daemons’ gem. I have essentially 3 pieces: daemon\_controller =\> Controls startup/shutdown of daemon (in the style of the first example of the daemons documentation) daemonized\_scr…

---

## [Routers and dot in string parameter](https://www.ruby-forum.com/t/routers-and-dot-in-string-parameter/162988)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 1:22pm UTC](https://www.ruby-forum.com/t/routers-and-dot-in-string-parameter/162988 "2009-03-16T13:22:57Z")

</div>

map.page ‘:sex/:word’, :controller =\> ‘say’, :requirements =\> { : sex =\> /girl|boy/ } So this works fine: http://mypage.com/say/boy/hello also this: http://mypage.com/say/girl/hello%20world but this: http://mypage…

---

## [Need help to install ROR with MS-SQL](https://www.ruby-forum.com/t/need-help-to-install-ror-with-ms-sql/162986)

<div class="topic-metadata">

**Author:** [@sankarkumar](https://www.ruby-forum.com/u/sankarkumar)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 12:54pm UTC](https://www.ruby-forum.com/t/need-help-to-install-ror-with-ms-sql/162986 "2009-03-16T12:54:32Z")

</div>

Hi, I have already installed ROR with sqlite & mysql . & now i need to have ROR with MSSQL. Here is my existing ROR details , actionmailer (2.2.2) actionpack (2.2.2) activerecord (2.2.2) activeresource (2.2.2) ac…

---

## [Adding new xml element with hpricot](https://www.ruby-forum.com/t/adding-new-xml-element-with-hpricot/162973)

<div class="topic-metadata">

**Author:** [@milo](https://www.ruby-forum.com/u/milo)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 11:21am UTC](https://www.ruby-forum.com/t/adding-new-xml-element-with-hpricot/162973 "2009-03-16T11:21:08Z")

</div>

I’ve got a lot of xml files that look something like this: some text some text an integer ... an integer ... more stuff There could be no “pref\_of\_interest” fields or there could be several. What I need to do is the …

---

## [Need basic help](https://www.ruby-forum.com/t/need-basic-help/162969)

<div class="topic-metadata">

**Author:** [@jazzezravi](https://www.ruby-forum.com/u/jazzezravi)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 11:11am UTC](https://www.ruby-forum.com/t/need-basic-help/162969 "2009-03-16T11:11:29Z")

</div>

Hi All, word=“busae” need: i want to get all possible words with above 5 letters. Ex: busae bsaue bueas . . . . . Etc… any help Regards, P.Raveendran

---

## [Climate Information Tool Kit](https://www.ruby-forum.com/t/climate-information-tool-kit/162965)

<div class="topic-metadata">

**Author:** [@Saji\_NSHameed](https://www.ruby-forum.com/u/Saji_NSHameed)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 10:11am UTC](https://www.ruby-forum.com/t/climate-information-tool-kit/162965 "2009-03-16T10:11:59Z")

</div>

Hi all folks interested in climate information, I am pleased to let you know of the release of the first version of the online web service, known as the Climate Information Tool Kit or CLIK (http://clik.apcc21.net). C…

---

## [Format number as currency in controller](https://www.ruby-forum.com/t/format-number-as-currency-in-controller/162961)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 9:57am UTC](https://www.ruby-forum.com/t/format-number-as-currency-in-controller/162961 "2009-03-16T09:57:10Z")

</div>

I am trying to prepare a string in a controller and that to format a number as a currency in that string. I can’t use number\_to\_currency as that only works in the view (as far as I can see) The kind of thing I want t…

---

## [Can't Install Ruby Builder](https://www.ruby-forum.com/t/cant-install-ruby-builder/162895)

<div class="topic-metadata">

**Author:** [@marcc](https://www.ruby-forum.com/u/marcc)\
**Replies:** 5\
**Last updated:** [March 16, 2009, 8:56am UTC](https://www.ruby-forum.com/t/cant-install-ruby-builder/162895 "2009-03-16T08:56:54Z")

</div>

Pretty new to ruby and trying to install Builder but not having much luck. If I try to install it via the RubyGems Package Manager I get the problem shown in the below image. Basically it says it installs, but gives…

---

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

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 8:10am UTC](https://www.ruby-forum.com/t/code-review-shrigitpull/162957 "2009-03-16T08:10:05Z")

</div>

tfpt review “/shelveset:shrigitpull;REDMOND\\jdeville” Comment : This shelveset is an external contribution from Shri. Tests have been modified by me. Added support to YAML.quick\_emit to be called on nested objects w…

---

## [Execle ruby process from C?](https://www.ruby-forum.com/t/execle-ruby-process-from-c/162922)

<div class="topic-metadata">

**Author:** [@Zouplaz](https://www.ruby-forum.com/u/Zouplaz)\
**Replies:** 5\
**Last updated:** [March 16, 2009, 5:53am UTC](https://www.ruby-forum.com/t/execle-ruby-process-from-c/162922 "2009-03-16T05:53:18Z")

</div>

Hello, I’m playing with a small http server written in C & Ruby CGI and there is something wrong if(execle("/usr/bin/ruby", “/usr/bin/ruby” " test.rb", NULL, NULL) == -1) { wlog(“error execle”); exit(EXIT\_FAILURE); …

---

## [Win32util packages on ruby1.9](https://www.ruby-forum.com/t/win32util-packages-on-ruby1-9/162828)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 5:08am UTC](https://www.ruby-forum.com/t/win32util-packages-on-ruby1-9/162828 "2009-03-16T05:08:18Z")

</div>

just installed ruby 1.9.1 on windows. and then installed win32util’s net-ping and popen3. but when i ran my script i get a popup that it is looking for msvcrt-ruby18.dll. Of course, it’s not there anymore since ruby…

---

## [Producer-Consumer problem](https://www.ruby-forum.com/t/producer-consumer-problem/162953)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 4:55am UTC](https://www.ruby-forum.com/t/producer-consumer-problem/162953 "2009-03-16T04:55:26Z")

</div>

Hi All, I am really struggling with a really intermittent bug. I have a thread pool set up in a producer-consumer fashion. General semantics are: initialize thread\_pool, with each thread waiting on a synchronized …

---

## [Assert2/xhtml specifies your HTML by example](https://www.ruby-forum.com/t/assert2-xhtml-specifies-your-html-by-example/162952)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 4:46am UTC](https://www.ruby-forum.com/t/assert2-xhtml-specifies-your-html-by-example/162952 "2009-03-16T04:46:06Z")

</div>

Rubies: assert\_xhtml now works with RSpec. (Call it “.should be\_html\_with{}” !) This is its Rails functional test aspect: get :edit\_user, :id =\> users(:Moses).id scope = self assert\_xhtml do form :action =\> '/u…

---

## [Ruby Internship](https://www.ruby-forum.com/t/ruby-internship/162942)

<div class="topic-metadata">

**Author:** [@kuzb](https://www.ruby-forum.com/u/kuzb)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 1:50am UTC](https://www.ruby-forum.com/t/ruby-internship/162942 "2009-03-16T01:50:43Z")

</div>

Hi, all, I’m a Computer Science junior at Stony Brook University. I’m looking for a summer internship for 2009. I’m looking for a small company or startup interested doing … cool things. I’m particularly interested…

---

## [Why do I need \\b in regular expression?](https://www.ruby-forum.com/t/why-do-i-need-b-in-regular-expression/162917)

<div class="topic-metadata">

**Author:** [@arghx1](https://www.ruby-forum.com/u/arghx1)\
**Replies:** 3\
**Last updated:** [March 16, 2009, 1:00am UTC](https://www.ruby-forum.com/t/why-do-i-need-b-in-regular-expression/162917 "2009-03-16T01:00:30Z")

</div>

Hello once again folks! OK, I’m still extremely new to Ruby, so if my question is stupid, please be gentle :). The code below is an example from a ruby book, and I look at it, I understand most of it, but what I don’…

---

## [Keep thread in memory](https://www.ruby-forum.com/t/keep-thread-in-memory/162936)

<div class="topic-metadata">

**Author:** [@Craig\_Williams](https://www.ruby-forum.com/u/Craig_Williams)\
**Replies:** 6\
**Last updated:** [March 15, 2009, 11:43pm UTC](https://www.ruby-forum.com/t/keep-thread-in-memory/162936 "2009-03-15T23:43:11Z")

</div>

Hi, I’m writing a simple UDP listening server. It works great using this PORT = 1234 server = UDPSocket.open server.bind(“127.0.0.1”, PORT) server\_thread = Thread.start(server) do |server| 100.times { #do something…

---

## [Problem With eval and each\_index](https://www.ruby-forum.com/t/problem-with-eval-and-each-index/162815)

<div class="topic-metadata">

**Author:** [@Michael\_WSRyder](https://www.ruby-forum.com/u/Michael_WSRyder)\
**Replies:** 9\
**Last updated:** [March 15, 2009, 11:21pm UTC](https://www.ruby-forum.com/t/problem-with-eval-and-each-index/162815 "2009-03-15T23:21:28Z")

</div>

I am trying to set a group of variables to values stored in a tab delimited string. I have no problem splitting the string into an array, call it e, or in putting the variable names in a second array, call it v. The…

---

## [New to ruby: uninitialized constant](https://www.ruby-forum.com/t/new-to-ruby-uninitialized-constant/162869)

<div class="topic-metadata">

**Author:** [@ammo](https://www.ruby-forum.com/u/ammo)\
**Replies:** 3\
**Last updated:** [March 15, 2009, 10:08pm UTC](https://www.ruby-forum.com/t/new-to-ruby-uninitialized-constant/162869 "2009-03-15T22:08:42Z")

</div>

I have a program the simulates the knights tour problem. I made 2 classes, 1 called ‘Location’ which simulates a location on a chess board and one called ‘KnightsTour’ which actually performs the knights tour. Then I…

---

## [Rspec 1.2.0 Released](https://www.ruby-forum.com/t/rspec-1-2-0-released/162921)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [March 15, 2009, 8:26pm UTC](https://www.ruby-forum.com/t/rspec-1-2-0-released/162921 "2009-03-15T20:26:31Z")

</div>

rspec version 1.2.0 has been released! Behaviour Driven Development for Ruby. Changes: Version 1.2.0 WARNINGS: If you use the ruby command to run specs instead of the spec command, you’ll need to require ‘spec/a…

---

## [Rhyming Words (#195)](https://www.ruby-forum.com/t/rhyming-words-195/162196)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 4\
**Last updated:** [March 15, 2009, 8:13pm UTC](https://www.ruby-forum.com/t/rhyming-words-195/162196 "2009-03-15T20:13:00Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this m…

---

## [Case when - symbols or strings?](https://www.ruby-forum.com/t/case-when-symbols-or-strings/162755)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 5\
**Last updated:** [March 15, 2009, 8:05pm UTC](https://www.ruby-forum.com/t/case-when-symbols-or-strings/162755 "2009-03-15T20:05:55Z")

</div>

Picture a small method which accepts one argument. Inside this method is simply a case/when menu, nothing else. The question I now have is … - should the argument be coerced to string or symbol? case argument.to\_sym v…

---

## [Can I tighten this up with block or eval?](https://www.ruby-forum.com/t/can-i-tighten-this-up-with-block-or-eval/162914)

<div class="topic-metadata">

**Author:** [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Replies:** 2\
**Last updated:** [March 15, 2009, 7:31pm UTC](https://www.ruby-forum.com/t/can-i-tighten-this-up-with-block-or-eval/162914 "2009-03-15T19:31:03Z")

</div>

I have here a class called ClassMaker whose greeter method returns an instance of anonymous class containing a hello method: class ClassMaker def initialize(s); @howdy = s; end def greeter c = Class.new do def init…

---

## [Has 'ping' been dropped from 1.9.1?](https://www.ruby-forum.com/t/has-ping-been-dropped-from-1-9-1/162877)

<div class="topic-metadata">

**Author:** [@john\_maclean](https://www.ruby-forum.com/u/john_maclean)\
**Replies:** 3\
**Last updated:** [March 15, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/has-ping-been-dropped-from-1-9-1/162877 "2009-03-15T19:10:03Z")

</div>

=begin RUBY\_REVISION =\> 21895 =end require ‘ping’ LoadError: no such file to load – ping from (irb):1:in \`require’ from (irb):1 – John M. 07739 171 531 MSc (DIC) Timezone: GMT

---

## [Basics of Require](https://www.ruby-forum.com/t/basics-of-require/162906)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 5\
**Last updated:** [March 15, 2009, 7:01pm UTC](https://www.ruby-forum.com/t/basics-of-require/162906 "2009-03-15T19:01:03Z")

</div>

I don’t have access to an instance of Ruby at the moment and I am not clear what is being said in The Ruby P.ming Language (Flanagan & Matsumoto). It says require code is executed immediately. It also says you can’t i…

---

## [How can I know if a program is running inside irb?](https://www.ruby-forum.com/t/how-can-i-know-if-a-program-is-running-inside-irb/162903)

<div class="topic-metadata">

**Author:** [@abc](https://www.ruby-forum.com/u/abc)\
**Replies:** 3\
**Last updated:** [March 15, 2009, 2:36pm UTC](https://www.ruby-forum.com/t/how-can-i-know-if-a-program-is-running-inside-irb/162903 "2009-03-15T14:36:12Z")

</div>

Hi, from a certain piece of code, how can I know if it’s been run inside irb, or just ruby. I’ve tried looking in the IRB rdoc, but haven’t found any relevant methods. Thanks in advance.

---

## [How do arrays in Ruby work?](https://www.ruby-forum.com/t/how-do-arrays-in-ruby-work/162851)

<div class="topic-metadata">

**Author:** [@woodzer](https://www.ruby-forum.com/u/woodzer)\
**Replies:** 4\
**Last updated:** [March 15, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/how-do-arrays-in-ruby-work/162851 "2009-03-15T13:35:43Z")

</div>

As in how they are organized behind the scenes. For example, if I say arr = \[1, 2, 3, 4\] arr.slice\[1\] Is it going to have to physically relocate everything after 2 in memory? Would using a linked list be more effici…

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

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