# Ruby

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

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

---

## [Few Questions on Ruby](https://www.ruby-forum.com/t/few-questions-on-ruby/156500)

<div class="topic-metadata">

**Author:** [@anilbhat21](https://www.ruby-forum.com/u/anilbhat21)\
**Replies:** 4\
**Last updated:** [December 29, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/few-questions-on-ruby/156500 "2008-12-29T17:36:38Z")

</div>

Given this module definition: module Greeting def say\_hello puts "Hello, my name is #{self.name}" end end 1.) How to implement a class Foo using the Greeting module so that the following code example generates…

---

## [Rexml system error on parse](https://www.ruby-forum.com/t/rexml-system-error-on-parse/156528)

<div class="topic-metadata">

**Author:** [@pavel\_drabushevich](https://www.ruby-forum.com/u/pavel_drabushevich)\
**Replies:** 1\
**Last updated:** [December 29, 2008, 5:25pm UTC](https://www.ruby-forum.com/t/rexml-system-error-on-parse/156528 "2008-12-29T17:25:30Z")

</div>

Please, could any help me, I try parse xml files with REXML::Parsers::SAX2Parser, some file parse good, but on one file I has this exception: /Program Files/Ruby/lib/ruby/1.8/rexml/source.rb:223: \[BUG\] rb\_sys\_fail(xm…

---

## [\[Bug:trunk\] trap(:USR1, "EXIT") doesn't in effect when sysread is interputted](https://www.ruby-forum.com/t/bug-trunk-trap-usr1-exit-doesnt-in-effect-when-sysread-is-interputted/156532)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [December 29, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/bug-trunk-trap-usr1-exit-doesnt-in-effect-when-sysread-is-interputted/156532 "2008-12-29T17:11:27Z")

</div>

e$B0J2\<$N%W%m%0%i%\`$N$h$&$K!“e(Btrap e$B$Ge(B USR1 e$B$Ke(B EXIT e$B$H@\_Dj$7$F$”$Ce(B e$B$?;~!"e(BSIGUSR1 e$B$G3d$j9~$^$l$?;~$Ke(B EINTR e$B$K$J$C$F$7$^$$$^$9!#e(B % ./ruby -ve ’ r,w = IO.pipe pid = fork { trap(:U…

---

## [Re: warbler-rack timeout q / circuit breaker](https://www.ruby-forum.com/t/re-warbler-rack-timeout-q-circuit-breaker/156417)

<div class="topic-metadata">

**Author:** [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Replies:** 1\
**Last updated:** [December 29, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/re-warbler-rack-timeout-q-circuit-breaker/156417 "2008-12-29T16:59:05Z")

</div>

I tried this with 0.9.3 and 1.1.6 Final and it worked as you described. The timeout works well as a circuit breaker now. See the second screen shot on the page below to see jconsole output: https://trisano.csinitiativ…

---

## [Rmagick error on install](https://www.ruby-forum.com/t/rmagick-error-on-install/156529)

<div class="topic-metadata">

**Author:** [@worldofanmol](https://www.ruby-forum.com/u/worldofanmol)\
**Replies:** 0\
**Last updated:** [December 29, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/rmagick-error-on-install/156529 "2008-12-29T16:08:51Z")

</div>

i have been trying to install rmagick but have been unsuccessful.People on Rmagick forum told me that the error is a ruby gem error, please help . When I typed the command “sudo gem install Rmagick” , I got the follo…

---

## [Class org.jcodings.specific.ASCIIEncoding is not Serializable](https://www.ruby-forum.com/t/class-org-jcodings-specific-asciiencoding-is-not-serializable/156471)

<div class="topic-metadata">

**Author:** [@eipipuz](https://www.ruby-forum.com/u/eipipuz)\
**Replies:** 3\
**Last updated:** [December 29, 2008, 2:05pm UTC](https://www.ruby-forum.com/t/class-org-jcodings-specific-asciiencoding-is-not-serializable/156471 "2008-12-29T14:05:19Z")

</div>

Hello guys, I am still fighting trying to call an EJB server. But now I started with my own code, not just copying the JRuby on Rails Book examples. I have JRuby code that calls the EJB. The EJB is not pure java, it …

---

## [JRuby 1.1.6 - Fixnum to class java.lang.Number error](https://www.ruby-forum.com/t/jruby-1-1-6-fixnum-to-class-java-lang-number-error/156435)

<div class="topic-metadata">

**Author:** [@kain](https://www.ruby-forum.com/u/kain)\
**Replies:** 4\
**Last updated:** [December 29, 2008, 1:08pm UTC](https://www.ruby-forum.com/t/jruby-1-1-6-fixnum-to-class-java-lang-number-error/156435 "2008-12-29T13:08:22Z")

</div>

I’m using JFreeChart and with code tha creates dataset: def createDataset result = Chart::DefaultPieDataset.new $p.each do |x| result.setValue(x.name, x.length) end return result end I’m g…

---

## [Rack-cache 0.3.0](https://www.ruby-forum.com/t/rack-cache-0-3-0/156521)

<div class="topic-metadata">

**Author:** [@ryantate](https://www.ruby-forum.com/u/ryantate)\
**Replies:** 0\
**Last updated:** [December 29, 2008, 12:14pm UTC](https://www.ruby-forum.com/t/rack-cache-0-3-0/156521 "2008-12-29T12:14:55Z")

</div>

rack-cache 0.3.0 is now available. This release corrects some nasty bugs and adds support for a variety of important HTTP caching features. http://tomayko.com/src/rack-cache/ From the CHANGES file: Add support for…

---

## [Problems about requiring gems](https://www.ruby-forum.com/t/problems-about-requiring-gems/156520)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 29, 2008, 11:50am UTC](https://www.ruby-forum.com/t/problems-about-requiring-gems/156520 "2008-12-29T11:50:48Z")

</div>

Hello. I tried to run examples in Rubymacros, but I could not make it work. Could I get any help? sori-guyi-imac:~ ssor$ sudo gem install rubymacros Password: Bulk updating Gem source index for: http://gems.rubyforge…

---

## [Invalid value for](https://www.ruby-forum.com/t/invalid-value-for/156465)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 4\
**Last updated:** [December 29, 2008, 11:50am UTC](https://www.ruby-forum.com/t/invalid-value-for/156465 "2008-12-29T11:50:13Z")

</div>

e$B0J2\<$N$h$&$Ke(B Integer() e$B$He(B Float() e$B$G%(%i!\<$N%a%C%;!\<%8$,HyL/$K0c$$$^$9e(B e$B$,e(B (e$B3g8L$,$"$k$+$I$&$+e(B)e$B!"$G$-$l$PB7$($?$$$H;W$$$^$9$,!"$I$C$A$,$$$$$G$7$ge(B e$B$&$+e(B? main@191-20081228\> Int…

---

## [Rdoc viewer](https://www.ruby-forum.com/t/rdoc-viewer/156516)

<div class="topic-metadata">

**Author:** [@alby](https://www.ruby-forum.com/u/alby)\
**Replies:** 1\
**Last updated:** [December 29, 2008, 11:20am UTC](https://www.ruby-forum.com/t/rdoc-viewer/156516 "2008-12-29T11:20:17Z")

</div>

I’m using ‘ri’ (‘qri’, actually) on the terminal. Is there any alterntive viewer that does hyperlinking? I’d like to be able to click on a method name and go to its documentation. Right now I need to type everything a…

---

## [Ruby.evalScriptlet: scope of local variables in JSE / OSGi](https://www.ruby-forum.com/t/ruby-evalscriptlet-scope-of-local-variables-in-jse-osgi/156515)

<div class="topic-metadata">

**Author:** [@gadgeteer](https://www.ruby-forum.com/u/gadgeteer)\
**Replies:** 0\
**Last updated:** [December 29, 2008, 11:06am UTC](https://www.ruby-forum.com/t/ruby-evalscriptlet-scope-of-local-variables-in-jse-osgi/156515 "2008-12-29T11:06:46Z")

</div>

Is the scope of a local variable supposed to span multiple calls to Ruby.evalScriptlet? Are there any differences between running it in plain Java and running it within an OSGi bundle? Given the following code fragmen…

---

## [Regular Expression Trouble](https://www.ruby-forum.com/t/regular-expression-trouble/156395)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 4\
**Last updated:** [December 29, 2008, 10:59am UTC](https://www.ruby-forum.com/t/regular-expression-trouble/156395 "2008-12-29T10:59:58Z")

</div>

Hey! I’m writing a little script to rename files with weird names but common bits to a common format. Here’s the regular expression I use to extract the common data: /.s?(\\d?\\d)x?e?(\\d\\d)..(\\w{3})$/i It’s meant to r…

---

## [Ruby gives some warning](https://www.ruby-forum.com/t/ruby-gives-some-warning/156473)

<div class="topic-metadata">

**Author:** [@alby](https://www.ruby-forum.com/u/alby)\
**Replies:** 2\
**Last updated:** [December 29, 2008, 10:55am UTC](https://www.ruby-forum.com/t/ruby-gives-some-warning/156473 "2008-12-29T10:55:39Z")

</div>

(I’m using Ruby 1.8.6.) The following expression… rand(rand 3) …makes ruby emit a warning: “warning: parenthesize argument(s) for future version” It seems that I have to write is as “rand(rand(3))”. Why? What potent…

---

## [How to declare model classes in Application.rb](https://www.ruby-forum.com/t/how-to-declare-model-classes-in-application-rb/156498)

<div class="topic-metadata">

**Author:** [@vikas](https://www.ruby-forum.com/u/vikas)\
**Replies:** 1\
**Last updated:** [December 29, 2008, 8:53am UTC](https://www.ruby-forum.com/t/how-to-declare-model-classes-in-application-rb/156498 "2008-12-29T08:53:52Z")

</div>

Hello all, I am new to ruby development. I created a simple online book store Application. but when i select book & click on ‘add to cart’ it gives me error “undefined method \`model’ for ApplicationController:Class” …

---

## [Win32ole and releasing COM objects](https://www.ruby-forum.com/t/win32ole-and-releasing-com-objects/156496)

<div class="topic-metadata">

**Author:** [@farmerss](https://www.ruby-forum.com/u/farmerss)\
**Replies:** 2\
**Last updated:** [December 29, 2008, 8:39am UTC](https://www.ruby-forum.com/t/win32ole-and-releasing-com-objects/156496 "2008-12-29T08:39:00Z")

</div>

Hi, I’m using win32ole to automate use of Microsoft Office Document Imaging (MODI), on Windows Vista. There seems to be problems with getting MODI to release files that it works with. I.e., calling Close on the MODI …

---

## [Go LABEL](https://www.ruby-forum.com/t/go-label/156300)

<div class="topic-metadata">

**Author:** [@pietia](https://www.ruby-forum.com/u/pietia)\
**Replies:** 11\
**Last updated:** [December 29, 2008, 12:35am UTC](https://www.ruby-forum.com/t/go-label/156300 "2008-12-29T00:35:04Z")

</div>

Can we do a " go label " in ruby just like in asm? i cant find any example or documentation about this… for example… if() some codes go LabelA else some other codes go LabelB end LabelA: codes LabelB: codes

---

## [Shared Gems](https://www.ruby-forum.com/t/shared-gems/144266)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 11\
**Last updated:** [December 28, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/shared-gems/144266 "2008-12-28T22:48:15Z")

</div>

Is there a way to get JRuby use an existing CRuby Gem repository, or is this a bad idea? I think I have read of this, but could not find anything on it. Thanks, Michael On 7/27/08, Charles Oliver N. removed\_email\_ad…

---

## [New to Ruby: copying arrays?](https://www.ruby-forum.com/t/new-to-ruby-copying-arrays/156464)

<div class="topic-metadata">

**Author:** [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Replies:** 7\
**Last updated:** [December 28, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/new-to-ruby-copying-arrays/156464 "2008-12-28T22:27:44Z")

</div>

Hi. First-time poster here. I’ve done some programming in Delphi before (like 10 years ago), and I wanted to get back to programming as a hobby. I’ve looked at several languages, and Ruby looked the funnest. :sligh…

---

## [Database access problem through cgi script](https://www.ruby-forum.com/t/database-access-problem-through-cgi-script/156455)

<div class="topic-metadata">

**Author:** [@raju\_k](https://www.ruby-forum.com/u/raju_k)\
**Replies:** 1\
**Last updated:** [December 28, 2008, 8:15pm UTC](https://www.ruby-forum.com/t/database-access-problem-through-cgi-script/156455 "2008-12-28T20:15:53Z")

</div>

Hi, I am trying to print a set of data from database with a CGI script. This script works fine a simple ruby script. But doesnt work in cgi script. Any help is appreciated. connection = WIN32OLE.new(‘ADODB.Connection…

---

## [How to make installing Ruby easier for amateurs](https://www.ruby-forum.com/t/how-to-make-installing-ruby-easier-for-amateurs/156180)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 20\
**Last updated:** [December 28, 2008, 6:51pm UTC](https://www.ruby-forum.com/t/how-to-make-installing-ruby-easier-for-amateurs/156180 "2008-12-28T18:51:26Z")

</div>

Greetings! As an amateur, and intermittent, programmer, I often run right off the edge of what I know. Sometimes this seems utterly needless. Here’s one such case: In the past year I’ve switched from WindowsXP to Kub…

---

## [Dbd implementation for ado.net](https://www.ruby-forum.com/t/dbd-implementation-for-ado-net/156468)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 0\
**Last updated:** [December 28, 2008, 2:56pm UTC](https://www.ruby-forum.com/t/dbd-implementation-for-ado-net/156468 "2008-12-28T14:56:14Z")

</div>

Hi I’ve created an ADO.NET implementation for DBI but I may have overlooked some stuff. At the moment it’s living on google code http://code.google.com/p/ironruby-dbi There is an extra colon in the connection string…

---

## [$B%F%9%H=jMW;~4V%i%s%-%s%0(B](https://www.ruby-forum.com/t/b-f-9-h-jmw-4v-i-s-s-0-b/156449)

<div class="topic-metadata">

**Author:** [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Replies:** 1\
**Last updated:** [December 28, 2008, 6:57am UTC](https://www.ruby-forum.com/t/b-f-9-h-jmw-4v-i-s-s-0-b/156449 "2008-12-28T06:57:28Z")

</div>

e$B@.@%$G$9!#e(B test-all e$B$K$\*$1$k3F!9$N%F%9%H$N=jMW;~4V$r%i%s%-%s%0$K$7$F$$^$7$?!#e(B e$B8+$?$H$3$m!"D9;~4V$+$+$k$b$N$N$&$A$N$$$/$D$+$Oe(B GC e$BMm$$@$C$?$j$7$F!“e(B e$BC;=L$OFq$7$=$&$@$C$?$j$b$7$^$9$,!”$$$/$D$+…

---

## [freeVikings 0.7](https://www.ruby-forum.com/t/freevikings-0-7/156452)

<div class="topic-metadata">

**Author:** [@Jakub\_PavlSSS\_k\_jn](https://www.ruby-forum.com/u/Jakub_PavlSSS_k_jn)\
**Replies:** 0\
**Last updated:** [December 28, 2008, 12:13am UTC](https://www.ruby-forum.com/t/freevikings-0-7/156452 "2008-12-28T00:13:59Z")

</div>

It might be sort of off-topic, but though: New release of freeVikings, a puzzle/platform game written in Ruby is out. \[freeVikings download | SourceForge.net\] If you have ever played one of excellent games “Lost Viki…

---

## [\[Bug #876\] nil before Loaded suite](https://www.ruby-forum.com/t/bug-876-nil-before-loaded-suite/155614)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [December 27, 2008, 9:27pm UTC](https://www.ruby-forum.com/t/bug-876-nil-before-loaded-suite/155614 "2008-12-27T21:27:07Z")

</div>

Bug #876: nil before Loaded suite http://redmine.ruby-lang.org/issues/show/876 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal Loaded suitee$B$NA0$Ke(Bnile$B$,=PNO$5$l$F$7$^$C$F$$$^$9!#e(…

---

## [Jruby / warbler / glassfish - envrionment.rb not read](https://www.ruby-forum.com/t/jruby-warbler-glassfish-envrionment-rb-not-read/156267)

<div class="topic-metadata">

**Author:** [@tkeber](https://www.ruby-forum.com/u/tkeber)\
**Replies:** 1\
**Last updated:** [December 27, 2008, 7:48pm UTC](https://www.ruby-forum.com/t/jruby-warbler-glassfish-envrionment-rb-not-read/156267 "2008-12-27T19:48:51Z")

</div>

Hope someone has a solution for this: I have a rails application with a legacy database with column prefixes on every table. For that I added a method set\_column\_prefix to ActiveRecord::Base in environment.rb as propo…

---

## [Interpreter to work well with other programming languages](https://www.ruby-forum.com/t/interpreter-to-work-well-with-other-programming-languages/156429)

<div class="topic-metadata">

**Author:** [@rubyisking](https://www.ruby-forum.com/u/rubyisking)\
**Replies:** 4\
**Last updated:** [December 27, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/interpreter-to-work-well-with-other-programming-languages/156429 "2008-12-27T16:50:59Z")

</div>

What would be some good interpreters for the Ruby programming language? I need some for .Net, PHP, Java, possibly Python, and others. I’m trying to bypass the compiler option. I recognize there other different types o…

---

## [Using YAML Files with comments](https://www.ruby-forum.com/t/using-yaml-files-with-comments/156436)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 0\
**Last updated:** [December 27, 2008, 3:36pm UTC](https://www.ruby-forum.com/t/using-yaml-files-with-comments/156436 "2008-12-27T15:36:36Z")

</div>

Years ago when I started to use yaml files more heavily I also started to grow accustomed to the habit of commenting my yaml files - within that yaml file. The question I now have is whether if it is possible to save …

---

## [Use of HSQL with Sequel or DataMapper?](https://www.ruby-forum.com/t/use-of-hsql-with-sequel-or-datamapper/156397)

<div class="topic-metadata">

**Author:** [@nabblee](https://www.ruby-forum.com/u/nabblee)\
**Replies:** 3\
**Last updated:** [December 27, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/use-of-hsql-with-sequel-or-datamapper/156397 "2008-12-27T15:09:04Z")

</div>

Does anyone have an example of using HSQL with the Sequel or DataMapper gems? I think I’m making progress with ActiveRecord, but I’m not sure it’s my gem of choice. I’ve tried, but I’m not able to get Sequel to conn…

---

## [Wrong argument type String (expected Data) (TypeError) on 1.8 with dl](https://www.ruby-forum.com/t/wrong-argument-type-string-expected-data-typeerror-on-1-8-with-dl/156433)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [December 27, 2008, 2:06pm UTC](https://www.ruby-forum.com/t/wrong-argument-type-string-expected-data-typeerror-on-1-8-with-dl/156433 "2008-12-27T14:06:23Z")

</div>

1.8 e$B$G$H$-$\*$je(B RubySpec e$B$,Mn$A$k$N$G!"e(B http://www.rubyist.net/~akr/chkbuild/debian/ruby-1.8/log/20081227T205959.txt.gz e$B$A$g$C$H$$F$$?$ie(B DL e$B$r;H$C$F$^$7$?!#e(B e$B:F8=$G$-$k$+;n$7$?$H$3$m!“$H$j$”$(…

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

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