# Ruby

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

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

---

## [Re: Hpricot and xpath](https://www.ruby-forum.com/t/re-hpricot-and-xpath/145704)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 1\
**Last updated:** [August 13, 2008, 6:19am UTC](https://www.ruby-forum.com/t/re-hpricot-and-xpath/145704 "2008-08-13T06:19:48Z")

</div>

Subject: Re: Hpricot and xpath tag1.rb:6: undefined method \`xpath’ for nil:NilClass (NoMethodError) Do you see the nil in that line? Where is the nil coming from? Is the method before the .xpath, on line 6, possibly …

---

## [What's wrong with "exec"?](https://www.ruby-forum.com/t/whats-wrong-with-exec/145687)

<div class="topic-metadata">

**Author:** [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Replies:** 1\
**Last updated:** [August 13, 2008, 3:36am UTC](https://www.ruby-forum.com/t/whats-wrong-with-exec/145687 "2008-08-13T03:36:11Z")

</div>

Hi, there I use NETBEAN IDE 6.1. I tried to run CCC.exe by calling exec. But, don’t know why it keeps throwing error message, “C:\\Documents and Settings\\cheynel\\My Documents\\NetBeansProjects\\task1\\lib\\fexc.rb:8: No …

---

## [Sigh! I'm depressed. Debian vs Ruby and the backtick and subshells](https://www.ruby-forum.com/t/sigh-im-depressed-debian-vs-ruby-and-the-backtick-and-subshells/145620)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 19\
**Last updated:** [August 13, 2008, 1:58am UTC](https://www.ruby-forum.com/t/sigh-im-depressed-debian-vs-ruby-and-the-backtick-and-subshells/145620 "2008-08-13T01:58:08Z")

</div>

I have just strace’d weird bug to it’s root cause. For decades bash was the “sh” of choice for linux systems. Then somebody threw some money at the Debian foundation to make Debian boot faster. The solution was to tw…

---

## [WIN32OLE -- cannot terminate Excel process](https://www.ruby-forum.com/t/win32ole-cannot-terminate-excel-process/145671)

<div class="topic-metadata">

**Author:** [@djlewis](https://www.ruby-forum.com/u/djlewis)\
**Replies:** 8\
**Last updated:** [August 13, 2008, 1:56am UTC](https://www.ruby-forum.com/t/win32ole-cannot-terminate-excel-process/145671 "2008-08-13T01:56:58Z")

</div>

I’ve read all the forum stuff on getting the Excel process to terminate. Yet the following code does not do that – Excel.exe remains in task manager… excel = WIN32OLE::new(‘excel.Application’) ewb = excel.workbooks.a…

---

## [BSF scripting - setting "$\_" from Java?](https://www.ruby-forum.com/t/bsf-scripting-setting-from-java/145694)

<div class="topic-metadata">

**Author:** [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Replies:** 1\
**Last updated:** [August 13, 2008, 12:58am UTC](https://www.ruby-forum.com/t/bsf-scripting-setting-from-java/145694 "2008-08-13T00:58:53Z")

</div>

I have a number of useful ‘.rb’ script for processing text files (in an old fashioned ‘awk’ sort of way :wink: ) : I would like to be run these from JRuby…without modification if possible - having trouble setting up t…

---

## [Non-Threaded Timeout?](https://www.ruby-forum.com/t/non-threaded-timeout/145376)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 29\
**Last updated:** [August 13, 2008, 12:50am UTC](https://www.ruby-forum.com/t/non-threaded-timeout/145376 "2008-08-13T00:50:14Z")

</div>

Hell all, I’m looking for a way to implement a non-threaded timeout. I am running some Monte Carlo simulations using an external application via an OLE interface. There are times where the external application seems…

---

## [Code Review: finishremovesigning-1](https://www.ruby-forum.com/t/code-review-finishremovesigning-1/145690)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 0\
**Last updated:** [August 13, 2008, 12:11am UTC](https://www.ruby-forum.com/t/code-review-finishremovesigning-1/145690 "2008-08-13T00:11:34Z")

</div>

This finishes off a bunch of work that removes the need to delay-sign anything for local builds done by folks using the external layout (ie SVN). No skip verification is required, and everything now works without the …

---

## [ActiveRecord error with Rails 2.1.0 using include statement](https://www.ruby-forum.com/t/activerecord-error-with-rails-2-1-0-using-include-statement/196777)

<div class="topic-metadata">

**Author:** [@staypufd](https://www.ruby-forum.com/u/staypufd)\
**Replies:** 2\
**Last updated:** [August 12, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/activerecord-error-with-rails-2-1-0-using-include-statement/196777 "2008-08-12T23:26:30Z")

</div>

I updated to Rails 2.1.0 and I’m getting an ActiveRecord::StatementInvalid error on an sql query that was working on the previous version. A simple call with and include getting data from 2 tables. I’m not sure why th…

---

## [How do i stop a block being passed on?](https://www.ruby-forum.com/t/how-do-i-stop-a-block-being-passed-on/145621)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [August 12, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/how-do-i-stop-a-block-being-passed-on/145621 "2008-08-12T23:25:52Z")

</div>

Hello friends, Im writing a ruby C API program, and i have this difficulty: VALUE m\_func1(VALUE self) { m\_func2(); } the problem i have is that if a block is passed to m\_func1 it seems to also be passed onto m\_fu…

---

## [Hpricot and xpath](https://www.ruby-forum.com/t/hpricot-and-xpath/145673)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 9\
**Last updated:** [August 12, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/hpricot-and-xpath/145673 "2008-08-12T22:59:32Z")

</div>

Hi all, I want to find the path to a tag I am interested using hpricot. According to the document and examples I think I should use #xpath method. I expect that ruby will return the path as this: “/tag1/tag2/div\[@id…

---

## [How do I unsplat something?](https://www.ruby-forum.com/t/how-do-i-unsplat-something/145667)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 9\
**Last updated:** [August 12, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/how-do-i-unsplat-something/145667 "2008-08-12T22:02:41Z")

</div>

Hi, Is there any easy to unsplat an item? ie. 1 becomes \[1\] \[2,3\] remains \[2,3\] ? so far i found: a = \*\[1\] \*b = \*a #=\> \[1\] a = \*\[1,2\] \*b = \*a #=\> \[1,2\] but this doesn’t work if a is a hash, because hash over…

---

## [Interactive Rake Tasks](https://www.ruby-forum.com/t/interactive-rake-tasks/145661)

<div class="topic-metadata">

**Author:** [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Replies:** 6\
**Last updated:** [August 12, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/interactive-rake-tasks/145661 "2008-08-12T21:59:14Z")

</div>

Anyone have a guide or a good example gem/rake task that prompts the user for input and does logic based on it? I want to write an interactive installer for a plugin.

---

## [Extract value of the hpricot elem](https://www.ruby-forum.com/t/extract-value-of-the-hpricot-elem/145672)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 1\
**Last updated:** [August 12, 2008, 9:30pm UTC](https://www.ruby-forum.com/t/extract-value-of-the-hpricot-elem/145672 "2008-08-12T21:30:57Z")

</div>

url=“http://www.nasdaq.com/aspxcontent/shortinterests.aspx? symbol=FRE&selected=FRE” doc=open(url) {|f| Hpricot(f)} doc.search(“//table\[@class=‘dataGrid’\]”) rqTable=doc.search(“//table\[@class=‘dataGrid’\]”) rqTable.s…

---

## [Store data in join table](https://www.ruby-forum.com/t/store-data-in-join-table/145642)

<div class="topic-metadata">

**Author:** [@ganeshk](https://www.ruby-forum.com/u/ganeshk)\
**Replies:** 3\
**Last updated:** [August 12, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/store-data-in-join-table/145642 "2008-08-12T20:24:06Z")

</div>

Hi, I have one join table called for example “students\_subjects” and i am having relationship like in student model :has\_many=\>subjects ,:through=\>students\_departments in subjects table :has\_many=\>students ,:thro…

---

## [Rake gems install with local .gem files](https://www.ruby-forum.com/t/rake-gems-install-with-local-gem-files/145652)

<div class="topic-metadata">

**Author:** [@gsterndale](https://www.ruby-forum.com/u/gsterndale)\
**Replies:** 1\
**Last updated:** [August 12, 2008, 8:06pm UTC](https://www.ruby-forum.com/t/rake-gems-install-with-local-gem-files/145652 "2008-08-12T20:06:28Z")

</div>

Hi All, I’d like to take advantage of Rails 2.1 config.gem and rake gems install when deploying (with Capistrano). Unfortunately, outgoing HTTP is blocked in our production environment. I’m considering keeping a dire…

---

## [Exiting .each early](https://www.ruby-forum.com/t/exiting-each-early/145668)

<div class="topic-metadata">

**Author:** [@myrddine](https://www.ruby-forum.com/u/myrddine)\
**Replies:** 2\
**Last updated:** [August 12, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/exiting-each-early/145668 "2008-08-12T19:54:52Z")

</div>

I want to return part of a sorted array efficiently. The built in iterators will search the entire array, but since I know it’s sorted, I only need to collect the items up until they stop being in range. However, its …

---

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

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 5\
**Last updated:** [August 12, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/help-with-mechanize/145118 "2008-08-12T19:28:56Z")

</div>

I’m using mechanize to log into this form. The redirects aren’t going where I would expect them to though. I don’t think i’m being logged in properly, yet when I try it through the web browser I get logged in normal. …

---

## [Problems with accessing directory defined in ENV variables](https://www.ruby-forum.com/t/problems-with-accessing-directory-defined-in-env-variables/145603)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 9\
**Last updated:** [August 12, 2008, 7:04pm UTC](https://www.ruby-forum.com/t/problems-with-accessing-directory-defined-in-env-variables/145603 "2008-08-12T19:04:55Z")

</div>

Ruby is giving me pure hell trying to access directories on a mounted drive. Our network puts certain files on a temporary drive defined in our .profile file I’m running HP UX/11). If I ask for puts ENV\[‘TMPDIR’\], it…

---

## [Rubyforge web page search engine features](https://www.ruby-forum.com/t/rubyforge-web-page-search-engine-features/145618)

<div class="topic-metadata">

**Author:** [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Replies:** 3\
**Last updated:** [August 12, 2008, 5:04pm UTC](https://www.ruby-forum.com/t/rubyforge-web-page-search-engine-features/145618 "2008-08-12T17:04:03Z")

</div>

People: I can’t tell you how much I appreciate the significance of http://rubyforge.org site. I’m very grateful to the kind people maintaining it. I have one concern, though… have you tried the search feature of the …

---

## [Selenium and Selenium RC training in London](https://www.ruby-forum.com/t/selenium-and-selenium-rc-training-in-london/196778)

<div class="topic-metadata">

**Author:** [@webtester](https://www.ruby-forum.com/u/webtester)\
**Replies:** 0\
**Last updated:** [August 12, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/selenium-and-selenium-rc-training-in-london/196778 "2008-08-12T16:31:48Z")

</div>

On an Average a tester with Selenium skill sets earns 200£+ per day and even the hiring prospects of a tester increases drastically if you have open source test automation tools on your cv. If you want to break into w…

---

## [Selenium and Selenium RC training in London](https://www.ruby-forum.com/t/selenium-and-selenium-rc-training-in-london/145654)

<div class="topic-metadata">

**Author:** [@webtester](https://www.ruby-forum.com/u/webtester)\
**Replies:** 0\
**Last updated:** [August 12, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/selenium-and-selenium-rc-training-in-london/145654 "2008-08-12T16:30:38Z")

</div>

On an Average a tester with Selenium skill sets earns 200£+ per day and even the hiring prospects of a tester increases drastically if you have open source test automation tools on your cv. If you want to break into w…

---

## [Visualizing in-memory objects?](https://www.ruby-forum.com/t/visualizing-in-memory-objects/145643)

<div class="topic-metadata">

**Author:** [@Casimir](https://www.ruby-forum.com/u/Casimir)\
**Replies:** 2\
**Last updated:** [August 12, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/visualizing-in-memory-objects/145643 "2008-08-12T16:13:35Z")

</div>

Object persistence, transparent, is something that I much desire. However, I have nowhere near enough understanding on how objects behave in memory. To learn more I thought it would be cool to write something to visua…

---

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

<div class="topic-metadata">

**Author:** [@ford](https://www.ruby-forum.com/u/ford)\
**Replies:** 1\
**Last updated:** [August 12, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/ruby/145644 "2008-08-12T15:18:58Z")

</div>

Ruby is a dynamic, reflective, general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was initially d…

---

## [If expression within a thread](https://www.ruby-forum.com/t/if-expression-within-a-thread/145547)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 3\
**Last updated:** [August 12, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/if-expression-within-a-thread/145547 "2008-08-12T14:45:51Z")

</div>

Hi, I am using Watir and Autoit (win32 test tool) Here is my code autoit = WIN32OLE.new("AutoItX3.Control") t = Thread.new(autoit) { if autoit.WinWait("Authentication Required", "", 5) == 1 autoit.Send(userna…

---

## [I'm a beginner, where should I go to?](https://www.ruby-forum.com/t/im-a-beginner-where-should-i-go-to/145641)

<div class="topic-metadata">

**Author:** [@ben](https://www.ruby-forum.com/u/ben)\
**Replies:** 6\
**Last updated:** [August 12, 2008, 2:32pm UTC](https://www.ruby-forum.com/t/im-a-beginner-where-should-i-go-to/145641 "2008-08-12T14:32:21Z")

</div>

hi After working with some ruby projects and playing with existing sources I decided to finally get my hands dirty. It’s an interesting experiences with similarities of learning a human language where your comprehens…

---

## [NEWBIE eruby basic form problem](https://www.ruby-forum.com/t/newbie-eruby-basic-form-problem/145610)

<div class="topic-metadata">

**Author:** [@woodzer](https://www.ruby-forum.com/u/woodzer)\
**Replies:** 2\
**Last updated:** [August 12, 2008, 2:28pm UTC](https://www.ruby-forum.com/t/newbie-eruby-basic-form-problem/145610 "2008-08-12T14:28:36Z")

</div>

I’m trying to capture comments from a textarea field to add to a database but I cannot figure out how to deal with escaping the data. Your Comment: Is there something I can do to "\<%=comment%\>" to…

---

## [Ruby 1.8.7-p72 / 1.8.6-p287 released (Security Fix)](https://www.ruby-forum.com/t/ruby-1-8-7-p72-1-8-6-p287-released-security-fix/145509)

<div class="topic-metadata">

**Author:** [@Urabe\_S](https://www.ruby-forum.com/u/Urabe_S)\
**Replies:** 1\
**Last updated:** [August 12, 2008, 12:55pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-p72-1-8-6-p287-released-security-fix/145509 "2008-08-12T12:55:38Z")

</div>

Sorry for a fuss, but it turned out that taintness check of dl in last releases I made was incomplete. Here are fixes for that. Released tarballes are available at: ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p287…

---

## [How Pretty is your code?](https://www.ruby-forum.com/t/how-pretty-is-your-code/145565)

<div class="topic-metadata">

**Author:** [@wujciol](https://www.ruby-forum.com/u/wujciol)\
**Replies:** 3\
**Last updated:** [August 12, 2008, 12:37pm UTC](https://www.ruby-forum.com/t/how-pretty-is-your-code/145565 "2008-08-12T12:37:33Z")

</div>

I’ve just uploaded my new ruby project Pretty. It’s simple tool to check your code. In release 0.1 it checks: 1st line for shebang how long are lines, how many tabulations you use, do you use ; In next release i’ll a…

---

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

<div class="topic-metadata">

**Author:** [@jazzezravi](https://www.ruby-forum.com/u/jazzezravi)\
**Replies:** 3\
**Last updated:** [August 12, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/need-sort-help/145638 "2008-08-12T12:30:58Z")

</div>

Hi All, a=\[\[“raja”,1\],\[“Arun”,5\],\[“babu”,3\]\] I want to sort 1,3,5 So i expect output in this order → raja, babu, arun Any methods available for this ? Regards, P.Raveendran RF,Chennai

---

## [Netbeans and Gems](https://www.ruby-forum.com/t/netbeans-and-gems/145611)

<div class="topic-metadata">

**Author:** [@delphiguy](https://www.ruby-forum.com/u/delphiguy)\
**Replies:** 3\
**Last updated:** [August 12, 2008, 11:17am UTC](https://www.ruby-forum.com/t/netbeans-and-gems/145611 "2008-08-12T11:17:14Z")

</div>

Cheers, Newbie here. I’m trying to learn Ruby so I downloaded NetBeans 6.1 and give it a try, I must admit I kinda liked it. However, when trying to install Gems and/or Update them via Tools -\> Ruby Gems I always …

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

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