# Ruby

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

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

---

## [Wanting clarification for string delimiters](https://www.ruby-forum.com/t/wanting-clarification-for-string-delimiters/84843)

<div class="topic-metadata">

**Author:** [@nevf](https://www.ruby-forum.com/u/nevf)\
**Replies:** 3\
**Last updated:** [February 8, 2007, 6:53am UTC](https://www.ruby-forum.com/t/wanting-clarification-for-string-delimiters/84843 "2007-02-08T06:53:39Z")

</div>

%q, %Q, %w, %r, %x all begin a string which terminates with the character that matches the character after %q etc. eg. %q\[blah\] %q/blah/ But what are the rules for %SomeChar. eg %(blah) works as does %/blah/ and %+bla…

---

## [Adding Math.log2 and Math.logn to the core library](https://www.ruby-forum.com/t/adding-math-log2-and-math-logn-to-the-core-library/84803)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 9\
**Last updated:** [February 8, 2007, 6:01am UTC](https://www.ruby-forum.com/t/adding-math-log2-and-math-logn-to-the-core-library/84803 "2007-02-08T06:01:22Z")

</div>

In a world of humans and finance, it’s quite common to need base-10 logarithms. (Yay for Math.log10!) In a world of computers, it’s also quite common to need base-2 logarithms. Ruby only gives you ‘natural’ logarithms…

---

## [Ograph 0.1.0 Released](https://www.ruby-forum.com/t/ograph-0-1-0-released/84708)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 2\
**Last updated:** [February 8, 2007, 5:08am UTC](https://www.ruby-forum.com/t/ograph-0-1-0-released/84708 "2007-02-08T05:08:20Z")

</div>

ograph version 0.1.0 has been released! http://seattlerb.rubyforge.org/ ObjectGraph will output Graphviz dot files of your objects in memory. It will ferret out your instance variables and enumerate over your enumera…

---

## [Classifier::Bayes - handling "none of the above" cases](https://www.ruby-forum.com/t/classifier-bayes-handling-none-of-the-above-cases/84554)

<div class="topic-metadata">

**Author:** [@jfoxny](https://www.ruby-forum.com/u/jfoxny)\
**Replies:** 9\
**Last updated:** [February 8, 2007, 4:35am UTC](https://www.ruby-forum.com/t/classifier-bayes-handling-none-of-the-above-cases/84554 "2007-02-08T04:35:33Z")

</div>

I’m using Classifier::Bayes and am trying to figure out how to handle classifications that don’t fit any of my categories. It seems that it will guess a category no matter how poor the match. Is there a good way to us…

---

## [Is there any timing class in the standard lib?](https://www.ruby-forum.com/t/is-there-any-timing-class-in-the-standard-lib/84707)

<div class="topic-metadata">

**Author:** [@lnthai2002](https://www.ruby-forum.com/u/lnthai2002)\
**Replies:** 5\
**Last updated:** [February 8, 2007, 3:19am UTC](https://www.ruby-forum.com/t/is-there-any-timing-class-in-the-standard-lib/84707 "2007-02-08T03:19:14Z")

</div>

Hi guy, I 'm doing a deamon that call a method every hour. Is there any class in the standard library that I can use for counting the time? Thai

---

## [One-Click Ruby Installer for Windows: 185-22 RC3](https://www.ruby-forum.com/t/one-click-ruby-installer-for-windows-185-22-rc3/84538)

<div class="topic-metadata">

**Author:** [@curthibbs](https://www.ruby-forum.com/u/curthibbs)\
**Replies:** 9\
**Last updated:** [February 8, 2007, 1:59am UTC](https://www.ruby-forum.com/t/one-click-ruby-installer-for-windows-185-22-rc3/84538 "2007-02-08T01:59:08Z")

</div>

RC3 upgrades RubyGems to 0.9.2, and includes the correct openssl.so file (RC2 had the wrong file), and running rake no longer closes the console window. If there are no show-stoppers reported, then this will become th…

---

## [PHP in instant rails](https://www.ruby-forum.com/t/php-in-instant-rails/84370)

<div class="topic-metadata">

**Author:** [@Hanan\_M](https://www.ruby-forum.com/u/Hanan_M)\
**Replies:** 7\
**Last updated:** [February 8, 2007, 12:15am UTC](https://www.ruby-forum.com/t/php-in-instant-rails/84370 "2007-02-08T00:15:00Z")

</div>

Hello I’m trying to use php in rhtml(views) of Instant rails, but it is not working although javascript works and instant rails supports PHP. Why? Thanks in advance Hana

---

## [Terminal emulator library](https://www.ruby-forum.com/t/terminal-emulator-library/84827)

<div class="topic-metadata">

**Author:** [@Spam\_BSWare](https://www.ruby-forum.com/u/Spam_BSWare)\
**Replies:** 0\
**Last updated:** [February 8, 2007, 12:04am UTC](https://www.ruby-forum.com/t/terminal-emulator-library/84827 "2007-02-08T00:04:59Z")

</div>

Hi all: I’m looking into writing a terminal-emulator based database interface with Ruby. I want it to be totally cross-platform and I’d like as many options as possible in constructing the terminal interface the wa…

---

## [Sorting object by date](https://www.ruby-forum.com/t/sorting-object-by-date/84711)

<div class="topic-metadata">

**Author:** [@lnthai2002](https://www.ruby-forum.com/u/lnthai2002)\
**Replies:** 1\
**Last updated:** [February 7, 2007, 11:33pm UTC](https://www.ruby-forum.com/t/sorting-object-by-date/84711 "2007-02-07T23:33:56Z")

</div>

Hey guys, I need a fast way to sort an array of object by their .time in xml time scheme. In java,it would be easy using priority queue,is there any thing similar to priority queue in ruby? Since this is a very small …

---

## [Defining \<\<](https://www.ruby-forum.com/t/defining/84815)

<div class="topic-metadata">

**Author:** [@technodolt](https://www.ruby-forum.com/u/technodolt)\
**Replies:** 5\
**Last updated:** [February 7, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/defining/84815 "2007-02-07T23:11:52Z")

</div>

I’m not 100% how exactly to search to find out if someone else has posed this question, but why does the following happen? Given: class Hash def \<\< (key, val=nil) self.store(key, val) end end h = {} h \<\< ‘test’ …

---

## [Histogram of histograms](https://www.ruby-forum.com/t/histogram-of-histograms/84810)

<div class="topic-metadata">

**Author:** [@Charles\_LSSnyder](https://www.ruby-forum.com/u/Charles_LSSnyder)\
**Replies:** 4\
**Last updated:** [February 7, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/histogram-of-histograms/84810 "2007-02-07T23:10:52Z")

</div>

Hi I have several text files that look like this: Brazil, 10 Brazil, 13 Brazil, 9 Bulgaria, 1 Canada, 48 Canada, 52 Canada, 38 Canada, 55 Canada, 59 Chile, 1 Chile, 1 Chile, 2 China, 7 China, 18 China,…

---

## [Question regarding adaption from swig/wrapper-interface from](https://www.ruby-forum.com/t/question-regarding-adaption-from-swig-wrapper-interface-from/84816)

<div class="topic-metadata">

**Author:** [@Tammo\_T](https://www.ruby-forum.com/u/Tammo_T)\
**Replies:** 0\
**Last updated:** [February 7, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/question-regarding-adaption-from-swig-wrapper-interface-from/84816 "2007-02-07T22:45:48Z")

</div>

Hello, actually I am fighting with the adaption of the interface to ruby. A lot of things are not the big problem. For the start I would like to know if there is a equivalent for croak in ruby. I used simply printf-…

---

## [How do I install both Ruby 1.8 and Ruby 1.9?](https://www.ruby-forum.com/t/how-do-i-install-both-ruby-1-8-and-ruby-1-9/84594)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [February 7, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/how-do-i-install-both-ruby-1-8-and-ruby-1-9/84594 "2007-02-07T21:57:18Z")

</div>

Hi, I have Ruby 1.8 installed (on Linux) in /usr/local/bin/. I want to have a copy of a Ruby 1.9 snapshot around too, so I can try out stuff out with that. But I can’t figure out how to install it in a different loca…

---

## [Algorithm Help - Grid Space Calculations](https://www.ruby-forum.com/t/algorithm-help-grid-space-calculations/84798)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 6\
**Last updated:** [February 7, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/algorithm-help-grid-space-calculations/84798 "2007-02-07T21:27:38Z")

</div>

I have a problem, and I’m hoping someone will find it interesting enough to understand it and come up with a better/more direct solution. I’d claim that I need more coffee, but I don’t drink coffee. The mental failing…

---

## [Apache and instant rails](https://www.ruby-forum.com/t/apache-and-instant-rails/84801)

<div class="topic-metadata">

**Author:** [@Hanan\_M](https://www.ruby-forum.com/u/Hanan_M)\
**Replies:** 1\
**Last updated:** [February 7, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/apache-and-instant-rails/84801 "2007-02-07T21:25:38Z")

</div>

Hello How could I launch Instant rails with Appache please help Thank you Hanan

---

## [Re: Match until new line](https://www.ruby-forum.com/t/re-match-until-new-line/84785)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 3\
**Last updated:** [February 7, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/re-match-until-new-line/84785 "2007-02-07T21:13:36Z")

</div>

From: anon1m0us \[mailto:removed\_email\_address@domain.invalid\] WHat is sharelist = \<\<EOS ??? See: http://rubyurl.com/SSM

---

## [How do you get the rows out of FasterCSV?](https://www.ruby-forum.com/t/how-do-you-get-the-rows-out-of-fastercsv/84590)

<div class="topic-metadata">

**Author:** [@gary](https://www.ruby-forum.com/u/gary)\
**Replies:** 11\
**Last updated:** [February 7, 2007, 9:00pm UTC](https://www.ruby-forum.com/t/how-do-you-get-the-rows-out-of-fastercsv/84590 "2007-02-07T21:00:34Z")

</div>

Hi. I want to add a normalized column to a csv file. That is, I want to read the file, sum all of a column X, then add another column in which each X is divided by the sum. So do I use the CSV rows twice without readi…

---

## [Regular expressions (extracting urls)](https://www.ruby-forum.com/t/regular-expressions-extracting-urls/84545)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 4\
**Last updated:** [February 7, 2007, 8:05pm UTC](https://www.ruby-forum.com/t/regular-expressions-extracting-urls/84545 "2007-02-07T20:05:24Z")

</div>

Hi! I have to extract an url from the text and make it a link (a href…)… The trick is that I have to be careful not to replace the url, that are already a part of the link. so: link = “Go here: http://www.something.…

---

## [Trying to send a soap message directly at a server](https://www.ruby-forum.com/t/trying-to-send-a-soap-message-directly-at-a-server/84223)

<div class="topic-metadata">

**Author:** [@shinji](https://www.ruby-forum.com/u/shinji)\
**Replies:** 7\
**Last updated:** [February 7, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/trying-to-send-a-soap-message-directly-at-a-server/84223 "2007-02-07T20:04:08Z")

</div>

I’ve now tried 2 different methods of sending a soap message (read in from a file) at a server, one using the net/http library the other a socket. require ‘soap/wsdlDriver’ require ‘rexml/document’ #require ‘net/htt…

---

## [Parse csv similar file](https://www.ruby-forum.com/t/parse-csv-similar-file/84620)

<div class="topic-metadata">

**Author:** [@RebhanS\_Gilbert](https://www.ruby-forum.com/u/RebhanS_Gilbert)\
**Replies:** 16\
**Last updated:** [February 7, 2007, 7:27pm UTC](https://www.ruby-forum.com/t/parse-csv-similar-file/84620 "2007-02-07T19:27:19Z")

</div>

Hi, i have a txtfile with a format like that = AP850KP;INCLIB;E023889;AP013;240107;0730 AP850SD$;INCLIB;E052337;AP013;240107;0730 AP850SDA;INCLIB;E050441;AP013;240107;0730 AP850SDI;INCLIB;E023889;AP013;240107;0730 …

---

## [Multiple "require" calls -\> app slow to start](https://www.ruby-forum.com/t/multiple-require-calls-app-slow-to-start/84600)

<div class="topic-metadata">

**Author:** [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Replies:** 2\
**Last updated:** [February 7, 2007, 6:36pm UTC](https://www.ruby-forum.com/t/multiple-require-calls-app-slow-to-start/84600 "2007-02-07T18:36:13Z")

</div>

Hi, More and more files are being added to my client ruby application, and it is getting quite slow to start, even on a fast machine. It takes about 15 seconds in some cases. The problem is with the call to “require”…

---

## [Tips for active record without rails](https://www.ruby-forum.com/t/tips-for-active-record-without-rails/84658)

<div class="topic-metadata">

**Author:** [@nephish](https://www.ruby-forum.com/u/nephish)\
**Replies:** 5\
**Last updated:** [February 7, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/tips-for-active-record-without-rails/84658 "2007-02-07T18:01:07Z")

</div>

Hello there all, i have used rails to build our company website, and i loved it. i have a lot of maintenace scripts to run through cron and i would really dig being able to do it with active record. Does anyone know…

---

## [AWS Presentation at the Feb. Phoenix Ruby User Group Meeting](https://www.ruby-forum.com/t/aws-presentation-at-the-feb-phoenix-ruby-user-group-meeting/84782)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [February 7, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/aws-presentation-at-the-feb-phoenix-ruby-user-group-meeting/84782 "2007-02-07T18:01:07Z")

</div>

What: Phoenix Ruby U. Group When: February 12, 2007, 6:15 PM Where: Axway (formerly known as Cyclone Commerce) offices See http://www.rubyaz.org/groups/prug for address and map Topic: Amazon Web Services Jinesh Var…

---

## [Match until new line](https://www.ruby-forum.com/t/match-until-new-line/84768)

<div class="topic-metadata">

**Author:** [@anon1m0us](https://www.ruby-forum.com/u/anon1m0us)\
**Replies:** 4\
**Last updated:** [February 7, 2007, 5:59pm UTC](https://www.ruby-forum.com/t/match-until-new-line/84768 "2007-02-07T17:59:07Z")

</div>

I am running a server utility that allows me to view server shares and permissions. The command I am using is: SHARES=Array.new SHARES=\`srvcheck \\\\testserver.split("\\n") This will change to be a variable. the outpu…

---

## [MultiThreading in C++](https://www.ruby-forum.com/t/multithreading-in-c/84679)

<div class="topic-metadata">

**Author:** [@ktxn1020](https://www.ruby-forum.com/u/ktxn1020)\
**Replies:** 8\
**Last updated:** [February 7, 2007, 5:30pm UTC](https://www.ruby-forum.com/t/multithreading-in-c/84679 "2007-02-07T17:30:03Z")

</div>

Hi, I am pretty new to multithreaded programming. I have a question with a hope someone can help me out. I want to find distances between points using thread (Win MFC) For instance distance from: p1 to p2, p3, p4, p…

---

## [Question about closure example on p. 56 of pickaxe book](https://www.ruby-forum.com/t/question-about-closure-example-on-p-56-of-pickaxe-book/84721)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 4\
**Last updated:** [February 7, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/question-about-closure-example-on-p-56-of-pickaxe-book/84721 "2007-02-07T16:56:59Z")

</div>

I’m new to both Ruby and closures, and I’m trying to nail down exactly what’s going on in an example on p. 56 in the 2nd edition of Programming Ruby: songlist = SongList.new class JukeboxButton \< Button def initiali…

---

## [Ruby CSS parser](https://www.ruby-forum.com/t/ruby-css-parser/84570)

<div class="topic-metadata">

**Author:** [@S\_Kevin](https://www.ruby-forum.com/u/S_Kevin)\
**Replies:** 9\
**Last updated:** [February 7, 2007, 3:48pm UTC](https://www.ruby-forum.com/t/ruby-css-parser/84570 "2007-02-07T15:48:51Z")

</div>

Anyone know of a decent ruby CSS parser? \_Kevin

---

## [Default to when missing](https://www.ruby-forum.com/t/default-to-when-missing/84684)

<div class="topic-metadata">

**Author:** [@jerryjj](https://www.ruby-forum.com/u/jerryjj)\
**Replies:** 4\
**Last updated:** [February 7, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/default-to-when-missing/84684 "2007-02-07T15:37:48Z")

</div>

On my website, I have a field in the sql server that lists the image location/name to display for an item. All is wonderful. How can I have the site select an ‘image is no available’ image if the file name it is looki…

---

## [File.write bug](https://www.ruby-forum.com/t/file-write-bug/84742)

<div class="topic-metadata">

**Author:** [@wouter](https://www.ruby-forum.com/u/wouter)\
**Replies:** 2\
**Last updated:** [February 7, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/file-write-bug/84742 "2007-02-07T15:27:47Z")

</div>

Hello all, I’m relatively new to ruby and I think I’ve found a bug. It doesn’t seem to be in my code. I written this test script: test.rb File.open(“blaat.txt”,“w”) do |f| f.write “test\\r\\n” f.write “test\\r” f.wri…

---

## [Is it a Ruby ? Rails ? or JS ? problem](https://www.ruby-forum.com/t/is-it-a-ruby-rails-or-js-problem/84750)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 1\
**Last updated:** [February 7, 2007, 2:50pm UTC](https://www.ruby-forum.com/t/is-it-a-ruby-rails-or-js-problem/84750 "2007-02-07T14:50:39Z")

</div>

In a Rails controller action, I am receiving a string parameter back from an Ajax request #using inline RJS (Remote JavaScript), I render html replacing a hidden input field in a form render :update do |page| page.r…

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

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