# Ruby

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

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

---

## [Mock a %x call](https://www.ruby-forum.com/t/mock-a-x-call/168320)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 2\
**Last updated:** [May 20, 2009, 12:17am UTC](https://www.ruby-forum.com/t/mock-a-x-call/168320 "2009-05-20T00:17:07Z")

</div>

Hi, Is it possible to mock such method call? I tried: Kernel.expects(:’%x’).returns(‘whatever’). But I get the following error: SyntaxError: compile error /usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/mocha-0.9.5/lib/…

---

## [Any good workaround for LocalJumpError?](https://www.ruby-forum.com/t/any-good-workaround-for-localjumperror/168280)

<div class="topic-metadata">

**Author:** [@figo2476](https://www.ruby-forum.com/u/figo2476)\
**Replies:** 6\
**Last updated:** [May 20, 2009, 12:07am UTC](https://www.ruby-forum.com/t/any-good-workaround-for-localjumperror/168280 "2009-05-20T00:07:44Z")

</div>

Hi All, I was trying to implement a callback mechanism in JRuby that looks like the following: class Engine def initialize() @b=\[\]; @data = 1; end def add\_listener(&b) @b \<\< b; end def fire\_event() @b.each do …

---

## [Permute each element of a ragged array?](https://www.ruby-forum.com/t/permute-each-element-of-a-ragged-array/168189)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 18\
**Last updated:** [May 19, 2009, 11:45pm UTC](https://www.ruby-forum.com/t/permute-each-element-of-a-ragged-array/168189 "2009-05-19T23:45:30Z")

</div>

Rubies: Here’s a programming chestnut. I suppose I could brute-force my way through this, but I’m curious if anyone knows a slick or clever way to do it. We are talking about returning an array of arrays, each contai…

---

## [Fcgi.rb and lighttpd](https://www.ruby-forum.com/t/fcgi-rb-and-lighttpd/168272)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 1\
**Last updated:** [May 19, 2009, 11:42pm UTC](https://www.ruby-forum.com/t/fcgi-rb-and-lighttpd/168272 "2009-05-19T23:42:34Z")

</div>

I’m trying to get ruby code to listen to fastcgi from lighttpd… should be easy, but … The symptom: My ruby program is started up by lighttpd (4 instances, in fact), but it never gets requests. The lighttpd config is: …

---

## [Beginner question pt.2](https://www.ruby-forum.com/t/beginner-question-pt-2/168281)

<div class="topic-metadata">

**Author:** [@calvin](https://www.ruby-forum.com/u/calvin)\
**Replies:** 7\
**Last updated:** [May 19, 2009, 10:29pm UTC](https://www.ruby-forum.com/t/beginner-question-pt-2/168281 "2009-05-19T22:29:56Z")

</div>

When I type this into the terminal it works… but I am wondering if I am going about things the right way: $ /opt/local/bin/ruby1.9 -v $ cd $ cd Desktop $ cd programs $ ruby1.9 calc.rb then the math equation answer…

---

## [Broken YAML.dump with YAML::Object (Missing String#each)](https://www.ruby-forum.com/t/broken-yaml-dump-with-yaml-object-missing-string-each/168352)

<div class="topic-metadata">

**Author:** [@Jonathan\_Gold](https://www.ruby-forum.com/u/Jonathan_Gold)\
**Replies:** 0\
**Last updated:** [May 19, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/broken-yaml-dump-with-yaml-object-missing-string-each/168352 "2009-05-19T21:53:58Z")

</div>

I feel like I’ve discovered a bug in YAML.dump when used with yaml-tagged objects (YAML::Object). It seems that the YAML libs are still expecting to use String#each, but that’s gone. To repro: ruby -ryaml -e 'anon\_obj…

---

## [Tempfile.rb and unlink on windows](https://www.ruby-forum.com/t/tempfile-rb-and-unlink-on-windows/168324)

<div class="topic-metadata">

**Author:** [@modethree3](https://www.ruby-forum.com/u/modethree3)\
**Replies:** 2\
**Last updated:** [May 19, 2009, 9:16pm UTC](https://www.ruby-forum.com/t/tempfile-rb-and-unlink-on-windows/168324 "2009-05-19T21:16:33Z")

</div>

PROBLEM Was setting up a rails projects on a windows machine for and the project required RubyInline. When running rake db:migrate for the first time RubyInline creates a temp file to ensure it can have access to som…

---

## [Bug - Cannot call CLR constructor of builtin type](https://www.ruby-forum.com/t/bug-cannot-call-clr-constructor-of-builtin-type/168348)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 0\
**Last updated:** [May 19, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/bug-cannot-call-clr-constructor-of-builtin-type/168348 "2009-05-19T21:08:41Z")

</div>

FYI - http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1306 I want to create a CLR Thread and set its AparmentState before calling Start on it. However, doing System::Threading::Thread.new calls the Ruby int…

---

## [Orca\_card 1.0](https://www.ruby-forum.com/t/orca-card-1-0/168346)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [May 19, 2009, 8:57pm UTC](https://www.ruby-forum.com/t/orca-card-1-0/168346 "2009-05-19T20:57:28Z")

</div>

orca\_card version 1.0 has been released! http://seattlerb.rubyforge.org/orca\_card http://orcacard.com Dumps information about your ORCA card. ORCA cards are Western Washington’s all-in-one transit smart card that a…

---

## [Rake namespace selection](https://www.ruby-forum.com/t/rake-namespace-selection/168326)

<div class="topic-metadata">

**Author:** [@peterk](https://www.ruby-forum.com/u/peterk)\
**Replies:** 1\
**Last updated:** [May 19, 2009, 8:41pm UTC](https://www.ruby-forum.com/t/rake-namespace-selection/168326 "2009-05-19T20:41:18Z")

</div>

is there a way to “explicitly” invoke a block inside the scope of a parent or explicit “root relative” rake namespace instead of always being a child of the current namespace ??? namespace :xxx do namespace :yyy do …

---

## [SM::ToHtml does not convert urls to hyperlinks](https://www.ruby-forum.com/t/sm-tohtml-does-not-convert-urls-to-hyperlinks/168288)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 1\
**Last updated:** [May 19, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/sm-tohtml-does-not-convert-urls-to-hyperlinks/168288 "2009-05-19T19:58:40Z")

</div>

I am trying to use my own output formatter with SimpleMarkup. Things seems to work, except for hyperlinks not working as expected. I tried to use SM::ToHtml to simplify things, and even if does not deal with hyperlink…

---

## [\[Feature:trunk\] enhancement of Array#drop](https://www.ruby-forum.com/t/feature-trunk-enhancement-of-array-drop/168293)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 6\
**Last updated:** [May 19, 2009, 6:50pm UTC](https://www.ruby-forum.com/t/feature-trunk-enhancement-of-array-drop/168293 "2009-05-19T18:50:21Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B Rubye$B$G%9%/%j%W%H$r=q$$$F$$$F!“G\[Ns$+$i!”$"$k\>r7o$K9gCW$9$k@he(B e$BF,$NMWAG$N$\_$r:o=|$9$k!"$H$$$&=hM}$r=q$-$?$$\>lLL$K=P2q$C$?$3e(B e$B$H$,2?EY$+$"$j$^$9!#e(B e$BL5\>r…

---

## [Unable to install rack gem](https://www.ruby-forum.com/t/unable-to-install-rack-gem/168311)

<div class="topic-metadata">

**Author:** [@rjsquire](https://www.ruby-forum.com/u/rjsquire)\
**Replies:** 7\
**Last updated:** [May 19, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/unable-to-install-rack-gem/168311 "2009-05-19T18:39:47Z")

</div>

I have been trying to install the twitter gem on Ubuntu and have been unable to do so. Rack and Thin are both dependencies of the twitter gem and there seems to be a circular dependency between rack and thin. When I…

---

## [Torquebox](https://www.ruby-forum.com/t/torquebox/168279)

<div class="topic-metadata">

**Author:** [@Joseph\_A](https://www.ruby-forum.com/u/Joseph_A)\
**Replies:** 6\
**Last updated:** [May 19, 2009, 6:14pm UTC](https://www.ruby-forum.com/t/torquebox/168279 "2009-05-19T18:14:18Z")

</div>

Anyone seen this or used it? http://torquebox.org/ Basically looks likes JBoss with JRuby packaged up together. Seems like a nice alternative to the Glassfish Gem. Joe

---

## [\[Bug #1491\] $B!V(Battr\_reader :$B!{!{!W$H!V(Bdef $B!{!{(B ; @$B!{!{(B ; end$B!W$GF0:n$,0\[$J](https://www.ruby-forum.com/t/bug-1491-b-v-battr-reader-b-w-h-v-bdef-b-b-b-b-end-b-w-gf0-n-0-j/168316)

<div class="topic-metadata">

**Author:** [@SS\_SS\_S\_S\_SSSSS\_S\_S](https://www.ruby-forum.com/u/SS_SS_S_S_SSSSS_S_S)\
**Replies:** 1\
**Last updated:** [May 19, 2009, 5:16pm UTC](https://www.ruby-forum.com/t/bug-1491-b-v-battr-reader-b-w-h-v-bdef-b-b-b-b-end-b-w-gf0-n-0-j/168316 "2009-05-19T17:16:26Z")

</div>

Bug #1491: e$B!Ve(Battr\_reader :e$B!{!{!W$H!Ve(Bdef e$B!{!{e(B ; @e$B!{!{e(B ; ende$B!W$GF0:n$,0\[$J$ke(B http://redmine.ruby-lang.org/issues/show/1491 e$B5/I\<\<Te(B: e$B?50le(B e$B9\>8}e(B e$B%9%F!\<%?%9e(B: Open, e$BM%@…

---

## [Can't load rubygems from a WAR file](https://www.ruby-forum.com/t/cant-load-rubygems-from-a-war-file/168236)

<div class="topic-metadata">

**Author:** [@abukovsky](https://www.ruby-forum.com/u/abukovsky)\
**Replies:** 2\
**Last updated:** [May 19, 2009, 4:35pm UTC](https://www.ruby-forum.com/t/cant-load-rubygems-from-a-war-file/168236 "2009-05-19T16:35:12Z")

</div>

I’m trying to deploy a prototype JRuby/Rails application into the WebLogic 10.3 application server. First, I’m getting a warning on non-existent jruby.home directory and ultimately an error that rubygems can’t be load…

---

## [\[Bug:1.9\] exact Time and inexact Time](https://www.ruby-forum.com/t/bug-1-9-exact-time-and-inexact-time/167934)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 8\
**Last updated:** [May 19, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/bug-1-9-exact-time-and-inexact-time/167934 "2009-05-19T16:08:14Z")

</div>

e$B1sF#$G$9!#e(B e$B8=:\_!"e(BTime#- e$B$,e(B Rational e$B$rJV$9$h$&$K$J$C$F$$$^$9!#e(B $ ./ruby -e ‘p Time.now - Time.now’ (-7/156250) e$B$7$+$7!"e(BTime.now e$B$N$h$&$Ke(B inexact e$B$J;~9o$N:9J,$,!"e(Bexact e$B$Ne…

---

## [Berkeley DB or Store equivalent?](https://www.ruby-forum.com/t/berkeley-db-or-store-equivalent/168179)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 15\
**Last updated:** [May 19, 2009, 4:04pm UTC](https://www.ruby-forum.com/t/berkeley-db-or-store-equivalent/168179 "2009-05-19T16:04:02Z")

</div>

I have never used mySQL because perl’s Storable or BerkeleyDB modules always did me fine for cgi stuff. I am going to be learning rails, so I supposed I will have to learn mySQL anyway, but I was wondering: is it exc…

---

## [Custom HTTP header](https://www.ruby-forum.com/t/custom-http-header/168283)

<div class="topic-metadata">

**Author:** [@jnicholson](https://www.ruby-forum.com/u/jnicholson)\
**Replies:** 1\
**Last updated:** [May 19, 2009, 3:47pm UTC](https://www.ruby-forum.com/t/custom-http-header/168283 "2009-05-19T15:47:09Z")

</div>

I want a simple http header like the one below. HTTP/1.1 200 OK Server: Mongrel 1.1.5 Set-Cookie: JSESSIONID=\<session\_key\>; Path=/ Content-Type: text/html;charset=UTF-8 Content-Length: 138 Date: Fri, 15 May 2009 01…

---

## [JRoR/JBoss deploy error](https://www.ruby-forum.com/t/jror-jboss-deploy-error/168263)

<div class="topic-metadata">

**Author:** [@nlsmith](https://www.ruby-forum.com/u/nlsmith)\
**Replies:** 1\
**Last updated:** [May 19, 2009, 1:55pm UTC](https://www.ruby-forum.com/t/jror-jboss-deploy-error/168263 "2009-05-19T13:55:13Z")

</div>

I finally build a War file with Warbler. I moved the War file into the Deploy folder within JBoss and start JBoss. The following is the start of several pages of errors. It seems like an issue with Rack. 12:03:09,578 …

---

## [Beginner Ruby Question](https://www.ruby-forum.com/t/beginner-ruby-question/168258)

<div class="topic-metadata">

**Author:** [@calvin](https://www.ruby-forum.com/u/calvin)\
**Replies:** 6\
**Last updated:** [May 19, 2009, 5:40am UTC](https://www.ruby-forum.com/t/beginner-ruby-question/168258 "2009-05-19T05:40:47Z")

</div>

Hi, I just intstalled Ruby 1.9 on my mac with macports. The installation was successful but when I type in ruby -v at the command prompt, Ruby 1.8.6 shows up still. The latest Pickaxe book says I have to have /opt/ l…

---

## [How to persuade your boss to let you use JRuby?](https://www.ruby-forum.com/t/how-to-persuade-your-boss-to-let-you-use-jruby/168247)

<div class="topic-metadata">

**Author:** [@chriscole](https://www.ruby-forum.com/u/chriscole)\
**Replies:** 13\
**Last updated:** [May 19, 2009, 5:17am UTC](https://www.ruby-forum.com/t/how-to-persuade-your-boss-to-let-you-use-jruby/168247 "2009-05-19T05:17:23Z")

</div>

I would like to propose to my employer to use JRuby but since my boss is unknowledgeable about technology he is usually reluctant to use technologies that he does not understand well and he does not like to learn new …

---

## [TkPhotoImage.copy always gives "too many colors" Error](https://www.ruby-forum.com/t/tkphotoimage-copy-always-gives-too-many-colors-error/168191)

<div class="topic-metadata">

**Author:** [@cruby](https://www.ruby-forum.com/u/cruby)\
**Replies:** 6\
**Last updated:** [May 19, 2009, 3:08am UTC](https://www.ruby-forum.com/t/tkphotoimage-copy-always-gives-too-many-colors-error/168191 "2009-05-19T03:08:03Z")

</div>

I’m working to copy and eventually manipulate images within Ruby, but the Tk extension seems to be broken. My program (minus some crud) looks like this: require ‘tk’ require ‘tk/image’ require ‘tkextlib/tkimg’ Set…

---

## [Advanced tickets for RubyKaigi 2009](https://www.ruby-forum.com/t/advanced-tickets-for-rubykaigi-2009/168276)

<div class="topic-metadata">

**Author:** [@Leonard\_C](https://www.ruby-forum.com/u/Leonard_C)\
**Replies:** 0\
**Last updated:** [May 19, 2009, 2:19am UTC](https://www.ruby-forum.com/t/advanced-tickets-for-rubykaigi-2009/168276 "2009-05-19T02:19:31Z")

</div>

We’re now accepting advanced ticket reservations for RubyKaigi 2009 \[http://rubykaigi.org\] for attendees flying in from outside of Japan. Tickets will cover all 3 days of the conference, from Friday, 17th July through…

---

## [FxRuby for Ruby 1.9.1 install issue](https://www.ruby-forum.com/t/fxruby-for-ruby-1-9-1-install-issue/168208)

<div class="topic-metadata">

**Author:** [@Janos\_S](https://www.ruby-forum.com/u/Janos_S)\
**Replies:** 4\
**Last updated:** [May 19, 2009, 1:11am UTC](https://www.ruby-forum.com/t/fxruby-for-ruby-1-9-1-install-issue/168208 "2009-05-19T01:11:04Z")

</div>

Hi all. I am new to FxRuby, and trying to install the toolkit. I’m running winXP-Sp3 ruby -v ruby 1.9.1p0 (2009-01-30 revision 21907) \[i386-mswin32\] gem -v 1.3.3 gem list \*\*\* LOCAL GEMS \*\*\* fxruby (1.6.19) …

---

## [Imap\_processor 1.1 Released](https://www.ruby-forum.com/t/imap-processor-1-1-released/168271)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [May 19, 2009, 12:58am UTC](https://www.ruby-forum.com/t/imap-processor-1-1-released/168271 "2009-05-19T00:58:47Z")

</div>

imap\_processor version 1.1 has been released! http://seattlerb.rubyforge.org/imap\_processor IMAPProcessor is a client for processing messages on an IMAP server. It provides some basic mechanisms for connecting to an…

---

## [Mechanize - installed but not found?](https://www.ruby-forum.com/t/mechanize-installed-but-not-found/168260)

<div class="topic-metadata">

**Author:** [@caleb-boese](https://www.ruby-forum.com/u/caleb-boese)\
**Replies:** 2\
**Last updated:** [May 19, 2009, 12:31am UTC](https://www.ruby-forum.com/t/mechanize-installed-but-not-found/168260 "2009-05-19T00:31:49Z")

</div>

Running OSX leopard and ruby 1.8.7 (2008-08-11 patchlevel 72) \[i686-darwin9.5.0\] I’ve installed mechanize: \*\*\* LOCAL GEMS \*\*\* actionmailer (2.3.2, 2.2.2) actionpack (2.3.2, 2.2.2) activerecord (2.3.2, 2.2.2) activ…

---

## [Introducing RubyScience on GitHub!](https://www.ruby-forum.com/t/introducing-rubyscience-on-github/168264)

<div class="topic-metadata">

**Author:** [@jballanc](https://www.ruby-forum.com/u/jballanc)\
**Replies:** 13\
**Last updated:** [May 18, 2009, 11:45pm UTC](https://www.ruby-forum.com/t/introducing-rubyscience-on-github/168264 "2009-05-18T23:45:32Z")

</div>

In the tradition of actions vs. words, I present to you: RubyScience - A Collection of Ruby Science Libraries and Projects http://github.com/jballanc/RubyScience To get started: git clone git://github.com/jballanc/R…

---

## [Jruby gem install rails failed in Ubuntu 8.10](https://www.ruby-forum.com/t/jruby-gem-install-rails-failed-in-ubuntu-8-10/168269)

<div class="topic-metadata">

**Author:** [@sham](https://www.ruby-forum.com/u/sham)\
**Replies:** 0\
**Last updated:** [May 18, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/jruby-gem-install-rails-failed-in-ubuntu-8-10/168269 "2009-05-18T23:38:21Z")

</div>

Hi all, When I run the command, jruby -J-Xmx700m -S gem install rails -y --no-ri --no-rdoc Bulk updating Gem source index for: http://gems.rubyforge.org I get the following error: ERROR: While executing gem … (Na…

---

## [\[Bug: trunk\] test\_encode\_xmlschema depends upon system's time zone](https://www.ruby-forum.com/t/bug-trunk-test-encode-xmlschema-depends-upon-systems-time-zone/168266)

<div class="topic-metadata">

**Author:** [@zunda](https://www.ruby-forum.com/u/zunda)\
**Replies:** 0\
**Last updated:** [May 18, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/bug-trunk-test-encode-xmlschema-depends-upon-systems-time-zone/168266 "2009-05-18T23:12:43Z")

</div>

zundae$B$H?=$7$^$9e(B ruby 1.9.2dev (2009-05-18 trunk 23484) \[i686-linux\]e$B$G!"e(B make test-alle$B$,2\<5-$N$h$&$K\<:GT$7$^$9!#e(B Failure: test\_encode\_xmlschema(TestTimeExtention) \[/home/zunda/local/src/ruby-trunk/…

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

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