# Ruby

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

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

---

## [Gsub not working. Ruby thinks I'm in an array?](https://www.ruby-forum.com/t/gsub-not-working-ruby-thinks-im-in-an-array/115197)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [September 21, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/gsub-not-working-ruby-thinks-im-in-an-array/115197 "2007-09-21T18:05:19Z")

</div>

I’ve chunked up a huge text file into arrays of discrete text groups. I want to go into each of those text groups and convert a bunch of stuff. I’ve proved that I’ve got my array OK, and, I’ve proved that I can do a “…

---

## [Checking for html forms with www::mechenize](https://www.ruby-forum.com/t/checking-for-html-forms-with-www-mechenize/115136)

<div class="topic-metadata">

**Author:** [@animate123](https://www.ruby-forum.com/u/animate123)\
**Replies:** 4\
**Last updated:** [September 21, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/checking-for-html-forms-with-www-mechenize/115136 "2007-09-21T17:50:17Z")

</div>

I want to run a check to see which pages have forms and which ones don’t from a file with url’s. I’m using the size of the form to make that determination. But after I get to the 13 url in the file I get an error and …

---

## [Screen Scraping Advice](https://www.ruby-forum.com/t/screen-scraping-advice/114811)

<div class="topic-metadata">

**Author:** [@animate123](https://www.ruby-forum.com/u/animate123)\
**Replies:** 9\
**Last updated:** [September 21, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/screen-scraping-advice/114811 "2007-09-21T17:46:16Z")

</div>

I work for Cisco Systems in San Jose Ca. I proposed a project to perform a screen scrape/spider hack to go out and look for websites with the Cisco name in its domain name (ex. usedcisco.com, ciscoequipment.com, etc.)…

---

## [Dynamically read object's attributes](https://www.ruby-forum.com/t/dynamically-read-objects-attributes/115200)

<div class="topic-metadata">

**Author:** [@mpaxton](https://www.ruby-forum.com/u/mpaxton)\
**Replies:** 4\
**Last updated:** [September 21, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/dynamically-read-objects-attributes/115200 "2007-09-21T17:23:14Z")

</div>

I want to read the values of instance variables in an object, but I don’t know how to reach them. I think the code should be something like: def read\_stuff s = “Class: #{self.class}:\\n” s += “Instance variables:\\n” …

---

## [Cgi scripts don't know hostname](https://www.ruby-forum.com/t/cgi-scripts-dont-know-hostname/115035)

<div class="topic-metadata">

**Author:** [@mpaxton](https://www.ruby-forum.com/u/mpaxton)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/cgi-scripts-dont-know-hostname/115035 "2007-09-21T17:15:44Z")

</div>

Forgive me if this is a dumb question, but it’s got me stumped. I’m running a WEBrick server and I’ve mounted HTTPServlet::FileHandler as follows: s.mount("/cgi-bin",HTTPServlet::FileHandler, cgi\_dir,{:FancyIndexing=\>…

---

## [Prevent REXML from doing any character decoding](https://www.ruby-forum.com/t/prevent-rexml-from-doing-any-character-decoding/115193)

<div class="topic-metadata">

**Author:** [@helzer](https://www.ruby-forum.com/u/helzer)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/prevent-rexml-from-doing-any-character-decoding/115193 "2007-09-21T17:06:13Z")

</div>

How can I ask REXML to NOT DO any sort of character decoding or encoding when it processes XML files? My files include all sorts of encoding, which is unfortunately not recognized by REXML. I just want to process it s…

---

## [Ruby and Access](https://www.ruby-forum.com/t/ruby-and-access/115194)

<div class="topic-metadata">

**Author:** [@jngo](https://www.ruby-forum.com/u/jngo)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 4:54pm UTC](https://www.ruby-forum.com/t/ruby-and-access/115194 "2007-09-21T16:54:09Z")

</div>

Hi Everyone, Was wondering if anyone had seen any good references (preferably on the www) to Ruby/Access ODBC functionality. Thanks, John ############################################################################…

---

## [Iterating through a file, sticking iterated array entries in](https://www.ruby-forum.com/t/iterating-through-a-file-sticking-iterated-array-entries-in/115108)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 2\
**Last updated:** [September 21, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/iterating-through-a-file-sticking-iterated-array-entries-in/115108 "2007-09-21T15:55:33Z")

</div>

I’ve got an array, a listing of “titles” in an xml file. Basically, I want to iterate through my file and, wherever I see the tag , I want to replace that with \<subhead.4\>code\</subhead.4\>, where “code” is the next ent…

---

## [Net::HTTP#post\_form - setting user agent, referrer?](https://www.ruby-forum.com/t/net-http-post-form-setting-user-agent-referrer/56318)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 5\
**Last updated:** [September 21, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/net-http-post-form-setting-user-agent-referrer/56318 "2007-09-21T15:35:55Z")

</div>

How can I set the user-agent and HTTP\_REFERER (and perhaps other vars) when using Net::HTTP’s post\_form method? Thanks, Joe

---

## [Is there any way to update ruby from console on windows?](https://www.ruby-forum.com/t/is-there-any-way-to-update-ruby-from-console-on-windows/115192)

<div class="topic-metadata">

**Author:** [@khelll](https://www.ruby-forum.com/u/khelll)\
**Replies:** 2\
**Last updated:** [September 21, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/is-there-any-way-to-update-ruby-from-console-on-windows/115192 "2007-09-21T15:31:00Z")

</div>

is there any way to update ruby from console on windows?? something like gem does gem update is there something like ruby update?? the issue here is that the one click installer needs u to remove the old ruby direct…

---

## [Couple of questions about TCPServer.new and TCPSocket.new](https://www.ruby-forum.com/t/couple-of-questions-about-tcpserver-new-and-tcpsocket-new/115118)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 2\
**Last updated:** [September 21, 2007, 12:31pm UTC](https://www.ruby-forum.com/t/couple-of-questions-about-tcpserver-new-and-tcpsocket-new/115118 "2007-09-21T12:31:24Z")

</div>

Hello Team, In an attempt to learn about TCP Socket programming, I wrote the following mini tiny ruby pgms. Although they kind of work, I am having some problems. Here they are: This is under AIX 5.3. ruby -v ruby…

---

## [Convert the given number to add](https://www.ruby-forum.com/t/convert-the-given-number-to-add/114961)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 11:39am UTC](https://www.ruby-forum.com/t/convert-the-given-number-to-add/114961 "2007-09-21T11:39:58Z")

</div>

Dear Friends, Please any one tell answer for this questions. convert the given number to add. for example. 1111 -\> one thousand one hundred and eleven 345 -\> three hundred and forty five With…

---

## [Parse XML that isn't well formed](https://www.ruby-forum.com/t/parse-xml-that-isnt-well-formed/114970)

<div class="topic-metadata">

**Author:** [@milo](https://www.ruby-forum.com/u/milo)\
**Replies:** 4\
**Last updated:** [September 21, 2007, 11:31am UTC](https://www.ruby-forum.com/t/parse-xml-that-isnt-well-formed/114970 "2007-09-21T11:31:14Z")

</div>

I have some XML looking like the following, other than being very much larger (some files are up to 2GB): \<?xml version="1.0" encoding="UTF-8"?\> \<server\_url\>http://myserver.edu/data/\</server\_url\> \<server\_name\>m…

---

## [Ruby RSS Feeds](https://www.ruby-forum.com/t/ruby-rss-feeds/115169)

<div class="topic-metadata">

**Author:** [@ivan\_trajkovic](https://www.ruby-forum.com/u/ivan_trajkovic)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 11:18am UTC](https://www.ruby-forum.com/t/ruby-rss-feeds/115169 "2007-09-21T11:18:23Z")

</div>

Where can I find good information about using Ruby for RSS Feeds? Do you have any good tips about it? Please answer at www.quickker.com Best regards, Ivan Quickker.com Founder

---

## [Rb\_str\_substr is much slower than rb\_str\_subpat](https://www.ruby-forum.com/t/rb-str-substr-is-much-slower-than-rb-str-subpat/115133)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 10:05am UTC](https://www.ruby-forum.com/t/rb-str-substr-is-much-slower-than-rb-str-subpat/115133 "2007-09-21T10:05:56Z")

</div>

e$B$J$+$@$G$9!#e(B 1.9e$B$G$O!"D9$$J8;zNs$KBP$9$ke(BString#\[\]e$B$,!"e(BFixnume$B$r;H$C$?$H$-$N$\[$&e(B e$B$,e(BRegexpe$B$r;H$C$?$H$-$h$j$b!"3JCJ$KCY$/$J$C$F$$$^$9!#e(B #! /usr/bin/ruby -Ke require “benchmark” class S…

---

## [Barcode scanner app](https://www.ruby-forum.com/t/barcode-scanner-app/115088)

<div class="topic-metadata">

**Author:** [@pieterjongsma](https://www.ruby-forum.com/u/pieterjongsma)\
**Replies:** 6\
**Last updated:** [September 21, 2007, 7:25am UTC](https://www.ruby-forum.com/t/barcode-scanner-app/115088 "2007-09-21T07:25:23Z")

</div>

Hi, I need to program an application for my school. It needs to scan a barcode on a pass, compare it to a database and then display a color (fullscreen) signalling if the student is or isn’t allowed at a party. Now I…

---

## [Uninstalling the mac tiger version of ruby](https://www.ruby-forum.com/t/uninstalling-the-mac-tiger-version-of-ruby/82824)

<div class="topic-metadata">

**Author:** [@libsfan01](https://www.ruby-forum.com/u/libsfan01)\
**Replies:** 19\
**Last updated:** [September 21, 2007, 6:50am UTC](https://www.ruby-forum.com/t/uninstalling-the-mac-tiger-version-of-ruby/82824 "2007-09-21T06:50:42Z")

</div>

hi all in trying to uninstall the mac version of ruby how can i do this?

---

## [Scope questions](https://www.ruby-forum.com/t/scope-questions/114888)

<div class="topic-metadata">

**Author:** [@Mister\_R](https://www.ruby-forum.com/u/Mister_R)\
**Replies:** 4\
**Last updated:** [September 21, 2007, 6:19am UTC](https://www.ruby-forum.com/t/scope-questions/114888 "2007-09-21T06:19:38Z")

</div>

Hi guys, I am a recent Ruby convert (from PERL), and I am wondering if there is a way to get some of the behavior that I am comfortable with with regards to scope. In PERL the following code: my $var=1; { my $var=…

---

## [Fire 1.0.0](https://www.ruby-forum.com/t/fire-1-0-0/115147)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 4:18am UTC](https://www.ruby-forum.com/t/fire-1-0-0/115147 "2007-09-21T04:18:25Z")

</div>

fire version 1.8.6 has been released! http://fire.rubyforge.com/ SYNOPSIS: Here’s how to set up a Port Knocking Daemon with a key of ports 15, 99, and 1632! When the password is accepted, it prints w007! class My…

---

## [Rubinius on Mac PPC](https://www.ruby-forum.com/t/rubinius-on-mac-ppc/115142)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 3\
**Last updated:** [September 21, 2007, 4:09am UTC](https://www.ruby-forum.com/t/rubinius-on-mac-ppc/115142 "2007-09-21T04:09:24Z")

</div>

Hey all, I’m trying to build Rubinius on my Mac PPC. Configure works fine, but when I got to do ‘make’, i get this error: /usr/bin/libtool: internal link edit command failed make\[4\]: \*\*\* \[libonig.la\] Error 1 make\[3\]…

---

## [TYPE(cl) in rb\_obj\_is\_kind\_of](https://www.ruby-forum.com/t/type-cl-in-rb-obj-is-kind-of/115105)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 3\
**Last updated:** [September 21, 2007, 2:37am UTC](https://www.ruby-forum.com/t/type-cl-in-rb-obj-is-kind-of/115105 "2007-09-21T02:37:14Z")

</div>

rb\_obj\_is\_kind\_of e$BCf$Ge(B TYPE(cl) e$B$,e(B T\_CLASS e$B$de(B T\_ICLASS e$B$G$Je(B e$B$$$3$H$O@5\>o$J$N$G$7$g$&$+e(B? e$B$D$^$j!"0J2\<$NI=L@$O4V0c$C$F$$$k$G$7$g$&$+e(B? Index: object.c — object.c (revision 13472) ++…

---

## [Racial Comments in the Following Post](https://www.ruby-forum.com/t/racial-comments-in-the-following-post/114957)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 9\
**Last updated:** [September 21, 2007, 1:56am UTC](https://www.ruby-forum.com/t/racial-comments-in-the-following-post/114957 "2007-09-21T01:56:10Z")

</div>

Such Racial comments in the forum should not be allowed http://www.ruby-forum.com/topic/125009#555037

---

## [GLU and GLUT libs](https://www.ruby-forum.com/t/glu-and-glut-libs/115145)

<div class="topic-metadata">

**Author:** [@leandro\_nascimento\_S](https://www.ruby-forum.com/u/leandro_nascimento_S)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 1:49am UTC](https://www.ruby-forum.com/t/glu-and-glut-libs/115145 "2007-09-21T01:49:08Z")

</div>

Someone here has programmed ruby with GLU (OpenGL Utility Library) and GLUT(OpenGL Utility Toolkit)? If yes, do you have some good links about them to paste here for me? Thanks, Leandro.

---

## [Why Ruby 1.8.2 is faster?](https://www.ruby-forum.com/t/why-ruby-1-8-2-is-faster/115109)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 3\
**Last updated:** [September 21, 2007, 1:18am UTC](https://www.ruby-forum.com/t/why-ruby-1-8-2-is-faster/115109 "2007-09-21T01:18:05Z")

</div>

I had Ruby 1.8.2 on the Mac so it was able to run a program with 10,000 iterations per second. and then I installed 1.8.6 with Locomotive and then the program will only run at about 6,500 iterations per second. so i …

---

## [When $0 isn't what I want](https://www.ruby-forum.com/t/when-0-isnt-what-i-want/115134)

<div class="topic-metadata">

**Author:** [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Replies:** 2\
**Last updated:** [September 20, 2007, 11:24pm UTC](https://www.ruby-forum.com/t/when-0-isnt-what-i-want/115134 "2007-09-20T23:24:55Z")

</div>

When using eruby for web development, $0 for any given .rhtml file is always ‘eruby’. This also means that any time I want to use a path relative to the location of the .rhtml file being accessed, I’m out of luck: pa…

---

## [Do C Extensions Block Ruby?](https://www.ruby-forum.com/t/do-c-extensions-block-ruby/115026)

<div class="topic-metadata">

**Author:** [@Wayne\_ESSeguin](https://www.ruby-forum.com/u/Wayne_ESSeguin)\
**Replies:** 15\
**Last updated:** [September 20, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/do-c-extensions-block-ruby/115026 "2007-09-20T22:05:38Z")

</div>

Does a C extension running in a ruby-thread block all ruby threads from running while it executes? Thanks! ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator

---

## [Splitting a string by x number of lines](https://www.ruby-forum.com/t/splitting-a-string-by-x-number-of-lines/115117)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [September 20, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/splitting-a-string-by-x-number-of-lines/115117 "2007-09-20T21:41:33Z")

</div>

I am trying to figure out how to split a string into chunks of 25 lines or less to pass to another function Any ideas on how I could approach this? thanks, Luis

---

## [How to print Ruby's version from within the program](https://www.ruby-forum.com/t/how-to-print-rubys-version-from-within-the-program/115090)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 3\
**Last updated:** [September 20, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/how-to-print-rubys-version-from-within-the-program/115090 "2007-09-20T21:23:29Z")

</div>

Is there a way to print the Ruby version from within a Ruby program? I know i can use ruby -v at the command line, but what if it is inside of the code and i want to print it out. this is such as when in TextMate, i w…

---

## [How to install RoR on chrooted environment](https://www.ruby-forum.com/t/how-to-install-ror-on-chrooted-environment/115033)

<div class="topic-metadata">

**Author:** [@Fibre\_O](https://www.ruby-forum.com/u/Fibre_O)\
**Replies:** 6\
**Last updated:** [September 20, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/how-to-install-ror-on-chrooted-environment/115033 "2007-09-20T21:20:27Z")

</div>

Hello, i have the following setup: /home/user1/tmp/root\_fs/… under above mentioned directory I have whole important things for my embedded Linux OS i.e /bin, /etc, /lib, /sbin, /usr etc. I have installed i.e. lighth…

---

## [Interactive System calls within Ruby Script](https://www.ruby-forum.com/t/interactive-system-calls-within-ruby-script/115122)

<div class="topic-metadata">

**Author:** [@ZyLo](https://www.ruby-forum.com/u/ZyLo)\
**Replies:** 3\
**Last updated:** [September 20, 2007, 8:33pm UTC](https://www.ruby-forum.com/t/interactive-system-calls-within-ruby-script/115122 "2007-09-20T20:33:20Z")

</div>

I’m not sure whether this is possible or not, but I know that Ruby allows you to make system calls in many different ways, and I generally use: system “echo Hello” or something when I want to call outside of the scri…

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

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