# Ruby

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

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

---

## [Ruby-trunk Marshal.dump bug](https://www.ruby-forum.com/t/ruby-trunk-marshal-dump-bug/133121)

<div class="topic-metadata">

**Author:** [@nagachika](https://www.ruby-forum.com/u/nagachika)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 10:45am UTC](https://www.ruby-forum.com/t/ruby-trunk-marshal-dump-bug/133121 "2008-04-10T10:45:15Z")

</div>

nagachika e$B$H?=$7$^$9!#e(B Debian GNU/Linux e$B$Ge(B 1.9(trunk) e$B$G0J2\<$N%9%/%j%W%H$,4|BTDL$j$KF0$-$^$;$s!#e(B $ cat test.rb t = Time.now p Marshal.load(Marshal.dump(\[t, t\])) $ ./ruby-trunk test.rb \[2008-03-28…

---

## [Resolv.getaddress $B$,%(%i!\<$K$J$k(B](https://www.ruby-forum.com/t/resolv-getaddress-b-i-k-j-k-b/133534)

<div class="topic-metadata">

**Author:** [@Kouhei\_Y](https://www.ruby-forum.com/u/Kouhei_Y)\
**Replies:** 4\
**Last updated:** [April 10, 2008, 7:19am UTC](https://www.ruby-forum.com/t/resolv-getaddress-b-i-k-j-k-b/133534 "2008-04-10T07:19:19Z")

</div>

e$BLxED$G$9!#e(B ruby\_1\_8 e$B$N@hF,$G!"e(BResolv.getaddress e$B$,\<!$N$h$&$K%(%i!\<$K$J$j$^$9!#e(B Cygwin e$B$He(B Debian etch e$B\>e$G3NG’$7$F$$$^$9!#e(B % ruby -v -rresolv -e ‘p Resolv.getaddress(“www.ruby-lang.org”)’ …

---

## [Exceptions in file copying](https://www.ruby-forum.com/t/exceptions-in-file-copying/134256)

<div class="topic-metadata">

**Author:** [@owc](https://www.ruby-forum.com/u/owc)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 5:25am UTC](https://www.ruby-forum.com/t/exceptions-in-file-copying/134256 "2008-04-10T05:25:32Z")

</div>

All, First of all, Thanks to those who helped out in my previous thread. It was really of great help. :slight\_smile: Alright now, another issue i just can figure out, so i decided to post a new thread :wink: source=…

---

## [AG\_E\_PARSER\_BAD\_TYPE when using Grid](https://www.ruby-forum.com/t/ag-e-parser-bad-type-when-using-grid/134346)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 4\
**Last updated:** [April 10, 2008, 4:18am UTC](https://www.ruby-forum.com/t/ag-e-parser-bad-type-when-using-grid/134346 "2008-04-10T04:18:35Z")

</div>

Hi again, I get a XamlException with error AG\_E\_PARSER\_BAD\_TYPE whenever I use a Grid control inside the Xaml (even with an Expression Blend generated Xaml file). Is the Grid control currently supported when working…

---

## [Testcase order](https://www.ruby-forum.com/t/testcase-order/134298)

<div class="topic-metadata">

**Author:** [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Replies:** 6\
**Last updated:** [April 10, 2008, 3:10am UTC](https://www.ruby-forum.com/t/testcase-order/134298 "2008-04-10T03:10:09Z")

</div>

I’m trying to run different testcases in a file: require ‘testcases/dopTest’ require ‘testcases/bipTest’ require ‘testcases/canTest’ But when I run it the order is not as I wrote it. First it’s run bipTest and the l…

---

## [Heavy loop functions slow](https://www.ruby-forum.com/t/heavy-loop-functions-slow/134135)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 12\
**Last updated:** [April 10, 2008, 2:11am UTC](https://www.ruby-forum.com/t/heavy-loop-functions-slow/134135 "2008-04-10T02:11:06Z")

</div>

Alright so I was playing with my large amounts of data and ran into yet another problem with shoving it into a loop that requires a substantial amount of memory. dataArray = \[\] output = arrayOut.to\_s.chop!.split(",") …

---

## [Question about backquotes and linux echo](https://www.ruby-forum.com/t/question-about-backquotes-and-linux-echo/134352)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 2:09am UTC](https://www.ruby-forum.com/t/question-about-backquotes-and-linux-echo/134352 "2008-04-10T02:09:21Z")

</div>

Hi all, I can’t figure out why the following works from the command line but not from the backquotes: echo -e “a\\nb\\naa” | grep a This should produce: a aa However, when I execute: puts echo -e "a\\\\nb\\\\naa" | gre…

---

## [Building ruby](https://www.ruby-forum.com/t/building-ruby/134223)

<div class="topic-metadata">

**Author:** [@jonraphaelson](https://www.ruby-forum.com/u/jonraphaelson)\
**Replies:** 3\
**Last updated:** [April 10, 2008, 1:54am UTC](https://www.ruby-forum.com/t/building-ruby/134223 "2008-04-10T01:54:09Z")

</div>

The linux systems I admin @ work have an old version of ruby (1.8.2). I’ve decided to attempt an upgrade. (SuSE 9.1 fwiw.) First attempt was with Ruby 1.9.0-1. Everything seemed to work fine, even got a recent build o…

---

## [Dependency injection with Needle gem](https://www.ruby-forum.com/t/dependency-injection-with-needle-gem/134322)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 3\
**Last updated:** [April 9, 2008, 11:52pm UTC](https://www.ruby-forum.com/t/dependency-injection-with-needle-gem/134322 "2008-04-09T23:52:29Z")

</div>

I am puzzling through a few things with needle and dependency injection. I only know of one library that uses it which is net-ssh (v 1.1.2) since both were written by Jamis B… Anyone know of another publicly available…

---

## [Question of self](https://www.ruby-forum.com/t/question-of-self/134342)

<div class="topic-metadata">

**Author:** [@dewie](https://www.ruby-forum.com/u/dewie)\
**Replies:** 4\
**Last updated:** [April 9, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/question-of-self/134342 "2008-04-09T23:43:42Z")

</div>

module FunFunModule def self.included(base) base.extend ClassMethods class \<\< base # \<- Is this the instance of ActiveRecord? ... end end module ClassMethods … end end The above code is included into ActiveRec…

---

## [RMagick and Collision Mask](https://www.ruby-forum.com/t/rmagick-and-collision-mask/134323)

<div class="topic-metadata">

**Author:** [@di3go](https://www.ruby-forum.com/u/di3go)\
**Replies:** 1\
**Last updated:** [April 9, 2008, 8:50pm UTC](https://www.ruby-forum.com/t/rmagick-and-collision-mask/134323 "2008-04-09T20:50:33Z")

</div>

Im trying to make a perfect pixel collision in a game and im gonna use a collision mask to do this, the physics its with chipmunk and i need a polygon to do it, my idea is, read the image pixel per pixel and store in …

---

## [Delete first line of a text file](https://www.ruby-forum.com/t/delete-first-line-of-a-text-file/134316)

<div class="topic-metadata">

**Author:** [@uncle](https://www.ruby-forum.com/u/uncle)\
**Replies:** 3\
**Last updated:** [April 9, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/delete-first-line-of-a-text-file/134316 "2008-04-09T20:37:07Z")

</div>

hi, how can i delete first line of a file? example: file.txt: 1 2 3 4 after operation: file.txt: 2 3 4 thanks!

---

## [IronRuby r93 on Mono](https://www.ruby-forum.com/t/ironruby-r93-on-mono/134315)

<div class="topic-metadata">

**Author:** [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Replies:** 1\
**Last updated:** [April 9, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/ironruby-r93-on-mono/134315 "2008-04-09T20:27:47Z")

</div>

I updated HOWTO and patches. http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ To quote: “Previously, you had to build Mono from SVN. Instruction is still provided below in case it is needed again. But you can u…

---

## [R93 update](https://www.ruby-forum.com/t/r93-update/134286)

<div class="topic-metadata">

**Author:** [@akinsgre](https://www.ruby-forum.com/u/akinsgre)\
**Replies:** 2\
**Last updated:** [April 9, 2008, 8:23pm UTC](https://www.ruby-forum.com/t/r93-update/134286 "2008-04-09T20:23:03Z")

</div>

I had written a small “hello world” app that read a ruby file, using IronRuby. It used this “puts "Ruby and ${variable} together at last"” where “variable” is a global assigned in the C# program. The program I’d writ…

---

## [FXRuby Book is Now in Print!](https://www.ruby-forum.com/t/fxruby-book-is-now-in-print/134307)

<div class="topic-metadata">

**Author:** [@Lyle\_J](https://www.ruby-forum.com/u/Lyle_J)\
**Replies:** 1\
**Last updated:** [April 9, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/fxruby-book-is-now-in-print/134307 "2008-04-09T20:20:07Z")

</div>

All, I’m pleased to announce that the new book, “FXRuby: Create Lean and Mean GUIs with Ruby”, is now available in print: http://www.pragprog.com/titles/fxruby This is the first book ever dedicated to the subject of …

---

## [Problem in calling the script written in other file](https://www.ruby-forum.com/t/problem-in-calling-the-script-written-in-other-file/134138)

<div class="topic-metadata">

**Author:** [@pranjal\_jain](https://www.ruby-forum.com/u/pranjal_jain)\
**Replies:** 1\
**Last updated:** [April 9, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/problem-in-calling-the-script-written-in-other-file/134138 "2008-04-09T19:40:41Z")

</div>

Dear ALL Hi, I am practicing Ruby from the last 2 weeks. I am trying to call the script in one file to the script written in other file. I had written a script in test.rb The script is as follows : ###############…

---

## [System.Action name collision](https://www.ruby-forum.com/t/system-action-name-collision/134305)

<div class="topic-metadata">

**Author:** [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Replies:** 1\
**Last updated:** [April 9, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/system-action-name-collision/134305 "2008-04-09T19:11:49Z")

</div>

Cross-posting to mono-dev and ironruby-core. System.Action delegate types (and its generic versions) were newly introduced in .NET 3.5, and they live inside System.Core.dll. Dynamic Language Runtime wants to run on .N…

---

## [Unable to open the script in anouther script](https://www.ruby-forum.com/t/unable-to-open-the-script-in-anouther-script/134248)

<div class="topic-metadata">

**Author:** [@pranjal\_jain](https://www.ruby-forum.com/u/pranjal_jain)\
**Replies:** 3\
**Last updated:** [April 9, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/unable-to-open-the-script-in-anouther-script/134248 "2008-04-09T18:41:05Z")

</div>

Hi All I ma trying to call the function written in one script in other script. But it is giving me the error. The called script is 2.rb require ‘watir’ def test\_b $ie1 = IE.new $ie1.text\_field(:name, “q”).set “pic…

---

## [Outlook and win32 service](https://www.ruby-forum.com/t/outlook-and-win32-service/134167)

<div class="topic-metadata">

**Author:** [@BENI](https://www.ruby-forum.com/u/BENI)\
**Replies:** 6\
**Last updated:** [April 9, 2008, 3:38pm UTC](https://www.ruby-forum.com/t/outlook-and-win32-service/134167 "2008-04-09T15:38:05Z")

</div>

Hi all, i detail out an issue i am facing while trying to read messages from outlook via a windows service. The goal of the code is to scan outlook inbox every 10 minutes and if any specified file attachment is foun…

---

## [Rmagick via parallels](https://www.ruby-forum.com/t/rmagick-via-parallels/130629)

<div class="topic-metadata">

**Author:** [@prichard](https://www.ruby-forum.com/u/prichard)\
**Replies:** 1\
**Last updated:** [April 9, 2008, 12:40pm UTC](https://www.ruby-forum.com/t/rmagick-via-parallels/130629 "2008-04-09T12:40:46Z")

</div>

I have some code that Im sure used to work on Vista under parallels, but now only works on Vista on a PC hardware. Im using Win32::Screenshot to capture the windows screen, and then using rmagick to save to a file I …

---

## [Include module and class inheritance? which one to choose?](https://www.ruby-forum.com/t/include-module-and-class-inheritance-which-one-to-choose/134233)

<div class="topic-metadata">

**Author:** [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Replies:** 6\
**Last updated:** [April 9, 2008, 10:30am UTC](https://www.ruby-forum.com/t/include-module-and-class-inheritance-which-one-to-choose/134233 "2008-04-09T10:30:51Z")

</div>

What is the different between the including a module and inherit a class? For me, there seems to be almost the same. The only thing is module can be think as an abstract class which is not instantiate able. If you in…

---

## [Embed Ruby or Lua](https://www.ruby-forum.com/t/embed-ruby-or-lua/117819)

<div class="topic-metadata">

**Author:** [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Replies:** 10\
**Last updated:** [April 9, 2008, 10:24am UTC](https://www.ruby-forum.com/t/embed-ruby-or-lua/117819 "2008-04-09T10:24:55Z")

</div>

I am writing a real-time data processing tool (data in —\> pattern recognition —\> midi out) called rubyk (site: http://rubyk.org trac: http://dev.rubyk.org). The first idea was to embed ruby (thus the name rubyk). I d…

---

## [Output of a method to file?](https://www.ruby-forum.com/t/output-of-a-method-to-file/134219)

<div class="topic-metadata">

**Author:** [@zoephoenix](https://www.ruby-forum.com/u/zoephoenix)\
**Replies:** 15\
**Last updated:** [April 9, 2008, 10:05am UTC](https://www.ruby-forum.com/t/output-of-a-method-to-file/134219 "2008-04-09T10:05:31Z")

</div>

Can anybody tell me how to take the output of a method and save it to a file? I have an array and I’ve created a method to take the strings I put into the array and insert them into a place in a sentence. How do I exe…

---

## [Ratom 0.3.2 Released](https://www.ruby-forum.com/t/ratom-0-3-2-released/134254)

<div class="topic-metadata">

**Author:** [@Sean\_Geoghegan](https://www.ruby-forum.com/u/Sean_Geoghegan)\
**Replies:** 0\
**Last updated:** [April 9, 2008, 10:01am UTC](https://www.ruby-forum.com/t/ratom-0-3-2-released/134254 "2008-04-09T10:01:59Z")

</div>

ratom: Atom Syndication and Publication API Changes: Add support for atom:category. Support extension attributes using the same mechanism as extension elements. Install with “gem install ratom” See http://ratom.ru…

---

## [Ruby Extensions, Threads and stack to0 deep](https://www.ruby-forum.com/t/ruby-extensions-threads-and-stack-to0-deep/134253)

<div class="topic-metadata">

**Author:** [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Replies:** 0\
**Last updated:** [April 9, 2008, 9:51am UTC](https://www.ruby-forum.com/t/ruby-extensions-threads-and-stack-to0-deep/134253 "2008-04-09T09:51:24Z")

</div>

I have a library (milter) that calls back into ruby, but on a different thread than I called into the library on. How can I make this work? Thanks. Here is a current program run: http://rafb.net/p/0z8Lkh10.html Mik…

---

## [Generating HTML in a console application](https://www.ruby-forum.com/t/generating-html-in-a-console-application/134222)

<div class="topic-metadata">

**Author:** [@bado](https://www.ruby-forum.com/u/bado)\
**Replies:** 6\
**Last updated:** [April 9, 2008, 9:05am UTC](https://www.ruby-forum.com/t/generating-html-in-a-console-application/134222 "2008-04-09T09:05:49Z")

</div>

I’d like to generate HTML in a console application and I found http://amrita.sourceforge.jp Can you give me other alternatives? Thanks in advance.

---

## [Add\_primary\_key in AR script](https://www.ruby-forum.com/t/add-primary-key-in-ar-script/197174)

<div class="topic-metadata">

**Author:** [@lgas](https://www.ruby-forum.com/u/lgas)\
**Replies:** 0\
**Last updated:** [April 9, 2008, 8:45am UTC](https://www.ruby-forum.com/t/add-primary-key-in-ar-script/197174 "2008-04-09T08:45:52Z")

</div>

Hi, We use “add\_primary\_key” method in the active record script to create primary key in a table. But this method does not allow us to create our own primary key constraint name. Is there a way where we can give our …

---

## [Do arrays use up alot of memory space?](https://www.ruby-forum.com/t/do-arrays-use-up-alot-of-memory-space/197073)

<div class="topic-metadata">

**Author:** [@owc](https://www.ruby-forum.com/u/owc)\
**Replies:** 15\
**Last updated:** [April 9, 2008, 6:17am UTC](https://www.ruby-forum.com/t/do-arrays-use-up-alot-of-memory-space/197073 "2008-04-09T06:17:41Z")

</div>

I just started ruby not too long ago and I’m really new to the language. But I came out with something; to copy files from path names to path names using each respecive array elements. $options= \[“2008\*”, “2008\*”, “…

---

## [\[ANN\] Sequel 1.4.0](https://www.ruby-forum.com/t/ann-sequel-1-4-0/134231)

<div class="topic-metadata">

**Author:** [@nerdmaster](https://www.ruby-forum.com/u/nerdmaster)\
**Replies:** 0\
**Last updated:** [April 9, 2008, 5:30am UTC](https://www.ruby-forum.com/t/ann-sequel-1-4-0/134231 "2008-04-09T05:30:20Z")

</div>

Sequel is a database access toolkit for Ruby. Sequel provides thread safety, connection pooling, and a concise DSL for constructing queries and table schemas. Sequel makes it easy to deal with multiple records without…

---

## [Is it time for setup.rb to kick the can?](https://www.ruby-forum.com/t/is-it-time-for-setup-rb-to-kick-the-can/134189)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 1\
**Last updated:** [April 9, 2008, 5:22am UTC](https://www.ruby-forum.com/t/is-it-time-for-setup-rb-to-kick-the-can/134189 "2008-04-09T05:22:13Z")

</div>

One upon a time setup.rb was THE way to install ruby packages. But over the last year or so, setup.rb has begun to fade from the scene. Installing to site\_ruby location has largely eroded in general. Even commonly use…

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

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