# Ruby

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

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

---

## [LSRC Name Picker (#129)](https://www.ruby-forum.com/t/lsrc-name-picker-129/107621)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 43\
**Last updated:** [June 30, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/lsrc-name-picker-129/107621 "2007-06-30T20:01:52Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Lapack question - difficulties installing Linalg](https://www.ruby-forum.com/t/lapack-question-difficulties-installing-linalg/108229)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 3\
**Last updated:** [June 30, 2007, 7:56pm UTC](https://www.ruby-forum.com/t/lapack-question-difficulties-installing-linalg/108229 "2007-06-30T19:56:52Z")

</div>

Dear all, I am having trouble installing the Linalg package. I am working on OpenSuse 10.2, and I installed the Lapack from an rpm, successfully. Now, I get the following: dhcppc1:/usr/local/linalg-0.3.2-i686-linux-…

---

## [Storing and manipulating columns of data](https://www.ruby-forum.com/t/storing-and-manipulating-columns-of-data/108223)

<div class="topic-metadata">

**Author:** [@baptiste\_AuguiSSSS](https://www.ruby-forum.com/u/baptiste_AuguiSSSS)\
**Replies:** 5\
**Last updated:** [June 30, 2007, 6:46pm UTC](https://www.ruby-forum.com/t/storing-and-manipulating-columns-of-data/108223 "2007-06-30T18:46:45Z")

</div>

Hi, Being used to deal with Octave / Matlab, I’m a bit confused by Ruby structures (arrays, hashes, etc). I have this data file “data.dat” with 3 columns: 6.199000 1.001000e+00 4.720000e-05 8.265000 9.990000e-01…

---

## [Is it bug? for](https://www.ruby-forum.com/t/is-it-bug-for/108225)

<div class="topic-metadata">

**Author:** [@bkeh12](https://www.ruby-forum.com/u/bkeh12)\
**Replies:** 15\
**Last updated:** [June 30, 2007, 6:37pm UTC](https://www.ruby-forum.com/t/is-it-bug-for/108225 "2007-06-30T18:37:44Z")

</div>

\[root@home1 ~\]# ruby -v ruby 1.9.0 (2007-06-30 patchlevel 0) \[i686-linux\] \[root@home1 ~\]# irb irb(main):001:0\> “hello”.to\_a NoMethodError: undefined method to\_a' for "hello":String from (irb):1:inmethod\_missing’ fro…

---

## [Re: webgen 0.4.5](https://www.ruby-forum.com/t/re-webgen-0-4-5/108231)

<div class="topic-metadata">

**Author:** [@al\_batuul](https://www.ruby-forum.com/u/al_batuul)\
**Replies:** 0\
**Last updated:** [June 30, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/re-webgen-0-4-5/108231 "2007-06-30T18:27:43Z")

</div>

Hi, update remains not possible: C:\>gem -v 0.9.2 C:\>gem install rubygems\_update ERROR: While executing gem … (Gem::GemNotFoundException) Could not find rubygems\_update (\> 0) in any repository ----- Original Messa…

---

## [Help with regular expression](https://www.ruby-forum.com/t/help-with-regular-expression/108070)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 16\
**Last updated:** [June 30, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/help-with-regular-expression/108070 "2007-06-30T18:03:21Z")

</div>

How can I make a regular expression that will match everything, unless it contains a certain string then it will match nothing. For instance, let’s say it should not match “bar”, then: “foo” =\> “foo” "bar " =\> nil “…

---

## [Patten match](https://www.ruby-forum.com/t/patten-match/107209)

<div class="topic-metadata">

**Author:** [@geetha](https://www.ruby-forum.com/u/geetha)\
**Replies:** 6\
**Last updated:** [June 30, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/patten-match/107209 "2007-06-30T16:38:33Z")

</div>

Hi Good morning, I am having one text file. In this I need to remove all the new lines and I need to match the keyword what I am giving. Please any one help me… Thanks, S.Sangeetha.

---

## [Question: referencing a variable with a variable](https://www.ruby-forum.com/t/question-referencing-a-variable-with-a-variable/106771)

<div class="topic-metadata">

**Author:** [@knohr](https://www.ruby-forum.com/u/knohr)\
**Replies:** 5\
**Last updated:** [June 30, 2007, 1:52pm UTC](https://www.ruby-forum.com/t/question-referencing-a-variable-with-a-variable/106771 "2007-06-30T13:52:20Z")

</div>

I come from a perl background. I have gotten in the habit of using references to variables instead of specifically calling said variable/ class/whatever. Basically, I am wondering how I would translate the following …

---

## [Is there a nifty ruby hack for this set of commands?](https://www.ruby-forum.com/t/is-there-a-nifty-ruby-hack-for-this-set-of-commands/107986)

<div class="topic-metadata">

**Author:** [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Replies:** 7\
**Last updated:** [June 30, 2007, 12:33pm UTC](https://www.ruby-forum.com/t/is-there-a-nifty-ruby-hack-for-this-set-of-commands/107986 "2007-06-30T12:33:49Z")

</div>

I have this sequence of commands to write a list of values to a file f = File.new(configfile, File::CREAT|File::WRONLY, 0700) header\_commands.each {|x| f.puts x } mysql\_commands.each {|x| f.puts x } dir\_commands.each…

---

## [Threads issue](https://www.ruby-forum.com/t/threads-issue/108180)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 5\
**Last updated:** [June 30, 2007, 10:42am UTC](https://www.ruby-forum.com/t/threads-issue/108180 "2007-06-30T10:42:08Z")

</div>

Hi guys, Here is my program: def my() i=0 while i\<100 i+=1 puts "Into my: #{Thread.current}" Thread.stop if i == 40 end end myThread = Thread.new { puts “Into thread: #{Thread.current}” #Thread.stop m…

---

## [Regular Expression question](https://www.ruby-forum.com/t/regular-expression-question/108214)

<div class="topic-metadata">

**Author:** [@desertfox](https://www.ruby-forum.com/u/desertfox)\
**Replies:** 6\
**Last updated:** [June 30, 2007, 9:34am UTC](https://www.ruby-forum.com/t/regular-expression-question/108214 "2007-06-30T09:34:04Z")

</div>

Hello, Im working with regular expressions and I cant quite understand how the “13” is extracted from the string. Here is the irb output: irb(main):005:0\> “(13)”\[1…-2\].to\_i =\> 13 I dont understadn how the \[1…-2\] pa…

---

## [Webgen 0.4.5](https://www.ruby-forum.com/t/webgen-0-4-5/108138)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 4\
**Last updated:** [June 30, 2007, 9:33am UTC](https://www.ruby-forum.com/t/webgen-0-4-5/108138 "2007-06-30T09:33:04Z")

</div>

Hey everybody! I just release a new webgen version which fixes some bugs and brings one new feature: customizable links to any file handled by webgen. Have a look at http://webgen.rubyforge.org/news.html to see a com…

---

## [Rocaml: Ruby extensions in Objective Caml](https://www.ruby-forum.com/t/rocaml-ruby-extensions-in-objective-caml/107516)

<div class="topic-metadata">

**Author:** [@tulkas](https://www.ruby-forum.com/u/tulkas)\
**Replies:** 8\
**Last updated:** [June 30, 2007, 8:52am UTC](https://www.ruby-forum.com/t/rocaml-ruby-extensions-in-objective-caml/107516 "2007-06-30T08:52:00Z")

</div>

rocaml allows you to write Ruby extensions in Objective Caml. I never seem to manage to release things when I should, so here’s a pre-release announcement to let you know about this so you can play with it before the…

---

## [Array Problem, sort Array](https://www.ruby-forum.com/t/array-problem-sort-array/107989)

<div class="topic-metadata">

**Author:** [@coolwong](https://www.ruby-forum.com/u/coolwong)\
**Replies:** 22\
**Last updated:** [June 30, 2007, 5:46am UTC](https://www.ruby-forum.com/t/array-problem-sort-array/107989 "2007-06-30T05:46:51Z")

</div>

Array = \["a", "a", "a", "b", "b", â€œcâ€, "c", "c","d", "d", "e"\] How can i sort the array data??? \[result\] Array = \[“a”, “b”, “c”, “d”, “e”\] \[/result\]

---

## [Active Record not found](https://www.ruby-forum.com/t/active-record-not-found/108194)

<div class="topic-metadata">

**Author:** [@lu5t](https://www.ruby-forum.com/u/lu5t)\
**Replies:** 5\
**Last updated:** [June 30, 2007, 4:30am UTC](https://www.ruby-forum.com/t/active-record-not-found/108194 "2007-06-30T04:30:46Z")

</div>

I’m new to ruby, so I may have this all wrong. I’m trying to use activerecord to manage database functions for a small script I’m writing. I’ve installed the activerecord gem, and verified it’s in the list of local g…

---

## [Square brackets in URI](https://www.ruby-forum.com/t/square-brackets-in-uri/108209)

<div class="topic-metadata">

**Author:** [@Niklas\_Hofer](https://www.ruby-forum.com/u/Niklas_Hofer)\
**Replies:** 0\
**Last updated:** [June 30, 2007, 1:18am UTC](https://www.ruby-forum.com/t/square-brackets-in-uri/108209 "2007-06-30T01:18:37Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello I was trying to handle some user entered URL/Is and came across the following problem: How do I handle URIs with brackets in the path part? require ‘uri’ u = “htt…

---

## [How to set Browser Encoding?](https://www.ruby-forum.com/t/how-to-set-browser-encoding/108154)

<div class="topic-metadata">

**Author:** [@chirag](https://www.ruby-forum.com/u/chirag)\
**Replies:** 1\
**Last updated:** [June 30, 2007, 1:08am UTC](https://www.ruby-forum.com/t/how-to-set-browser-encoding/108154 "2007-06-30T01:08:13Z")

</div>

i want to set browser encoding through ruby code. i want it to be western-European(windows). my web page showing question mark for some html content . so i want to do this setting. if i change it explicitly from encod…

---

## [Re: Active Record not found](https://www.ruby-forum.com/t/re-active-record-not-found/108204)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/re-active-record-not-found/108204 "2007-06-29T23:50:29Z")

</div>

replace activerecord with active\_record Rinse and repeat :wink: — Original Message —

---

## [Weird deadlock problems with Slave/drb](https://www.ruby-forum.com/t/weird-deadlock-problems-with-slave-drb/108201)

<div class="topic-metadata">

**Author:** [@Peter\_Lichten](https://www.ruby-forum.com/u/Peter_Lichten)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/weird-deadlock-problems-with-slave-drb/108201 "2007-06-29T23:22:53Z")

</div>

\#!/usr/bin/env ruby Original program idea: Write a ruby program that checks the integrity of all my FLAC music files, and that makes use of my MacBooks Core Duo CPU. Since Ruby doesn’t support native threadds, I decid…

---

## [Issue related to class initialization and irb](https://www.ruby-forum.com/t/issue-related-to-class-initialization-and-irb/108174)

<div class="topic-metadata">

**Author:** [@darren\_kirby](https://www.ruby-forum.com/u/darren_kirby)\
**Replies:** 8\
**Last updated:** [June 29, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/issue-related-to-class-initialization-and-irb/108174 "2007-06-29T23:21:27Z")

</div>

Hello all, My class is a library that allows users to read information/tags etc from Flac files. When the class is initialized in irb the content of every single instance variable is dumped to the console. This lib…

---

## [Re: webgen 0.4.5](https://www.ruby-forum.com/t/re-webgen-0-4-5/108200)

<div class="topic-metadata">

**Author:** [@al\_batuul](https://www.ruby-forum.com/u/al_batuul)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 11:13pm UTC](https://www.ruby-forum.com/t/re-webgen-0-4-5/108200 "2007-06-29T23:13:25Z")

</div>

Hi, I found about 12 hits for the same file installed in different directories and sub-directories; thus it is very difficult to decide which one to update manually. This leads to the following: 1- Is there any a…

---

## [Newbie questions on processing numerical data from text file](https://www.ruby-forum.com/t/newbie-questions-on-processing-numerical-data-from-text-file/108151)

<div class="topic-metadata">

**Author:** [@baptiste\_AuguiSSSS](https://www.ruby-forum.com/u/baptiste_AuguiSSSS)\
**Replies:** 6\
**Last updated:** [June 29, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/newbie-questions-on-processing-numerical-data-from-text-file/108151 "2007-06-29T22:34:21Z")

</div>

Hi, Hope you can help me get started with these trivial questions. I’ve got a practical problem, and the Ruby cookbook to help me, but a few combinations of the two haven’t produced any interesting results yet. I’d n…

---

## [Questions about clusterer 0.1.9 gem](https://www.ruby-forum.com/t/questions-about-clusterer-0-1-9-gem/108192)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/questions-about-clusterer-0-1-9-gem/108192 "2007-06-29T22:23:21Z")

</div>

Dear all, I’ve got some syntax questions about the Clusterer 0.1.9 gem, because I’m currently struggling to find some documentation to get it to work for me (what I could find on the web seems to relate to version 0…

---

## [Re: Tricky socks question: changing source IP on Net::HTTP](https://www.ruby-forum.com/t/re-tricky-socks-question-changing-source-ip-on-net-http/108188)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/re-tricky-socks-question-changing-source-ip-on-net-http/108188 "2007-06-29T21:31:13Z")

</div>

I’ve got an interface with multiple IP addresses and I’m looking to make HTTP requests from the non-primary IP. How would I pull that off? In principle, you ‘bind’ the socket to the correct local IP address before …

---

## [Re: Where to start in parsing?](https://www.ruby-forum.com/t/re-where-to-start-in-parsing/108189)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/re-where-to-start-in-parsing/108189 "2007-06-29T21:31:13Z")

</div>

I want to start learning to parse, so naturally I go to Goolge. But of course, I got a lot of XML and stuff like that and that’s really not what I’m looking for (I think). So where do I start? If you are serious abo…

---

## [RTF to HTML Conversion](https://www.ruby-forum.com/t/rtf-to-html-conversion/108158)

<div class="topic-metadata">

**Author:** [@chirag](https://www.ruby-forum.com/u/chirag)\
**Replies:** 3\
**Last updated:** [June 29, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/rtf-to-html-conversion/108158 "2007-06-29T21:23:12Z")

</div>

i having document upload facility on my web page. for word doc its working perfect. for that we are converting doc to html using win32OLE and storing it in DB. while disply just showing it on web page. But i am not …

---

## [Array.join for nested arrays](https://www.ruby-forum.com/t/array-join-for-nested-arrays/108063)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [June 29, 2007, 9:11pm UTC](https://www.ruby-forum.com/t/array-join-for-nested-arrays/108063 "2007-06-29T21:11:11Z")

</div>

Doing arr = \[1, \[2, \[3, 4\], 5\], 6\] arr.join(‘,’) in Ruby 1.8.6 produces the following string: 1,2,3,4,5,6 Looking at the docs (e.g. http://www.noobkit.com/ruby-array-join), Array.join should work as following: “Re…

---

## [Re: webgen 0.4.5](https://www.ruby-forum.com/t/re-webgen-0-4-5/108179)

<div class="topic-metadata">

**Author:** [@al\_batuul](https://www.ruby-forum.com/u/al_batuul)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/re-webgen-0-4-5/108179 "2007-06-29T20:07:59Z")

</div>

I faced the same problem even with different version, see below best, fatmah C:\>ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) \[i386-mswin32\] C:\>gem install webgen Need to update 44 gems from http://gems.rubyforge.or…

---

## [Hpricot question - how to modify a tag attribute](https://www.ruby-forum.com/t/hpricot-question-how-to-modify-a-tag-attribute/108172)

<div class="topic-metadata">

**Author:** [@ciocan](https://www.ruby-forum.com/u/ciocan)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 5:37pm UTC](https://www.ruby-forum.com/t/hpricot-question-how-to-modify-a-tag-attribute/108172 "2007-06-29T17:37:46Z")

</div>

Hello, How can I modify a tag attribute using Hpricot ? I.e. url = ‘http://mysite.com/mypage.html’ doc = Hpricot(open(url)) I want to replace from all tags the property src = “imagexxx.jpg” with src = “imageyyy.jp…

---

## [Tricky socks question: changing source IP on Net::HTTP](https://www.ruby-forum.com/t/tricky-socks-question-changing-source-ip-on-net-http/108125)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 5:32pm UTC](https://www.ruby-forum.com/t/tricky-socks-question-changing-source-ip-on-net-http/108125 "2007-06-29T17:32:45Z")

</div>

Howdy, I’ve got an interface with multiple IP addresses and I’m looking to make HTTP requests from the non-primary IP. How would I pull that off? Cheers, Eddie

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

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