# Ruby

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

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

---

## [Rails asset\_ids with Warbler](https://www.ruby-forum.com/t/rails-asset-ids-with-warbler/148771)

<div class="topic-metadata">

**Author:** [@lennylmiller](https://www.ruby-forum.com/u/lennylmiller)\
**Replies:** 4\
**Last updated:** [September 17, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/rails-asset-ids-with-warbler/148771 "2008-09-17T21:26:32Z")

</div>

I was having a problem getting my rails\_asset\_ids working when deploying as a WAR using warbler 0.9.11. I was able to get as far as getting Rails not to assume RAILS\_ROOT/public in ActionView::Helpers::AssetTagHelper#…

---

## [RMagick \> image crop or clipp with 4 cornres coordinates](https://www.ruby-forum.com/t/rmagick-image-crop-or-clipp-with-4-cornres-coordinates/148860)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [September 17, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/rmagick-image-crop-or-clipp-with-4-cornres-coordinates/148860 "2008-09-17T21:14:09Z")

</div>

hi, newbie for Rmagick… is there any methods to crop or clipp original image with 4 corners coordinates (xi, yi) i=1…4. Have seen it is possible to use ImageList::crop(x,y,heigth, wigth) to get a rectangle sub-image. …

---

## [Gem install weirdness](https://www.ruby-forum.com/t/gem-install-weirdness/148864)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 8:49pm UTC](https://www.ruby-forum.com/t/gem-install-weirdness/148864 "2008-09-17T20:49:25Z")

</div>

For some reason gem is installing v 0.9.0 by default \[0.12.0 is the latest\] for eventmachine. Is this expected? Thanks! -=R ~ sudo /usr/bin/gem install eventmachine Building native extensions. This could take a whi…

---

## [Calling a Method](https://www.ruby-forum.com/t/calling-a-method/148853)

<div class="topic-metadata">

**Author:** [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Replies:** 4\
**Last updated:** [September 17, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/calling-a-method/148853 "2008-09-17T19:23:47Z")

</div>

If I have a file that contains a method that takes one parameter. and I want to call the method from the command line, how do you do that? I know how to run a script from the command line but not how to call a method. …

---

## [Irb shell exit](https://www.ruby-forum.com/t/irb-shell-exit/148842)

<div class="topic-metadata">

**Author:** [@daborg69](https://www.ruby-forum.com/u/daborg69)\
**Replies:** 5\
**Last updated:** [September 17, 2008, 6:40pm UTC](https://www.ruby-forum.com/t/irb-shell-exit/148842 "2008-09-17T18:40:43Z")

</div>

I am totally new to programming so this may sound stupid, but I would appreciate help. I am following along in the the Simply Rails 2 book and I am entering classes etc. into the irb shell in the ruby console window. …

---

## [Q: IO.read() and IO.write()](https://www.ruby-forum.com/t/q-io-read-and-io-write/148570)

<div class="topic-metadata">

**Author:** [@kwatch](https://www.ruby-forum.com/u/kwatch)\
**Replies:** 8\
**Last updated:** [September 17, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/q-io-read-and-io-write/148570 "2008-09-17T18:01:18Z")

</div>

Hi, I have questions about IO and File class. Why is IO.read(filename) defined? IMO, File.read() is more natural than IO.read() because IO class is not related to filename, I think. Is there any reason that IO.w…

---

## [Re: kind\_of? problem](https://www.ruby-forum.com/t/re-kind-of-problem/148837)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/re-kind-of-problem/148837 "2008-09-17T16:52:31Z")

</div>

Thanks.

---

## [Array question](https://www.ruby-forum.com/t/array-question/148652)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 13\
**Last updated:** [September 17, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/array-question/148652 "2008-09-17T16:30:13Z")

</div>

Hi all, Just wonder: 1)When substracting array2 from array1 to get the difference elements between two arrays(array1-array2), must array1.size \>= array2? 2)Is there mentod in Array class that can return the element …

---

## [Statistician III (#177)](https://www.ruby-forum.com/t/statistician-iii-177/148496)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 1\
**Last updated:** [September 17, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/statistician-iii-177/148496 "2008-09-17T16:05:48Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q. 2: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on th…

---

## [Ruby system programs](https://www.ruby-forum.com/t/ruby-system-programs/148819)

<div class="topic-metadata">

**Author:** [@pshussain](https://www.ruby-forum.com/u/pshussain)\
**Replies:** 6\
**Last updated:** [September 17, 2008, 3:33pm UTC](https://www.ruby-forum.com/t/ruby-system-programs/148819 "2008-09-17T15:33:03Z")

</div>

Hai all, Hope everybody fine. But I am not fine,because I got one assignment from my project head. The problem is :- To find the Memory usage To find the CPU usage To find the UPTIME Status To find the Hard Disk sp…

---

## [\[Bug:1.9\] test\_dup(TestIO) may cause infinite loop](https://www.ruby-forum.com/t/bug-1-9-test-dup-testio-may-cause-infinite-loop/148706)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [September 17, 2008, 12:53pm UTC](https://www.ruby-forum.com/t/bug-1-9-test-dup-testio-may-cause-infinite-loop/148706 "2008-09-17T12:53:28Z")

</div>

e$B@\>;3OB9-$G$9!#e(B test\_dup(TestIO)e$B$GL58B%k!\<%W$K$J$C$F$7$^$&$3$H$,$"$k$h$&$G$9!#e(B stracee$B$7$F$\_$?$H$3$m!"e(B1e$B$DL$Ne(Bdupe$B$GNc30$K$J$i$J$+$C$?\>l9g!"e(B e$B=PMh$?e(BIOe$B$,e(B2e$B$DL$Ne(Bdupe$B$NCf$Ge(BGC…

---

## [\[Bug #493\] Failure: test\_dup(TestIO)](https://www.ruby-forum.com/t/bug-493-failure-test-dup-testio/146783)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 3\
**Last updated:** [September 17, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/bug-493-failure-test-dup-testio/146783 "2008-09-17T12:27:38Z")

</div>

Bug #493: Failure: test\_dup(TestIO) http://redmine.ruby-lang.org/issues/show/493 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal ruby 1.9.0 (2008-08-25 revision 18832) \[i686-linux\] e$B$…

---

## [Problem with getting RegEx to work](https://www.ruby-forum.com/t/problem-with-getting-regex-to-work/148815)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [September 17, 2008, 11:12am UTC](https://www.ruby-forum.com/t/problem-with-getting-regex-to-work/148815 "2008-09-17T11:12:36Z")

</div>

All, I’m a novice when it comes to Ruby so I’m hoping that one of you guys can explain the following to me. The following line works as I expected it to and prints “This is a test” with one word per line: " -XThis -…

---

## [Problem with gem?](https://www.ruby-forum.com/t/problem-with-gem/148764)

<div class="topic-metadata">

**Author:** [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Replies:** 2\
**Last updated:** [September 17, 2008, 8:24am UTC](https://www.ruby-forum.com/t/problem-with-gem/148764 "2008-09-17T08:24:40Z")

</div>

Am I the only one having trouble running gem right now? It seems to hang while reading a file: “main” prio=5 tid=0x00801000 nid=0xb0101000 runnable \[0xb00fa000…0xb0100c58\] java.lang.Thread.State: RUNNABLE at sun.nio…

---

## [Kind\_of? problem](https://www.ruby-forum.com/t/kind-of-problem/148774)

<div class="topic-metadata">

**Author:** [@stefan8107](https://www.ruby-forum.com/u/stefan8107)\
**Replies:** 2\
**Last updated:** [September 17, 2008, 8:13am UTC](https://www.ruby-forum.com/t/kind-of-problem/148774 "2008-09-17T08:13:33Z")

</div>

Hi guys, I was on the way of running RSpec in IronRuby. After some hacks I was able to run basic specs. However I came up to a problem that “before :each” was not called in IronRuby. After some digging I was able to…

---

## [Can you extend a Java class in JRuby?](https://www.ruby-forum.com/t/can-you-extend-a-java-class-in-jruby/148794)

<div class="topic-metadata">

**Author:** [@Martin\_CSMartin](https://www.ruby-forum.com/u/Martin_CSMartin)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 7:23am UTC](https://www.ruby-forum.com/t/can-you-extend-a-java-class-in-jruby/148794 "2008-09-17T07:23:49Z")

</div>

Is there a way to create a JUnit 3.8 test case with JRuby? It needs to: extend UnitTest have a method with the signature: public static Test suite() exist as a .class file whose name I can give to the runner. Best, …

---

## [IRB error using curl command](https://www.ruby-forum.com/t/irb-error-using-curl-command/148795)

<div class="topic-metadata">

**Author:** [@shane](https://www.ruby-forum.com/u/shane)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 6:24am UTC](https://www.ruby-forum.com/t/irb-error-using-curl-command/148795 "2008-09-17T06:24:50Z")

</div>

Gday all. Im using the netbeans IDE version 6.1 to create a ruby on rails application. First off… Netbeans wouldnt let me generate an xml.builder type file, i had to navigate to app/views/info with explorer and then …

---

## [Converting a Ruby hash to a Java HashMap](https://www.ruby-forum.com/t/converting-a-ruby-hash-to-a-java-hashmap/148789)

<div class="topic-metadata">

**Author:** [@Martin\_CSMartin](https://www.ruby-forum.com/u/Martin_CSMartin)\
**Replies:** 2\
**Last updated:** [September 17, 2008, 5:33am UTC](https://www.ruby-forum.com/t/converting-a-ruby-hash-to-a-java-hashmap/148789 "2008-09-17T05:33:52Z")

</div>

Hi, To convert a Ruby array to a Java array, I can use .to\_java. How can I convert a Ruby hash to a Java HashMap? Best, Martin To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage\_email

---

## [Getting Employer to Pay for RubyConf](https://www.ruby-forum.com/t/getting-employer-to-pay-for-rubyconf/148643)

<div class="topic-metadata">

**Author:** [@Clinton\_DSJudy](https://www.ruby-forum.com/u/Clinton_DSJudy)\
**Replies:** 14\
**Last updated:** [September 17, 2008, 4:37am UTC](https://www.ruby-forum.com/t/getting-employer-to-pay-for-rubyconf/148643 "2008-09-17T04:37:44Z")

</div>

So I’m just finishing my first year at a real job, and thinking about asking to go to RubyConf. I really don’t have the money to pay for this out of pocket. I also know that this company sends TONS of people to heavy …

---

## [Basic Regex question](https://www.ruby-forum.com/t/basic-regex-question/148785)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [September 17, 2008, 4:11am UTC](https://www.ruby-forum.com/t/basic-regex-question/148785 "2008-09-17T04:11:25Z")

</div>

dumb question perhaps, but how do I do a Ruby based regex expression that takes the following as input and produces the following as output: INPUT: “#{some\_string}” # or perhaps if the # needs escaping this should …

---

## [Camellia\_rb 1.1](https://www.ruby-forum.com/t/camellia-rb-1-1/148787)

<div class="topic-metadata">

**Author:** [@ARTESSBSSLnSSB](https://www.ruby-forum.com/u/ARTESSBSSLnSSB)\
**Replies:** 0\
**Last updated:** [September 17, 2008, 3:33am UTC](https://www.ruby-forum.com/t/camellia-rb-1-1/148787 "2008-09-17T03:33:19Z")

</div>

Hi, camellia\_rb version 1.1 released. camellia\_rb is a Camellia package for Ruby. Camellia is a symmetric key block cipher developed jointly in 2000e$B!!e(Bby world top class encryption researchers at NTT and Mitsub…

---

## [Overriding CLS Virtuals](https://www.ruby-forum.com/t/overriding-cls-virtuals/148090)

<div class="topic-metadata">

**Author:** [@curthibbs](https://www.ruby-forum.com/u/curthibbs)\
**Replies:** 13\
**Last updated:** [September 17, 2008, 1:15am UTC](https://www.ruby-forum.com/t/overriding-cls-virtuals/148090 "2008-09-17T01:15:21Z")

</div>

I’ve committed some changes to IronRuby (in SVN revision 141) that let you implement CLS interfaces and override virtual methods on CLS base types. Interfaces work like Ruby modules, so to make your class implement I…

---

## [Is 1.8.6 p287 the "finally fixed" version?](https://www.ruby-forum.com/t/is-1-8-6-p287-the-finally-fixed-version/148734)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 7\
**Last updated:** [September 17, 2008, 1:00am UTC](https://www.ruby-forum.com/t/is-1-8-6-p287-the-finally-fixed-version/148734 "2008-09-17T01:00:42Z")

</div>

Over the last couple of months there seemed to be long-running threads of discussion/argument regarding 1.8.6 p230 and it’s fixes, or lack thereof, and compatibility with Rails. I now see there’s a 1.8.6 p287 listed u…

---

## [Define anonymous module with closure](https://www.ruby-forum.com/t/define-anonymous-module-with-closure/148766)

<div class="topic-metadata">

**Author:** [@ISESSmith-Heister](https://www.ruby-forum.com/u/ISESSmith-Heister)\
**Replies:** 4\
**Last updated:** [September 17, 2008, 12:43am UTC](https://www.ruby-forum.com/t/define-anonymous-module-with-closure/148766 "2008-09-17T00:43:09Z")

</div>

Hi everyone, I want to do this: x, y = %w(x y) definition = lambda{def z; x; end} y.extend Module.new(&definition) y.z # =\> ‘x’ I expected x to be available within the closure, but it doesn’t appear to be. The onl…

---

## [Help with Shoes](https://www.ruby-forum.com/t/help-with-shoes/148664)

<div class="topic-metadata">

**Author:** [@rubina](https://www.ruby-forum.com/u/rubina)\
**Replies:** 3\
**Last updated:** [September 17, 2008, 12:36am UTC](https://www.ruby-forum.com/t/help-with-shoes/148664 "2008-09-17T00:36:20Z")

</div>

Hello Ruby/Shoes World! As part of my Ruby learning experience I started looking into a GUI environment. Shoes appears to be simple enough that I would probably be able to learn it. I am working on a simple Sudoku s…

---

## [Marshal format for Time](https://www.ruby-forum.com/t/marshal-format-for-time/148669)

<div class="topic-metadata">

**Author:** [@curthibbs](https://www.ruby-forum.com/u/curthibbs)\
**Replies:** 1\
**Last updated:** [September 17, 2008, 12:27am UTC](https://www.ruby-forum.com/t/marshal-format-for-time/148669 "2008-09-17T00:27:22Z")

</div>

Can someone help me by summarizing the Marshal format for Time in Ruby 1.8.6? Here’s what I’ve worked out: The time is always based on the UNIX epoch When the fourth byte is less than 128, it implies some kind …

---

## [Why does Warbler requires a db to build?](https://www.ruby-forum.com/t/why-does-warbler-requires-a-db-to-build/148667)

<div class="topic-metadata">

**Author:** [@supasta](https://www.ruby-forum.com/u/supasta)\
**Replies:** 4\
**Last updated:** [September 17, 2008, 12:06am UTC](https://www.ruby-forum.com/t/why-does-warbler-requires-a-db-to-build/148667 "2008-09-17T00:06:17Z")

</div>

I’m running into an issue running warble on our build box. When I run warble without mysql running, I get: $ warble rake aborted! The driver encountered an error: com.mysql.jdbc.CommunicationsException: Communicatio…

---

## [\[patch\] performance improvement patch for benchmark/bm\_so\_count\_words.rb](https://www.ruby-forum.com/t/patch-performance-improvement-patch-for-benchmark-bm-so-count-words-rb/148568)

<div class="topic-metadata">

**Author:** [@masayoshi\_takahashi](https://www.ruby-forum.com/u/masayoshi_takahashi)\
**Replies:** 6\
**Last updated:** [September 16, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/patch-performance-improvement-patch-for-benchmark-bm-so-count-words-rb/148568 "2008-09-16T23:00:36Z")

</div>

é«˜æ©‹å¾ç¾©ã§ã™ã€‚ 1.9ã§benchmarkã‚’èµ°ã‚‰ã›ãŸã¨ã“ã‚ã€bm\_so\_count\_wordsã®çµæžœãŒã²ã©ã‹ã£ãŸ ï¼ˆ1.8ã®ã¨ãã‚ˆã‚Š30å€ãã‚‰ã„é…ããªã‚‹ï¼‰ã®ã§ã€ãƒ‘ãƒƒãƒã‚’æ›¸ã„ã¦ã¿ã¾ã—ãŸã€‚ åŸºæœ¬çš„ã«…

---

## [Integrating with Java inner classes?](https://www.ruby-forum.com/t/integrating-with-java-inner-classes/148762)

<div class="topic-metadata">

**Author:** [@ratchetcat](https://www.ruby-forum.com/u/ratchetcat)\
**Replies:** 0\
**Last updated:** [September 16, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/integrating-with-java-inner-classes/148762 "2008-09-16T22:17:39Z")

</div>

Below is a simple script (using JRuby 1.1.4 on Win2K) that tries to use the StringTemplate library JAR. Things work OK when trying to use Java classes that don’t have inner classes…or partially implement Java interfa…

---

## [Re: Passing a method call into a method](https://www.ruby-forum.com/t/re-passing-a-method-call-into-a-method/148760)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 0\
**Last updated:** [September 16, 2008, 10:11pm UTC](https://www.ruby-forum.com/t/re-passing-a-method-call-into-a-method/148760 "2008-09-16T22:11:46Z")

</div>

Hi, Thanks for the help with my question.Â All three solutions are great. Sorry I wasn’t more clear describing the problem.Â I’ll try to be more clear when I ask another question in the future. I have to admit that…

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

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