# Ruby

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

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

---

## [FasterCVS Question/Problem](https://www.ruby-forum.com/t/fastercvs-question-problem/152731)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 3\
**Last updated:** [November 7, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/fastercvs-question-problem/152731 "2008-11-07T21:59:11Z")

</div>

Hello- I’m using FasterCSV to export order records for our fulfillment partner. Here’s a boiled-down snippet of my code: FasterCSV.open(filename, “w”, :encoding =\> ‘N’) do |csv| orders.each do |order| order.items.ea…

---

## [How to operate on 2 arrays simultaneously?](https://www.ruby-forum.com/t/how-to-operate-on-2-arrays-simultaneously/148225)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 18\
**Last updated:** [November 7, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/how-to-operate-on-2-arrays-simultaneously/148225 "2008-11-07T21:54:50Z")

</div>

There has got to be a more elegant solution than this. Suppose I have 2 identical length arrays that I want to add together to produce a third array. The best solution I’ve come up with is: c = (0…a.size).map {|i| a…

---

## [About Native geocoder](https://www.ruby-forum.com/t/about-native-geocoder/152829)

<div class="topic-metadata">

**Author:** [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/about-native-geocoder/152829 "2008-11-07T21:24:35Z")

</div>

Does somebody know about an native implementation of a geocoder in Ruby? Something similar to this =\> http://www.developer.com/xml/article.php/3557171 I have tried geocoder,yahoo-geocode, etc… I need to pass through …

---

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

<div class="topic-metadata">

**Author:** [@Seo\_S](https://www.ruby-forum.com/u/Seo_S)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/code-review-rakefix1/152763 "2008-11-07T21:17:33Z")

</div>

Attached patch fixes (well, at least a bit of) Rake build. In particular, this patch fixes get\_case\_sensitive\_path to actually work. Current code does p.downcase.to\_s == filename, which assumes filename is already dow…

---

## [How can i get the text of entry in TK?](https://www.ruby-forum.com/t/how-can-i-get-the-text-of-entry-in-tk/152758)

<div class="topic-metadata">

**Author:** [@slaughter](https://www.ruby-forum.com/u/slaughter)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/how-can-i-get-the-text-of-entry-in-tk/152758 "2008-11-07T20:40:32Z")

</div>

hi everyone! I want to get the text of entry in TK,when run the script,I input the value “test” in the entry,but click the button “get”,It just show the value “Null”,not the value “test” which is except. what is the…

---

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

<div class="topic-metadata">

**Author:** [@hyderabadblues](https://www.ruby-forum.com/u/hyderabadblues)\
**Replies:** 4\
**Last updated:** [November 7, 2008, 8:35pm UTC](https://www.ruby-forum.com/t/ruby-installation/152753 "2008-11-07T20:35:50Z")

</div>

Hi, I am trying to install ruby on my XP machine, but I get the error which says “The installer you are trying to use is corrupted or incomplete”, use / NCRC switch . I tried doing that( ruby186-27\_rc1.exe /NCRC ) bu…

---

## [How to sort relevance of query terms?](https://www.ruby-forum.com/t/how-to-sort-relevance-of-query-terms/152825)

<div class="topic-metadata">

**Author:** [@caiwangqin](https://www.ruby-forum.com/u/caiwangqin)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/how-to-sort-relevance-of-query-terms/152825 "2008-11-07T20:31:20Z")

</div>

The first three lines are representative of the problem I face. You see that for the given query (3, butter+oil+anhydrous), Wikipedia returns Ultralight Backpacking, where I think Ghee is optimal. I’ve had to make t…

---

## [How do I find the location of an element in Shoes](https://www.ruby-forum.com/t/how-do-i-find-the-location-of-an-element-in-shoes/152826)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/how-do-i-find-the-location-of-an-element-in-shoes/152826 "2008-11-07T20:25:52Z")

</div>

How do I find the location of an element in Shoes I thought that x=shape.left would give me the location, but it always returns 0.

---

## [Another require question](https://www.ruby-forum.com/t/another-require-question/152314)

<div class="topic-metadata">

**Author:** [@devros](https://www.ruby-forum.com/u/devros)\
**Replies:** 8\
**Last updated:** [November 7, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/another-require-question/152314 "2008-11-07T20:20:22Z")

</div>

I’ve been learning Ruby for 2 weeks and of course I like it. However, recently, ‘file.open(path)’ returns this error in the SciTE editor: “undefined local variable or method \`math’ for main:Object (NameError)” …

---

## [MountainWest RubyConf 2009 CFP](https://www.ruby-forum.com/t/mountainwest-rubyconf-2009-cfp/152824)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 8:17pm UTC](https://www.ruby-forum.com/t/mountainwest-rubyconf-2009-cfp/152824 "2008-11-07T20:17:40Z")

</div>

Yes, it’s that time again. We’re gearing up for the best MWRC ever, and we’re looking for your help. Take some time to think about what you’re doing with Ruby, then put together a proposal to share it with the world,…

---

## [DRb + SSH](https://www.ruby-forum.com/t/drb-ssh/152669)

<div class="topic-metadata">

**Author:** [@Saji\_NSHameed](https://www.ruby-forum.com/u/Saji_NSHameed)\
**Replies:** 11\
**Last updated:** [November 7, 2008, 8:09pm UTC](https://www.ruby-forum.com/t/drb-ssh/152669 "2008-11-07T20:09:25Z")

</div>

Dear Gurus, Any advice and sample code on how to setup DRb over SSH would be greatly appreciated. Thanks in advance, saji

---

## [Unix Sockets SOCK\_DGRAM](https://www.ruby-forum.com/t/unix-sockets-sock-dgram/152775)

<div class="topic-metadata">

**Author:** [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 7:10pm UTC](https://www.ruby-forum.com/t/unix-sockets-sock-dgram/152775 "2008-11-07T19:10:32Z")

</div>

Hi THis is my first post so I hope I do not break any rule with it. I did not found how to send packets via a datagram UNIX sockets? I was able to create a server using: sock = Socket::new( Socket::AF\_UNIX, Socket::S…

---

## [How to quickly find a string towards the end of a large io object](https://www.ruby-forum.com/t/how-to-quickly-find-a-string-towards-the-end-of-a-large-io-object/152666)

<div class="topic-metadata">

**Author:** [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Replies:** 11\
**Last updated:** [November 7, 2008, 5:54pm UTC](https://www.ruby-forum.com/t/how-to-quickly-find-a-string-towards-the-end-of-a-large-io-object/152666 "2008-11-07T17:54:28Z")

</div>

How do I scan starting at the end of a big io object to find a string that is always closer to then end? here’s very roughly how the contents of the IO object look: Lots’s of stuff… lot’s of stuff…lot’s of stuff…“my\_…

---

## [JRuby JDK Requirement?](https://www.ruby-forum.com/t/jruby-jdk-requirement/152810)

<div class="topic-metadata">

**Author:** [@tick](https://www.ruby-forum.com/u/tick)\
**Replies:** 5\
**Last updated:** [November 7, 2008, 5:35pm UTC](https://www.ruby-forum.com/t/jruby-jdk-requirement/152810 "2008-11-07T17:35:07Z")

</div>

I’ve been all over the website, wiki, and faq trying to find the supported JDK version for JRuby. I’m assuming that JRuby requires JDK 1.5 or better due to the following error… $jruby --help Exception in thread “mai…

---

## [New screencast - Debug your Rails applications using NetBeans](https://www.ruby-forum.com/t/new-screencast-debug-your-rails-applications-using-netbeans/152798)

<div class="topic-metadata">

**Author:** [@arung](https://www.ruby-forum.com/u/arung)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/new-screencast-debug-your-rails-applications-using-netbeans/152798 "2008-11-07T16:26:51Z")

</div>

Would you like to debug your Rails application using NetBeans ? The following screencast provides all the details: http://blogs.sun.com/arungupta/entry/screencast\_26\_develop\_run\_debug With v3 prelude now available, yo…

---

## [Remote gem install doesn't work anymore](https://www.ruby-forum.com/t/remote-gem-install-doesnt-work-anymore/152492)

<div class="topic-metadata">

**Author:** [@forex](https://www.ruby-forum.com/u/forex)\
**Replies:** 3\
**Last updated:** [November 7, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/remote-gem-install-doesnt-work-anymore/152492 "2008-11-07T15:20:14Z")

</div>

hello, i’m under ubuntu hardy with gem v1.1.0 installed when i want to install a new gem (ie hpricot), here is the result: “sudo gem install hpricot Bulk updating Gem source index for: http://gems.rubyforge.org/ ERR…

---

## [What are you suggestions for raising exceptions](https://www.ruby-forum.com/t/what-are-you-suggestions-for-raising-exceptions/152789)

<div class="topic-metadata">

**Author:** [@dkmd\_nielsen](https://www.ruby-forum.com/u/dkmd_nielsen)\
**Replies:** 1\
**Last updated:** [November 7, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/what-are-you-suggestions-for-raising-exceptions/152789 "2008-11-07T15:15:06Z")

</div>

My application has a common routine to format error messages: def FLIO.display\_error(clss,err) ln = ‘-’\*70 lbl = “#{clss}\_#{sprintf(’%04i’,err\[:num\])}” ln\[(ln.length - lbl.length)/2,lbl.length\] = (’ Error: ’ + lbl + …

---

## [Data output](https://www.ruby-forum.com/t/data-output/152712)

<div class="topic-metadata">

**Author:** [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/data-output/152712 "2008-11-07T14:10:01Z")

</div>

I am processing data from an array which basically involves me searching for specific information and outputting the results that match eg. … if data == 100 puts “#{data.time\_written}” I have just inserted a step wh…

---

## [Jruby ready for large production site?](https://www.ruby-forum.com/t/jruby-ready-for-large-production-site/151944)

<div class="topic-metadata">

**Author:** [@n1c](https://www.ruby-forum.com/u/n1c)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/jruby-ready-for-large-production-site/151944 "2008-11-07T13:56:53Z")

</div>

I’ve been following JRuby keenly for a while including using it for some small apps. What are people’s thoughts on using JRuby for a large social networking site though? Currently we’re all set up with Mongrel and NGi…

---

## [Celerity (formerly known as Wraptir) 0.0.1 released](https://www.ruby-forum.com/t/celerity-formerly-known-as-wraptir-0-0-1-released/137027)

<div class="topic-metadata">

**Author:** [@TSAlexander\_Lystad](https://www.ruby-forum.com/u/TSAlexander_Lystad)\
**Replies:** 6\
**Last updated:** [November 7, 2008, 10:20am UTC](https://www.ruby-forum.com/t/celerity-formerly-known-as-wraptir-0-0-1-released/137027 "2008-11-07T10:20:20Z")

</div>

Celerity is a Ruby library for easy and fast automation of web application testing. Celerity wraps HtmlUnit via JRuby and is supposed to provide the same API and functionality as Watir. http://celerity.rubyforge.org/ …

---

## [Combination of numbers in an array that add up to x](https://www.ruby-forum.com/t/combination-of-numbers-in-an-array-that-add-up-to-x/152499)

<div class="topic-metadata">

**Author:** [@hlee1981](https://www.ruby-forum.com/u/hlee1981)\
**Replies:** 16\
**Last updated:** [November 7, 2008, 10:10am UTC](https://www.ruby-forum.com/t/combination-of-numbers-in-an-array-that-add-up-to-x/152499 "2008-11-07T10:10:07Z")

</div>

Objective: Find list of values in an array that adds up to a specific sum. I have a list of values in an array: \[2429.63, 497.87, 51.96, 59.43, 138.4, 66.22, 28.74, 1.75, 2075.13, 556.14, 112.56, 116.5, 84.41, 55.97, …

---

## [Array.include? issue](https://www.ruby-forum.com/t/array-include-issue/152717)

<div class="topic-metadata">

**Author:** [@S-jb](https://www.ruby-forum.com/u/S-jb)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 9:54am UTC](https://www.ruby-forum.com/t/array-include-issue/152717 "2008-11-07T09:54:52Z")

</div>

I have the following method defined within a class. def move @heading ||= ‘\>’ @history \<\< \[@x,@y,@heading\] case @heading when ‘\>’ @y += 1 when ‘\<’ @y -= 1 when ‘^’ @x -= 1 else @x += 1 end error\_out(“Infini…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/152767)

<div class="topic-metadata">

**Author:** [@Suninny](https://www.ruby-forum.com/u/Suninny)\
**Replies:** 0\
**Last updated:** [November 7, 2008, 9:24am UTC](https://www.ruby-forum.com/t/no-subject/152767 "2008-11-07T09:24:21Z")

</div>

unsubscribe

---

## [32-bit Java on a x86\_64 box uses 64-bit JNA\_PATH](https://www.ruby-forum.com/t/32-bit-java-on-a-x86-64-box-uses-64-bit-jna-path/152730)

<div class="topic-metadata">

**Author:** [@Blair\_Z](https://www.ruby-forum.com/u/Blair_Z)\
**Replies:** 3\
**Last updated:** [November 7, 2008, 9:00am UTC](https://www.ruby-forum.com/t/32-bit-java-on-a-x86-64-box-uses-64-bit-jna-path/152730 "2008-11-07T09:00:20Z")

</div>

Hello, I just upgraded to 1.1.5 and saw this snippet in the jruby shell script. Figure out the OS and cpu the same as JNA would, so the library path can be set case “uname -m” in i\[34567\]86) JNA\_CPU=“i386”;; i86pc)…

---

## [Rake task for building latex?](https://www.ruby-forum.com/t/rake-task-for-building-latex/152373)

<div class="topic-metadata">

**Author:** [@crocco](https://www.ruby-forum.com/u/crocco)\
**Replies:** 9\
**Last updated:** [November 7, 2008, 8:31am UTC](https://www.ruby-forum.com/t/rake-task-for-building-latex/152373 "2008-11-07T08:31:01Z")

</div>

Does anyone know whether there’s a rake task to build latex files, including taking care of whether latex should be run one or more times? I searched google, this mailing list, rubyforge and RAA, but found nothing. If …

---

## [Is a "?" at end of method name only for boolean result?](https://www.ruby-forum.com/t/is-a-at-end-of-method-name-only-for-boolean-result/152645)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [November 7, 2008, 5:41am UTC](https://www.ruby-forum.com/t/is-a-at-end-of-method-name-only-for-boolean-result/152645 "2008-11-07T05:41:24Z")

</div>

when should I use ? at the end of a method name?. for queries that return (a) boolean value, or (b) any return values? ie any method that returns data Thanks

---

## [Redefine while](https://www.ruby-forum.com/t/redefine-while/152699)

<div class="topic-metadata">

**Author:** [@emilsverige](https://www.ruby-forum.com/u/emilsverige)\
**Replies:** 11\
**Last updated:** [November 7, 2008, 4:35am UTC](https://www.ruby-forum.com/t/redefine-while/152699 "2008-11-07T04:35:57Z")

</div>

Hi, is there an easy way to redefine ‘while’. I have a class that uses a while loop. In my unit test it always evaluates to false (which is correct). I only want the loop to run once, and the enter. Just like an if. T…

---

## [Updated IronRuby / Mono install](https://www.ruby-forum.com/t/updated-ironruby-mono-install/152680)

<div class="topic-metadata">

**Author:** [@jose\_d](https://www.ruby-forum.com/u/jose_d)\
**Replies:** 2\
**Last updated:** [November 7, 2008, 3:05am UTC](https://www.ruby-forum.com/t/updated-ironruby-mono-install/152680 "2008-11-07T03:05:17Z")

</div>

Wondering if there is an update to the instructions currently on ironruby.net? I’ve downloaded the latest stable build of Mono and trying to use the latest SVN of IronRuby but it doesn’t want to compile. Even revertin…

---

## [IronRuby and System::Decimal](https://www.ruby-forum.com/t/ironruby-and-system-decimal/152745)

<div class="topic-metadata">

**Author:** [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Replies:** 3\
**Last updated:** [November 7, 2008, 2:29am UTC](https://www.ruby-forum.com/t/ironruby-and-system-decimal/152745 "2008-11-07T02:29:38Z")

</div>

Hello, Just playing around with some .Net interop and the Decimal type. When I do puts, I expected that this would have given me the underlying number, or at least call to\_string. Instead I got the following behaviou…

---

## [Partial Read From URL](https://www.ruby-forum.com/t/partial-read-from-url/152742)

<div class="topic-metadata">

**Author:** [@curi](https://www.ruby-forum.com/u/curi)\
**Replies:** 3\
**Last updated:** [November 7, 2008, 12:36am UTC](https://www.ruby-forum.com/t/partial-read-from-url/152742 "2008-11-07T00:36:21Z")

</div>

Can anyone see a problem with this code to read only 20k from a URL? The http connection will get closed, right? Is there a better way to do this? My goal is to download the start of mp3 files and then estimate their …

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

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