# Ruby

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

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

---

## [Using IRB from a script](https://www.ruby-forum.com/t/using-irb-from-a-script/62751)

<div class="topic-metadata">

**Author:** [@vtphysguy](https://www.ruby-forum.com/u/vtphysguy)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 8:39pm UTC](https://www.ruby-forum.com/t/using-irb-from-a-script/62751 "2006-06-07T20:39:02Z")

</div>

I’d like to build a script that makes use of IRB for input and evaluation. Ideally, I’d also like to be able to capture exceptions raised from expressions entered and handle them. Can anyone point me to some resource…

---

## [Re: Possible YAML bug with quoted symbols?](https://www.ruby-forum.com/t/re-possible-yaml-bug-with-quoted-symbols/95635)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 8:38pm UTC](https://www.ruby-forum.com/t/re-possible-yaml-bug-with-quoted-symbols/95635 "2006-06-07T20:38:54Z")

</div>

Dear Dave, hmmm … reading Ara’s and Logan’s responses - how do you get to names with quotes in them ? Could you use something like Regexp.escape() on these - this should replace " by " ? What happens if you let yaml…

---

## [Hash to OpenStruct (#81)](https://www.ruby-forum.com/t/hash-to-openstruct-81/62314)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 35\
**Last updated:** [June 7, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/hash-to-openstruct-81/62314 "2006-06-07T19:57:56Z")

</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: …

---

## [Re: Possible YAML bug with quoted symbols?](https://www.ruby-forum.com/t/re-possible-yaml-bug-with-quoted-symbols/62732)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [June 7, 2006, 6:34pm UTC](https://www.ruby-forum.com/t/re-possible-yaml-bug-with-quoted-symbols/62732 "2006-06-07T18:34:49Z")

</div>

I don’t think this is specific of yaml - it’s done to say that your variable name is a String that contains a ’ or a " at the beginning and end , so “my\_string” or ‘my\_string’ are Strings with quotes in them and not…

---

## [Attributes not populated until called?](https://www.ruby-forum.com/t/attributes-not-populated-until-called/62641)

<div class="topic-metadata">

**Author:** [@darren\_kirby](https://www.ruby-forum.com/u/darren_kirby)\
**Replies:** 12\
**Last updated:** [June 7, 2006, 6:32pm UTC](https://www.ruby-forum.com/t/attributes-not-populated-until-called/62641 "2006-06-07T18:32:42Z")

</div>

Hello all, Pretty much new to Ruby, and I think I am not grasping something fundamental here. I’ve written some classes that grab meta tags from various audio file formats, and overrode 'to\_s" to dump the tags to th…

---

## [Getting rid of a while loop](https://www.ruby-forum.com/t/getting-rid-of-a-while-loop/62712)

<div class="topic-metadata">

**Author:** [@customsgod](https://www.ruby-forum.com/u/customsgod)\
**Replies:** 7\
**Last updated:** [June 7, 2006, 6:16pm UTC](https://www.ruby-forum.com/t/getting-rid-of-a-while-loop/62712 "2006-06-07T18:16:53Z")

</div>

I get a feeling there should be another way to make this happen without using a while loop, if anyone has any ideas that’d be great. while question=file.gets answer=file.gets @question\_array\[counter\]=Questions.new(…

---

## [RubyWrap - intelligent wrapping of comments in ruby (and oth](https://www.ruby-forum.com/t/rubywrap-intelligent-wrapping-of-comments-in-ruby-and-oth/62731)

<div class="topic-metadata">

**Author:** [@sumwutdum](https://www.ruby-forum.com/u/sumwutdum)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 5:55pm UTC](https://www.ruby-forum.com/t/rubywrap-intelligent-wrapping-of-comments-in-ruby-and-oth/62731 "2006-06-07T17:55:53Z")

</div>

After getting frustrated with existing solutions I threw together a script to wrap comments in my ruby code. It understands headers, basic lists, some rdoc formatting, indentation both before and after the #, passes …

---

## [Regex for splitting filenames](https://www.ruby-forum.com/t/regex-for-splitting-filenames/95599)

<div class="topic-metadata">

**Author:** [@darren\_kirby](https://www.ruby-forum.com/u/darren_kirby)\
**Replies:** 8\
**Last updated:** [June 7, 2006, 4:30pm UTC](https://www.ruby-forum.com/t/regex-for-splitting-filenames/95599 "2006-06-07T16:30:57Z")

</div>

Hello all, I want to split a filename into it’s root and extension, ie: someFileName.txt = ‘someFileName’ and ‘txt’ This is simple enough with string.split(), but what if the file has more than one period in it? I h…

---

## [While terminating process](https://www.ruby-forum.com/t/while-terminating-process/62721)

<div class="topic-metadata">

**Author:** [@stuartbrand](https://www.ruby-forum.com/u/stuartbrand)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 4:22pm UTC](https://www.ruby-forum.com/t/while-terminating-process/62721 "2006-06-07T16:22:18Z")

</div>

Hi all I have writing a program that servers http, very simple, however, if left for sometime idle the program terminates without error, it is running a while loop, snip below while (session = server.accept) Thread.…

---

## [HighLine - examples for using "list"](https://www.ruby-forum.com/t/highline-examples-for-using-list/57872)

<div class="topic-metadata">

**Author:** [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Replies:** 24\
**Last updated:** [June 7, 2006, 4:01pm UTC](https://www.ruby-forum.com/t/highline-examples-for-using-list/57872 "2006-06-07T16:01:18Z")

</div>

http://highline.rubyforge.org/doc/classes/HighLine.html I’m still very green, and I find it easier to read code than documentation. I’m not sure how to use HighLine’s “list” feature (specifically colums\_across) and I…

---

## [Installation of Win32-service module](https://www.ruby-forum.com/t/installation-of-win32-service-module/62669)

<div class="topic-metadata">

**Author:** [@Jatinder\_S](https://www.ruby-forum.com/u/Jatinder_S)\
**Replies:** 5\
**Last updated:** [June 7, 2006, 3:31pm UTC](https://www.ruby-forum.com/t/installation-of-win32-service-module/62669 "2006-06-07T15:31:34Z")

</div>

Hi, I intend to use Win32-service module to perform some operations with Windows services. I downloaded win32-service-0.5.0 from Rubyforge and referring README, when I try to install this module by issuing “ruby ex…

---

## [What's going on here? (Newbie question)](https://www.ruby-forum.com/t/whats-going-on-here-newbie-question/62664)

<div class="topic-metadata">

**Author:** [@MBMBMB](https://www.ruby-forum.com/u/MBMBMB)\
**Replies:** 5\
**Last updated:** [June 7, 2006, 3:13pm UTC](https://www.ruby-forum.com/t/whats-going-on-here-newbie-question/62664 "2006-06-07T15:13:14Z")

</div>

In irb: f = File.new(‘numbers.txt’) =\> #\<File:numbers.txt\> f.each {|line| puts line} 123 456 789 =\> #\<File:numbers.txt\> f.each {|line| puts line} =\> #\<File:numbers.txt\> Why doesn’t the second f.each work?

---

## [Trouble with create\_function and sqlite3-ruby-1.1.0](https://www.ruby-forum.com/t/trouble-with-create-function-and-sqlite3-ruby-1-1-0/62711)

<div class="topic-metadata">

**Author:** [@kivle](https://www.ruby-forum.com/u/kivle)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 2:50pm UTC](https://www.ruby-forum.com/t/trouble-with-create-function-and-sqlite3-ruby-1-1-0/62711 "2006-06-07T14:50:27Z")

</div>

Hi, I’m currently trying to implement an app that makes use of the sqlite3-ruby library. My app requires that I compute soundexes for a lot of values, and also that I’m able to clean up some names with a basic gsub-b…

---

## [Ruby Weekly News 29th May - 4th June 2006](https://www.ruby-forum.com/t/ruby-weekly-news-29th-may-4th-june-2006/62595)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 16\
**Last updated:** [June 7, 2006, 12:31pm UTC](https://www.ruby-forum.com/t/ruby-weekly-news-29th-may-4th-june-2006/62595 "2006-06-07T12:31:02Z")

</div>

http://www.rubyweeklynews.org/20060604.html Ruby Weekly News 29th May - 4th June 2006 Ruby Weekly News is a summary of the week’s activity for the ruby-talk mailing list, and its mirror equivalents the ruby-talk goog…

---

## [Re: Ruby and Gnuplot and Windows](https://www.ruby-forum.com/t/re-ruby-and-gnuplot-and-windows/95610)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 12:24pm UTC](https://www.ruby-forum.com/t/re-ruby-and-gnuplot-and-windows/95610 "2006-06-07T12:24:43Z")

</div>

Just tried another example : it’s possible to write data to a file and then start gnuplot to read it in and process it. This works for me now, even though I don’t understand why talking directly to Gnuplot isn’t poss…

---

## [Ruby and Gnuplot and Windows](https://www.ruby-forum.com/t/ruby-and-gnuplot-and-windows/95611)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 12:20pm UTC](https://www.ruby-forum.com/t/ruby-and-gnuplot-and-windows/95611 "2006-06-07T12:20:39Z")

</div>

I want to combine Gnuplot support to an FXRuby application, and unfortunately, this always crashes with Segfault when I run it in Cygwin, which used to be my way of running Ruby and indeed anything on Windows… So I …

---

## [Tempfile.new("foo") --\> /tmp/foo123.0 \*NOT\* /tmp/foo.123.0 l](https://www.ruby-forum.com/t/tempfile-new-foo-tmp-foo123-0-not-tmp-foo-123-0-l/62674)

<div class="topic-metadata">

**Author:** [@phallstrom](https://www.ruby-forum.com/u/phallstrom)\
**Replies:** 1\
**Last updated:** [June 7, 2006, 9:23am UTC](https://www.ruby-forum.com/t/tempfile-new-foo-tmp-foo123-0-not-tmp-foo-123-0-l/62674 "2006-06-07T09:23:44Z")

</div>

Hi all - Just noticed that the documentation for Tempfile.new says: Creates a temporary file of mode 0600 in the temporary directory whose name is basename.pid.n .... But it’s actually basenamepid.n. Line 70 of tempf…

---

## [Re: Console input](https://www.ruby-forum.com/t/re-console-input/62678)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 8:59am UTC](https://www.ruby-forum.com/t/re-console-input/62678 "2006-06-07T08:59:34Z")

</div>

fr Michal: data.chomp data.chomp! or if you don’t want the bang data = gets.chomp this q should be faqed, imho.

---

## [Console input](https://www.ruby-forum.com/t/console-input/95601)

<div class="topic-metadata">

**Author:** [@michal](https://www.ruby-forum.com/u/michal)\
**Replies:** 1\
**Last updated:** [June 7, 2006, 8:25am UTC](https://www.ruby-forum.com/t/console-input/95601 "2006-06-07T08:25:46Z")

</div>

I’d ask you why the following code doesn’t works: data = gets data.chomp if data == “a” puts “True” else puts “False” end It’s always false. (ruby 1.8.4 in WinXP console) Thanks for your answers.

---

## [Link\_to with pagination](https://www.ruby-forum.com/t/link-to-with-pagination/95600)

<div class="topic-metadata">

**Author:** [@chris](https://www.ruby-forum.com/u/chris)\
**Replies:** 2\
**Last updated:** [June 7, 2006, 7:39am UTC](https://www.ruby-forum.com/t/link-to-with-pagination/95600 "2006-06-07T07:39:40Z")

</div>

I need some help with pagination and the link\_to in the view. I’m trying to include a hash in the pagination link\_to params and it keeps flattening out my hash. Example: Here’s my hash called @answer: “answer”=\>{“6”…

---

## [Writing to a file without opening it](https://www.ruby-forum.com/t/writing-to-a-file-without-opening-it/62568)

<div class="topic-metadata">

**Author:** [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Replies:** 4\
**Last updated:** [June 7, 2006, 6:11am UTC](https://www.ruby-forum.com/t/writing-to-a-file-without-opening-it/62568 "2006-06-07T06:11:13Z")

</div>

File.open(file, ‘a+’) won’t work when the file is not readable. However, in a shell I can append a string using echo string \>\> file Am I forced to use exec + echo to append content, or is there a way to append a stri…

---

## [Re: (DBI::Utils::XMLFormatter) Output results as a string?](https://www.ruby-forum.com/t/re-dbi-xmlformatter-output-results-as-a-string/61991)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [June 7, 2006, 6:01am UTC](https://www.ruby-forum.com/t/re-dbi-xmlformatter-output-results-as-a-string/61991 "2006-06-07T06:01:59Z")

</div>

Try this: DBI::Utils::XMLFormatter.table( dbh.select\_all(“select \* from people”), ‘rows’, ‘row’, asdf) ) The actual definition looks like this: XMLFormatter.table(rows, roottag = “rows”, rowtag = “row”, out…

---

## [Can I keep re-running the same script? how?](https://www.ruby-forum.com/t/can-i-keep-re-running-the-same-script-how/62651)

<div class="topic-metadata">

**Author:** [@siguva](https://www.ruby-forum.com/u/siguva)\
**Replies:** 15\
**Last updated:** [June 7, 2006, 5:55am UTC](https://www.ruby-forum.com/t/can-i-keep-re-running-the-same-script-how/62651 "2006-06-07T05:55:52Z")

</div>

I want to run a particular script every 3 minutes. I would do this using crontab in Linux, but I am having trouble getting that to work. The script works fine from the Windows or Linux command line, however. I though…

---

## [Automating Access](https://www.ruby-forum.com/t/automating-access/62667)

<div class="topic-metadata">

**Author:** [@Warren\_Dowling](https://www.ruby-forum.com/u/Warren_Dowling)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 4:30am UTC](https://www.ruby-forum.com/t/automating-access/62667 "2006-06-07T04:30:55Z")

</div>

Hi, I’m currently working with the WIN32OLE object in an attempt to create a test framework for the automation testing (mostly regression) of an access database that we have written. I am having great difficulty in …

---

## [Email reading & more](https://www.ruby-forum.com/t/email-reading-more/62661)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 3:07am UTC](https://www.ruby-forum.com/t/email-reading-more/62661 "2006-06-07T03:07:47Z")

</div>

On 6/6/06, Eric H. removed\_email\_address@domain.invalid wrote: I’m writing tools to read my mailing list traffic for me and tell me what’s interesting. I get between 500 and 1000 mailing list mails per day. There …

---

## [DLL load path](https://www.ruby-forum.com/t/dll-load-path/95596)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 4\
**Last updated:** [June 7, 2006, 2:10am UTC](https://www.ruby-forum.com/t/dll-load-path/95596 "2006-06-07T02:10:10Z")

</div>

Hi all. The strange question: I need modify path, where .dll’s would be looked for (from ruby script). For ex. require ‘raspell’ #bang! 'aspell.dll could’nt be found I need something like setenv(‘PATH’, getenv(‘PA…

---

## [Strange behaviour of Rb-Gsl random numbers (Windows one-clic](https://www.ruby-forum.com/t/strange-behaviour-of-rb-gsl-random-numbers-windows-one-clic/95594)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [June 7, 2006, 12:50am UTC](https://www.ruby-forum.com/t/strange-behaviour-of-rb-gsl-random-numbers-windows-one-clic/95594 "2006-06-07T00:50:48Z")

</div>

Dear all, I’ve installed Rb-gsl for the Ruby-one click installer, and tried GSL::Rng.new.uniform to get a random number. This works, but always gives the same number: require “gsl” res=\[\] for k in 0…20 res\<\<GSL::…

---

## [Ruby and Gnuplot under Windows (was: Re: External applicatio](https://www.ruby-forum.com/t/ruby-and-gnuplot-under-windows-was-re-external-applicatio/62649)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [June 7, 2006, 12:44am UTC](https://www.ruby-forum.com/t/ruby-and-gnuplot-under-windows-was-re-external-applicatio/62649 "2006-06-07T00:44:32Z")

</div>

Dear Chris, thanks for pointing me to ruby gnuplot. However, I need to set up a connection under Windows XP (in addition to one in Linux). Now, in the manual of Ruby Gnuplot, it says: Gnuplot.open Instantiates a n…

---

## [Re: can I keep re-running the same script? how?](https://www.ruby-forum.com/t/re-can-i-keep-re-running-the-same-script-how/62653)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 12:41am UTC](https://www.ruby-forum.com/t/re-can-i-keep-re-running-the-same-script-how/62653 "2006-06-07T00:41:17Z")

</div>

Uh… while (true) do # your stuff here sleep(180) end

---

## [Animation](https://www.ruby-forum.com/t/animation/95580)

<div class="topic-metadata">

**Author:** [@mohammad](https://www.ruby-forum.com/u/mohammad)\
**Replies:** 3\
**Last updated:** [June 7, 2006, 12:13am UTC](https://www.ruby-forum.com/t/animation/95580 "2006-06-07T00:13:34Z")

</div>

Okay I wana make a game like Flyff in ruby but, is there a way to control a character or even to make a rich gui like the one in Flyff? Flyff site: flyff.gpotato.com

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

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