# Ruby

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

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

---

## [Formatting REXML](https://www.ruby-forum.com/t/formatting-rexml/175533)

<div class="topic-metadata">

**Author:** [@scrajesh](https://www.ruby-forum.com/u/scrajesh)\
**Replies:** 6\
**Last updated:** [September 16, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/formatting-rexml/175533 "2009-09-16T19:37:21Z")

</div>

Hey all, I posted a question on StackOverflow the other day that I thought would be reasonably easy to answer, but actually, I got nothin’, zilch, nada. Rather than repeat the question here, here’s the link: http://b…

---

## [CSV import to hash to compare with database](https://www.ruby-forum.com/t/csv-import-to-hash-to-compare-with-database/173882)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 10\
**Last updated:** [September 16, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/csv-import-to-hash-to-compare-with-database/173882 "2009-09-16T17:06:11Z")

</div>

Hello All, Is it practical to import data from a csv file, via FasteCSV to a temporary data structure, like a hash, for editing purposes? I’m looking to read a file, send the data to a temp location, then compare the…

---

## [Making an array wrap, where last index + 1 = first index](https://www.ruby-forum.com/t/making-an-array-wrap-where-last-index-1-first-index/175566)

<div class="topic-metadata">

**Author:** [@b1\_S](https://www.ruby-forum.com/u/b1_S)\
**Replies:** 6\
**Last updated:** [September 16, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/making-an-array-wrap-where-last-index-1-first-index/175566 "2009-09-16T16:45:09Z")

</div>

I’m trying to manipulate a 2D array. I have created a method that looks in adjacent cells of my 2D array and returns the contents found there. When my method tries to look for cells to the left of the far left column,…

---

## [Errno::ENOENT when evaluating $FILENAME in 1.9.x](https://www.ruby-forum.com/t/errno-enoent-when-evaluating-filename-in-1-9-x/175619)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 0\
**Last updated:** [September 16, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/errno-enoent-when-evaluating-filename-in-1-9-x/175619 "2009-09-16T16:25:06Z")

</div>

Given foo.rb with the single line: puts $FILENAME Run, under Ruby 1.9: ruby foo.rb asdf Gets error: foo.rb:1:in \`’: No such file or directory - asdf (Errno::ENOENT) This duplicates the way the Rails passes the webs…

---

## [Security considerations with REST calls](https://www.ruby-forum.com/t/security-considerations-with-rest-calls/175511)

<div class="topic-metadata">

**Author:** [@sktib](https://www.ruby-forum.com/u/sktib)\
**Replies:** 3\
**Last updated:** [September 16, 2009, 4:01pm UTC](https://www.ruby-forum.com/t/security-considerations-with-rest-calls/175511 "2009-09-16T16:01:47Z")

</div>

Folks, I have joined a development group where developers have created a “REST” interface that passes username and password as parameters (with every call) though the call is made over https e.g. https://?user=&pwd=.…

---

## [What's the best cross platform approach (Windows/Mac) to deploy a simple service/daemon (with simpl](https://www.ruby-forum.com/t/whats-the-best-cross-platform-approach-windows-mac-to-deploy-a-simple-service-daemon-with-simpl/175517)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 3\
**Last updated:** [September 16, 2009, 3:44pm UTC](https://www.ruby-forum.com/t/whats-the-best-cross-platform-approach-windows-mac-to-deploy-a-simple-service-daemon-with-simpl/175517 "2009-09-16T15:44:13Z")

</div>

Hi, I’m getting confused re the range of options for development & deploying some simple code & UI to both Windows & Mac. Can anyone assist re a good direction here. I do like Ruby, however if it makes sense to mov…

---

## [How to stripe rails comments?](https://www.ruby-forum.com/t/how-to-stripe-rails-comments/175608)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 1\
**Last updated:** [September 16, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/how-to-stripe-rails-comments/175608 "2009-09-16T15:23:43Z")

</div>

how to stripe rails comments ? I have searched google, but i could not get proper module. Please anyone help me how to do this ? Regards S.Vellingiri.

---

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

<div class="topic-metadata">

**Author:** [@mikael](https://www.ruby-forum.com/u/mikael)\
**Replies:** 1\
**Last updated:** [September 16, 2009, 3:13pm UTC](https://www.ruby-forum.com/t/ruby-update/175607 "2009-09-16T15:13:07Z")

</div>

Hi! I have installed ruby 1.9.1 on my mac os x leopard. ./configure make make install But when i write ruby -v I get: ruby 1.8.6 (2008-08-11 patchlevel 287) \[universal-darwin9.0\] Anyone knows what i done wrong?? Th…

---

## [Unable to install](https://www.ruby-forum.com/t/unable-to-install/175602)

<div class="topic-metadata">

**Author:** [@giampiz](https://www.ruby-forum.com/u/giampiz)\
**Replies:** 1\
**Last updated:** [September 16, 2009, 2:31pm UTC](https://www.ruby-forum.com/t/unable-to-install/175602 "2009-09-16T14:31:13Z")

</div>

hello it’s my first post here thanks in advance for your kind reply I have installed jruby on Windows Xp, created the system var JRUBY\_HOME with value C:\\jruby-1.1.5 and adjusted the PATH sys var adding ;C:\\jruby-1.…

---

## [Working with Watir when it installed under Ruby gems folder](https://www.ruby-forum.com/t/working-with-watir-when-it-installed-under-ruby-gems-folder/175609)

<div class="topic-metadata">

**Author:** [@simbolla](https://www.ruby-forum.com/u/simbolla)\
**Replies:** 0\
**Last updated:** [September 16, 2009, 2:08pm UTC](https://www.ruby-forum.com/t/working-with-watir-when-it-installed-under-ruby-gems-folder/175609 "2009-09-16T14:08:00Z")

</div>

Hi all, I am new starter for Watir. my doubt is : i have instllad ruby in D: drive Path : D:/ruby I have installed latest Watir from internet , it got installed in Ruby\\lib\\ruby\\gems\\1.8\\gems\\commonwatir-1.6.2\\lib\\…

---

## [How to convert an string like this into a tree Object?](https://www.ruby-forum.com/t/how-to-convert-an-string-like-this-into-a-tree-object/175529)

<div class="topic-metadata">

**Author:** [@Possum](https://www.ruby-forum.com/u/Possum)\
**Replies:** 7\
**Last updated:** [September 16, 2009, 12:41pm UTC](https://www.ruby-forum.com/t/how-to-convert-an-string-like-this-into-a-tree-object/175529 "2009-09-16T12:41:00Z")

</div>

Hi, guys , recently I’m working on stanford parser(written in java) which has an in-complete ruby rapper.I can get the result like this as a string , but I still want to manipulate the result as an tree , what is the …

---

## [Range](https://www.ruby-forum.com/t/range/175582)

<div class="topic-metadata">

**Author:** [@rereis](https://www.ruby-forum.com/u/rereis)\
**Replies:** 5\
**Last updated:** [September 16, 2009, 11:02am UTC](https://www.ruby-forum.com/t/range/175582 "2009-09-16T11:02:07Z")

</div>

how can I convert a string ‘20-30’ to a instance range object 20…30 thanks

---

## [StringScanner and UTF-8 in ruby 1.9](https://www.ruby-forum.com/t/stringscanner-and-utf-8-in-ruby-1-9/175600)

<div class="topic-metadata">

**Author:** [@crocco](https://www.ruby-forum.com/u/crocco)\
**Replies:** 0\
**Last updated:** [September 16, 2009, 10:28am UTC](https://www.ruby-forum.com/t/stringscanner-and-utf-8-in-ruby-1-9/175600 "2009-09-16T10:28:08Z")

</div>

I’ve recently switched to ruby 1.9 and I’m having problems using its multilingual features. Now I’m having a problem with StringScanner. It seems that, when working with multi-byte encodings, such as utf-8, its pos m…

---

## [Installing Spec on IronRuby 0.9](https://www.ruby-forum.com/t/installing-spec-on-ironruby-0-9/175590)

<div class="topic-metadata">

**Author:** [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Replies:** 1\
**Last updated:** [September 16, 2009, 6:33am UTC](https://www.ruby-forum.com/t/installing-spec-on-ironruby-0-9/175590 "2009-09-16T06:33:36Z")

</div>

Hi, I am having trouble install spec on my machine. I was able to download spec using igem in IronRuby 0.6 but in 0.9 it is giving problems. First, where is igem file. Even if I am in the directory of igem.bat it give…

---

## [Mechanize/Nokogiri from file](https://www.ruby-forum.com/t/mechanize-nokogiri-from-file/175589)

<div class="topic-metadata">

**Author:** [@rowanu](https://www.ruby-forum.com/u/rowanu)\
**Replies:** 0\
**Last updated:** [September 16, 2009, 4:25am UTC](https://www.ruby-forum.com/t/mechanize-nokogiri-from-file/175589 "2009-09-16T04:25:51Z")

</div>

i’m playing with Mechanize and Nokogiri, and am have a problem which i think is fairly basic, but can’t find a way around… i want to be able to serialize/save pages which i am working on in Mechanize to file, and load…

---

## [Hpricot segfault OSX - ruby1.9.1](https://www.ruby-forum.com/t/hpricot-segfault-osx-ruby1-9-1/175532)

<div class="topic-metadata">

**Author:** [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Replies:** 2\
**Last updated:** [September 16, 2009, 3:55am UTC](https://www.ruby-forum.com/t/hpricot-segfault-osx-ruby1-9-1/175532 "2009-09-16T03:55:59Z")

</div>

Is anybody else seeing a segfault on hpricot on OSX 10.6 and Ruby 1.9.1? I’ve installed ruby with MacPorts. Here’s the error: /opt/local/lib/ruby1.9/gems/1.9.1/gems/hpricot-0.8.1/lib/ fast\_xs.bundle: \[BUG\] Segmentat…

---

## [Ruby-lang.org is down](https://www.ruby-forum.com/t/ruby-lang-org-is-down/175586)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [September 16, 2009, 2:18am UTC](https://www.ruby-forum.com/t/ruby-lang-org-is-down/175586 "2009-09-16T02:18:51Z")

</div>

Passenger Phussion sez, “no such file to load – hikidoc (MissingSourceFile)” – James B. www.jamesbritt.com - Playing with Better Toys www.ruby-doc.org - Ruby Help & Documentation www.rubystuff…

---

## [Net:Telnet cmd() stop performance](https://www.ruby-forum.com/t/net-telnet-cmd-stop-performance/175512)

<div class="topic-metadata">

**Author:** [@born\_in\_USSR](https://www.ruby-forum.com/u/born_in_USSR)\
**Replies:** 1\
**Last updated:** [September 16, 2009, 1:34am UTC](https://www.ruby-forum.com/t/net-telnet-cmd-stop-performance/175512 "2009-09-16T01:34:13Z")

</div>

code: require “net/telnet” require ‘timeout’ … tserv = Net::Telnet::new(“Host” =\> $TELNET\_ADDRESS, “Timeout” =\> 10, “Prompt” =\> /\[$%#\>\] \\z/n) ans=tserv.login(user\_login,user\_paswd) command=“ping -c 4 192.168.1.…

---

## [Command line](https://www.ruby-forum.com/t/command-line/175520)

<div class="topic-metadata">

**Author:** [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Replies:** 12\
**Last updated:** [September 15, 2009, 11:43pm UTC](https://www.ruby-forum.com/t/command-line/175520 "2009-09-15T23:43:43Z")

</div>

Please forgive this stupid newb question but I thought it was possible to send a command to the ruby interpreter without using IRB. ruby puts “hello” This command just returns an error that there is no file or directo…

---

## [.map.with\_object(3){|v|v+3} #=\> 3 Is this a bug?](https://www.ruby-forum.com/t/map-with-object-3-v-v-3-3-is-this-a-bug/175447)

<div class="topic-metadata">

**Author:** [@ErMaker](https://www.ruby-forum.com/u/ErMaker)\
**Replies:** 15\
**Last updated:** [September 15, 2009, 10:23pm UTC](https://www.ruby-forum.com/t/map-with-object-3-v-v-3-3-is-this-a-bug/175447 "2009-09-15T22:23:08Z")

</div>

At ruby 1.9.2dev (2009-07-18 trunk 24186) \[i386-mswin32\_90\] Ruby runs like this. \[1,2,3\].map.with\_object(3){|v|v+3} =\> 3 \[1,2,3\].each.with\_object(3).map{|v|v+3} =\> \[4, 5, 6\] I think that is better to use. \[…

---

## [Whats the best way to package deploy a Ruby app to windows? (no UI, also standalone if possible)](https://www.ruby-forum.com/t/whats-the-best-way-to-package-deploy-a-ruby-app-to-windows-no-ui-also-standalone-if-possible/175504)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 7\
**Last updated:** [September 15, 2009, 10:11pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-package-deploy-a-ruby-app-to-windows-no-ui-also-standalone-if-possible/175504 "2009-09-15T22:11:13Z")

</div>

Hi, Whats the best way to package deploy a Ruby app to windows??? (no UI, also standalone if possible) In other words a tools I can create a normal windows installation package, or self extracting package, so that no…

---

## [Overflow behavior](https://www.ruby-forum.com/t/overflow-behavior/175441)

<div class="topic-metadata">

**Author:** [@jacob\_navia](https://www.ruby-forum.com/u/jacob_navia)\
**Replies:** 8\
**Last updated:** [September 15, 2009, 8:10pm UTC](https://www.ruby-forum.com/t/overflow-behavior/175441 "2009-09-15T20:10:37Z")

</div>

What is the official behavior of ruby in case of integer overflow? Thanks

---

## [How do you list files on a network share folder?](https://www.ruby-forum.com/t/how-do-you-list-files-on-a-network-share-folder/175555)

<div class="topic-metadata">

**Author:** [@George](https://www.ruby-forum.com/u/George)\
**Replies:** 1\
**Last updated:** [September 15, 2009, 3:48pm UTC](https://www.ruby-forum.com/t/how-do-you-list-files-on-a-network-share-folder/175555 "2009-09-15T15:48:22Z")

</div>

Hi there, I’m using this syntax to fetch files: Dir\[ folderPath + “\*.jpg” \].sort () It works in a local folder but not with a folder on another machine. How would I access “smb://selfs01/images/” ? (I’m running ru…

---

## [Pre-allocate large amount of memory?](https://www.ruby-forum.com/t/pre-allocate-large-amount-of-memory/175467)

<div class="topic-metadata">

**Author:** [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Replies:** 14\
**Last updated:** [September 15, 2009, 2:45pm UTC](https://www.ruby-forum.com/t/pre-allocate-large-amount-of-memory/175467 "2009-09-15T14:45:09Z")

</div>

I’ve created a small daemon, that serves certain data very fast to our remaining web-application. It does so by pre-loading a lot of data from our database into a special structure in memory. Boiled down, the pre-load…

---

## [Adding a ruby library built using swig](https://www.ruby-forum.com/t/adding-a-ruby-library-built-using-swig/175545)

<div class="topic-metadata">

**Author:** [@lyes](https://www.ruby-forum.com/u/lyes)\
**Replies:** 0\
**Last updated:** [September 15, 2009, 1:09pm UTC](https://www.ruby-forum.com/t/adding-a-ruby-library-built-using-swig/175545 "2009-09-15T13:09:44Z")

</div>

Hello! I have a pb with ruby rails and swig I have wrapped a c library I have made into ruby using swig now I want to use it in a rails project I have already tested my library with a ruby script and it worked well I…

---

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

<div class="topic-metadata">

**Author:** [@beny18241](https://www.ruby-forum.com/u/beny18241)\
**Replies:** 3\
**Last updated:** [September 15, 2009, 12:33pm UTC](https://www.ruby-forum.com/t/ruby-oci8-question/175541 "2009-09-15T12:33:28Z")

</div>

Hi, I have some problem, i want to make select query with $name variable but i cant, this is my code please help what is wrong print “Enter name :” $name = STDIN.gets conn = OCI8.new(‘user’, ‘pass’) num\_rows = conn…

---

## [Module to overwrite method defined via define\_method](https://www.ruby-forum.com/t/module-to-overwrite-method-defined-via-define-method/175422)

<div class="topic-metadata">

**Author:** [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Replies:** 16\
**Last updated:** [September 15, 2009, 12:31pm UTC](https://www.ruby-forum.com/t/module-to-overwrite-method-defined-via-define-method/175422 "2009-09-15T12:31:03Z")

</div>

Hi List ! I found a tricky thing: if you use define\_method and then include a module that contains a method with the same name, the method in the module is just ignored. Why is that so ? How can I overwrite a method…

---

## [Ruby GUI GIS Application](https://www.ruby-forum.com/t/ruby-gui-gis-application/175525)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [September 15, 2009, 10:14am UTC](https://www.ruby-forum.com/t/ruby-gui-gis-application/175525 "2009-09-15T10:14:06Z")

</div>

I’m looking to move from Perl to either Ruby, Java, or Python. Looking at my three choices I like Ruby the best. However, I need to make a GUI where I can make a map window and import layers like roads and political b…

---

## [Rubyforge 1.0.5 Released](https://www.ruby-forum.com/t/rubyforge-1-0-5-released/175530)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [September 15, 2009, 8:58am UTC](https://www.ruby-forum.com/t/rubyforge-1-0-5-released/175530 "2009-09-15T08:58:34Z")

</div>

rubyforge version 1.0.5 has been released! http://codeforpeople.rubyforge.org/rubyforge/ http://rubyforge.org/projects/codeforpeople/ A script which automates a limited set of rubyforge operations. Run ‘rubyforge he…

---

## [Duplicate this code in C](https://www.ruby-forum.com/t/duplicate-this-code-in-c/175167)

<div class="topic-metadata">

**Author:** [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Replies:** 7\
**Last updated:** [September 15, 2009, 8:49am UTC](https://www.ruby-forum.com/t/duplicate-this-code-in-c/175167 "2009-09-15T08:49:12Z")

</div>

Is there a way to duplicate this code using C? http://pastie.org/610698 The goal is to launch multiple ruby processes from a C program. Mike B.

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

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