# Ruby

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

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

---

## [Net::Imap thread safety](https://www.ruby-forum.com/t/net-imap-thread-safety/151156)

<div class="topic-metadata">

**Author:** [@Ingmar](https://www.ruby-forum.com/u/Ingmar)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 1:12pm UTC](https://www.ruby-forum.com/t/net-imap-thread-safety/151156 "2008-10-17T13:12:06Z")

</div>

Hi, I have some problems with the Net::Imap standard library. In the docs, it claims to supports concurrent threads. However, running a lot of multiple threads invoking the same IMAP command on a Net::Imap object res…

---

## [Problem with warbler](https://www.ruby-forum.com/t/problem-with-warbler/151056)

<div class="topic-metadata">

**Author:** [@bahaw](https://www.ruby-forum.com/u/bahaw)\
**Replies:** 7\
**Last updated:** [October 17, 2008, 12:53pm UTC](https://www.ruby-forum.com/t/problem-with-warbler/151056 "2008-10-17T12:53:57Z")

</div>

I am using jruby 1.1.4 and installed warbler 0.9.11 in Windows XP. When I run jruby -S warble war, I always get this. It fails when rake reaches the target war:jar. I checked my JAVA\_HOME and I can run jar command …

---

## [About lambda and its binding](https://www.ruby-forum.com/t/about-lambda-and-its-binding/151118)

<div class="topic-metadata">

**Author:** [@Rolando\_A](https://www.ruby-forum.com/u/Rolando_A)\
**Replies:** 3\
**Last updated:** [October 17, 2008, 12:48pm UTC](https://www.ruby-forum.com/t/about-lambda-and-its-binding/151118 "2008-10-17T12:48:36Z")

</div>

is there a way to specify the binding of a proc created through lambda? eg: $ cat test.rb class A attr\_reader :foo def initialize @foo = lambda { do\_that\_thing } end end class B def do\_that\_thing puts “yeah, d…

---

## [Create simple sounds](https://www.ruby-forum.com/t/create-simple-sounds/151149)

<div class="topic-metadata">

**Author:** [@yodla](https://www.ruby-forum.com/u/yodla)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 12:47pm UTC](https://www.ruby-forum.com/t/create-simple-sounds/151149 "2008-10-17T12:47:27Z")

</div>

Hi, I have a simple app in JRuby. It works in background and I would like it to inform user about certain actions with a simple beep sounds. I am running it on Mac OS X Leopard. I found a sound library “win32-sound”,…

---

## [Help on inheritance and class methods pls?](https://www.ruby-forum.com/t/help-on-inheritance-and-class-methods-pls/151147)

<div class="topic-metadata">

**Author:** [@bemmi](https://www.ruby-forum.com/u/bemmi)\
**Replies:** 1\
**Last updated:** [October 17, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/help-on-inheritance-and-class-methods-pls/151147 "2008-10-17T12:41:31Z")

</div>

Hi there, Hoping someone explain this to me as I’d like to understand it properly. I’ve been reading about Ruby’s metaclasses, but I don’t get this: class Test def foo puts “in foo” end end =\> nil class Test2 \< …

---

## [Exception by throw](https://www.ruby-forum.com/t/exception-by-throw/151098)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 3\
**Last updated:** [October 17, 2008, 12:32pm UTC](https://www.ruby-forum.com/t/exception-by-throw/151098 "2008-10-17T12:32:42Z")

</div>

e$B$U$H5$$,$D$$$?$s$G$9$,!"e(Bthrow e$B$GBP1~$9$ke(B catch e$B$,$J$$$H$-$Ne(B e$BNc30$,JQ2=$7$F$$$^$9!#e(B % ./ruby -e ‘throw “a”’ -e:1:in throw': uncaught throw "a" (ArgumentError) from -e:1:in’ % ruby-1.8 -e ‘thro…

---

## [Where does merb store the files for a new app?](https://www.ruby-forum.com/t/where-does-merb-store-the-files-for-a-new-app/151129)

<div class="topic-metadata">

**Author:** [@toltec](https://www.ruby-forum.com/u/toltec)\
**Replies:** 2\
**Last updated:** [October 17, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/where-does-merb-store-the-files-for-a-new-app/151129 "2008-10-17T12:25:50Z")

</div>

I intended to follow this tutorial: http://depixelate.com/2007/5/31/taking-merb-for-a-spin – but then I created the app with $ merb -g invoice\_tracker, and now its folder structure is nowhere to be found. I was at ~ …

---

## [Looking for bondage webcam?](https://www.ruby-forum.com/t/looking-for-bondage-webcam/151148)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 12:22pm UTC](https://www.ruby-forum.com/t/looking-for-bondage-webcam/151148 "2008-10-17T12:22:38Z")

</div>

View explicit live Webcams, meet for amateur scenes! http://puntyhouse.byethost11.com/altcam.htm

---

## [Convert Ruby Array to Java Array](https://www.ruby-forum.com/t/convert-ruby-array-to-java-array/151144)

<div class="topic-metadata">

**Author:** [@Marcin\_PiSSS\_rkowsk](https://www.ruby-forum.com/u/Marcin_PiSSS_rkowsk)\
**Replies:** 2\
**Last updated:** [October 17, 2008, 12:11pm UTC](https://www.ruby-forum.com/t/convert-ruby-array-to-java-array/151144 "2008-10-17T12:11:59Z")

</div>

Hi everyone, Recently I would like to convert Ruby array to Java array with ‘double’ elements. I use syntax: ruby\_array = \[\[1,2\],\[3,4\]\] java\_array = ruby\_array.to\_java :Double which return: “java.lang.reflect.Array:…

---

## [Damn you cmd.exe!](https://www.ruby-forum.com/t/damn-you-cmd-exe/151115)

<div class="topic-metadata">

**Author:** [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Replies:** 6\
**Last updated:** [October 17, 2008, 11:50am UTC](https://www.ruby-forum.com/t/damn-you-cmd-exe/151115 "2008-10-17T11:50:44Z")

</div>

Hi, As an exercise in metaprogramming I decided to write a DSL shell. One of the requirements was that it should be working on both - win32 and unix platforms. I quickly encountered some problems with cmd.exe. My fi…

---

## [Creating a gem which installs files outside /usr/lib/ruby](https://www.ruby-forum.com/t/creating-a-gem-which-installs-files-outside-usr-lib-ruby/151136)

<div class="topic-metadata">

**Author:** [@crocco](https://www.ruby-forum.com/u/crocco)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 9:34am UTC](https://www.ruby-forum.com/t/creating-a-gem-which-installs-files-outside-usr-lib-ruby/151136 "2008-10-17T09:34:50Z")

</div>

I want to create a gem for an application written using the ruby KDE bindings. It’s the first time I create a gem, but I think I more or less understand what I should do. The only issue I’m having is that, KDE expect…

---

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

<div class="topic-metadata">

**Author:** [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Replies:** 1\
**Last updated:** [October 17, 2008, 8:12am UTC](https://www.ruby-forum.com/t/threads/150860 "2008-10-17T08:12:51Z")

</div>

Hello, So I am new to ruby and have a question about threads. Yes, I researched looking for an answer to my question without much luck. I am trying to create a bunch of threads that will run forever processing nume…

---

## [Need help to install "linguistics" gem](https://www.ruby-forum.com/t/need-help-to-install-linguistics-gem/151123)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 4\
**Last updated:** [October 17, 2008, 8:02am UTC](https://www.ruby-forum.com/t/need-help-to-install-linguistics-gem/151123 "2008-10-17T08:02:11Z")

</div>

Hi, I have a problem with installing gem: linguistics. sudo gem install linguistics Gave me “not found” error. So I googled and found the source here. The gem seems to be located at http://www.deveiate.org/code/Lin…

---

## [Modular Arithmetic (#179)](https://www.ruby-forum.com/t/modular-arithmetic-179/151124)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 4:48am UTC](https://www.ruby-forum.com/t/modular-arithmetic-179/151124 "2008-10-17T04:48:03Z")

</div>

Apologies for the severely late summary. I’m going to examine the solution from Andrea F. for this week’s quiz. It’s quite simple and easy to follow, and it is quite similar to some of the other solutions. (Note that …

---

## [\[Bug #651\] Regexp.new returns strange regexp object](https://www.ruby-forum.com/t/bug-651-regexp-new-returns-strange-regexp-object/151006)

<div class="topic-metadata">

**Author:** [@Shyouhei\_U](https://www.ruby-forum.com/u/Shyouhei_U)\
**Replies:** 6\
**Last updated:** [October 17, 2008, 4:45am UTC](https://www.ruby-forum.com/t/bug-651-regexp-new-returns-strange-regexp-object/151006 "2008-10-17T04:45:07Z")

</div>

Bug #651: Regexp.new returns strange regexp object http://redmine.ruby-lang.org/issues/show/651 e$B5/I\<\<Te(B: Shyouhei U. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Yukihiro M. e$B0J2\<$N$h$&$JEy\<0$,@…

---

## [Performance metrics](https://www.ruby-forum.com/t/performance-metrics/151040)

<div class="topic-metadata">

**Author:** [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Replies:** 2\
**Last updated:** [October 17, 2008, 12:50am UTC](https://www.ruby-forum.com/t/performance-metrics/151040 "2008-10-17T00:50:40Z")

</div>

Someone that likes perl showed this to me the other day. http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=ruby&lang2=perl This seems awfully suspicious to me…but I haven’t a real clue if these are rea…

---

## [Jruby and glassfish problem](https://www.ruby-forum.com/t/jruby-and-glassfish-problem/151114)

<div class="topic-metadata">

**Author:** [@marcus](https://www.ruby-forum.com/u/marcus)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 12:10am UTC](https://www.ruby-forum.com/t/jruby-and-glassfish-problem/151114 "2008-10-17T00:10:53Z")

</div>

I’ve got a Rails app that runs fine under JRuby on 2 servers (OS X and Ubuntu) but on an Ubuntu 8.04 VM I’m using I am having a really hard time getting it running. The Glassfish domain starts, but there’s an error th…

---

## [Xml Decleration using builder](https://www.ruby-forum.com/t/xml-decleration-using-builder/150975)

<div class="topic-metadata">

**Author:** [@dan](https://www.ruby-forum.com/u/dan)\
**Replies:** 3\
**Last updated:** [October 17, 2008, 12:10am UTC](https://www.ruby-forum.com/t/xml-decleration-using-builder/150975 "2008-10-17T00:10:53Z")

</div>

I’m trying to create an XML file and I don’t see any way with the builder methods to write the doc type down. \<?xml version = "1.0" encoding = "UTF-8" standalone = "no"?\> I can sucessfully using xml.instruct! :xml, :…

---

## [Jruby and glassfish proble](https://www.ruby-forum.com/t/jruby-and-glassfish-proble/151113)

<div class="topic-metadata">

**Author:** [@marcus](https://www.ruby-forum.com/u/marcus)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 12:07am UTC](https://www.ruby-forum.com/t/jruby-and-glassfish-proble/151113 "2008-10-17T00:07:22Z")

</div>

I’ve got a Rails app that runs fine under JRuby on 2 servers (OS X and Ubuntu) but on an Ubuntu 8.04 VM I’m using I am having a really hard time getting it running. The Glassfish domain starts, but there’s an error t…

---

## [NArray help](https://www.ruby-forum.com/t/narray-help/151106)

<div class="topic-metadata">

**Author:** [@ldt](https://www.ruby-forum.com/u/ldt)\
**Replies:** 2\
**Last updated:** [October 16, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/narray-help/151106 "2008-10-16T21:55:13Z")

</div>

Hi, Could someone please tell me how the syntax works for the narray, max and min methods. if i use @values.max i get the max of the entire array, after reading the narray documentation http://narray.rubyforge.org/SP…

---

## [Ruby with Oracle forward slash error](https://www.ruby-forum.com/t/ruby-with-oracle-forward-slash-error/150381)

<div class="topic-metadata">

**Author:** [@sams](https://www.ruby-forum.com/u/sams)\
**Replies:** 11\
**Last updated:** [October 16, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/ruby-with-oracle-forward-slash-error/150381 "2008-10-16T21:43:22Z")

</div>

Hi, I am a complete newbie to Ruby, so if this is not the right forum for this, please let me know. We’re trying to do some migration using ruby (on Oracle) and I get an error that I don’t really understand. One of …

---

## [Install native extension](https://www.ruby-forum.com/t/install-native-extension/151086)

<div class="topic-metadata">

**Author:** [@Marcin\_PiSSS\_rkowsk](https://www.ruby-forum.com/u/Marcin_PiSSS_rkowsk)\
**Replies:** 3\
**Last updated:** [October 16, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/install-native-extension/151086 "2008-10-16T21:00:05Z")

</div>

Hi everyone, I am new in JRuby. Sorry for my mistake but I want some advice. Is there any possible way to install native extensions in JRuby? Last time I had tried to install ruby numerical library called ‘rnum’. Wh…

---

## [1.8.7-p72 on AIX 5.3 with IBM compiler](https://www.ruby-forum.com/t/1-8-7-p72-on-aix-5-3-with-ibm-compiler/151090)

<div class="topic-metadata">

**Author:** [@Albert\_Chin](https://www.ruby-forum.com/u/Albert_Chin)\
**Replies:** 0\
**Last updated:** [October 16, 2008, 6:05pm UTC](https://www.ruby-forum.com/t/1-8-7-p72-on-aix-5-3-with-ibm-compiler/151090 "2008-10-16T18:05:05Z")

</div>

$ gtar zxf ruby-1.8.7-p72.tar.gz $ cd ruby-1.8.7-p72 $ ./configure CC=xlc\_r CFLAGS="-g" --enable-shared --enable-pthread $ gmake … xlc\_r -g -DRUBY\_EXPORT -I. -I. -c eval.c “eval.c”, line 12093.12: 1506-343 …

---

## [Background image in pdf ... how?](https://www.ruby-forum.com/t/background-image-in-pdf-how/151089)

<div class="topic-metadata">

**Author:** [@friofool](https://www.ruby-forum.com/u/friofool)\
**Replies:** 1\
**Last updated:** [October 16, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/background-image-in-pdf-how/151089 "2008-10-16T17:53:56Z")

</div>

Hi all, I’m looking for a tool to create a pdf file with a background image embedded. I have to make invoice with a specific background and put details orders on the top of this background. Did you know a library to…

---

## [\[Bug:1.9\] rb\_io\_fread does not work](https://www.ruby-forum.com/t/bug-1-9-rb-io-fread-does-not-work/150545)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [October 16, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/bug-1-9-rb-io-fread-does-not-work/150545 "2008-10-16T17:41:01Z")

</div>

e$B1sF#$G$9!#e(B DEPRECATED(int rb\_getc(FILE\*)); DEPRECATED(long rb\_io\_fread(char \*, long, FILE \*)); DEPRECATED(long rb\_io\_fwrite(const char \*, long, FILE )); DEPRECATED(int rb\_read\_pending(FILE)); e$B$H$$$&$N$,e(B …

---

## [What is \[\] here](https://www.ruby-forum.com/t/what-is-here/151080)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 8\
**Last updated:** [October 16, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/what-is-here/151080 "2008-10-16T17:23:57Z")

</div>

class User puts \[\].methods.size puts self.methods.size end What does it mean to have \[\] method at a class level? Where is the documentation for it?

---

## [Any way to convert from hash to XML using builder?](https://www.ruby-forum.com/t/any-way-to-convert-from-hash-to-xml-using-builder/151085)

<div class="topic-metadata">

**Author:** [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Replies:** 2\
**Last updated:** [October 16, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/any-way-to-convert-from-hash-to-xml-using-builder/151085 "2008-10-16T17:23:54Z")

</div>

Hi all, Am I missing an obvious way to transform a hash into an XML builder object? I would like the key to be the tag, and value be the content. attributes on a tag are something I don’t really know how to represent…

---

## [Newbie to ruby, search an array](https://www.ruby-forum.com/t/newbie-to-ruby-search-an-array/151060)

<div class="topic-metadata">

**Author:** [@cogrady2k](https://www.ruby-forum.com/u/cogrady2k)\
**Replies:** 7\
**Last updated:** [October 16, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/newbie-to-ruby-search-an-array/151060 "2008-10-16T16:39:49Z")

</div>

hi, im fairly new to ruby and cud do with some help is there an easy way to search an array to see if it contains a desired value thanks e.g. if @joe contains ‘bloggs’ return true and array location thanks

---

## [Improved nginx.conf for Ruby On Rails](https://www.ruby-forum.com/t/improved-nginx-conf-for-ruby-on-rails/150229)

<div class="topic-metadata">

**Author:** [@reddvinylene](https://www.ruby-forum.com/u/reddvinylene)\
**Replies:** 13\
**Last updated:** [October 16, 2008, 3:14pm UTC](https://www.ruby-forum.com/t/improved-nginx-conf-for-ruby-on-rails/150229 "2008-10-16T15:14:38Z")

</div>

I’ve been trying to improve the standard nginx.conf for Ruby On Rails (http://wiki.codemongers.com/NginxRubyonRailsMongrel) with the help of Maxim D., and so far this is what we got: user www www; worker\_processe…

---

## [Extract lines from text file and place in an array](https://www.ruby-forum.com/t/extract-lines-from-text-file-and-place-in-an-array/151067)

<div class="topic-metadata">

**Author:** [@cogrady2k](https://www.ruby-forum.com/u/cogrady2k)\
**Replies:** 1\
**Last updated:** [October 16, 2008, 2:12pm UTC](https://www.ruby-forum.com/t/extract-lines-from-text-file-and-place-in-an-array/151067 "2008-10-16T14:12:50Z")

</div>

hi i was wondering if anyone cud help i have this code to read from a text file def readftxt in=IO.read(“input.txt”) end how could i adapt it so if multiple lines are entered it could place each line in an array? t…

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

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