# Ruby

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

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

---

## [Jrubyc with '-' problem](https://www.ruby-forum.com/t/jrubyc-with-problem/191245)

<div class="topic-metadata">

**Author:** [@jinleileiking](https://www.ruby-forum.com/u/jinleileiking)\
**Replies:** 1\
**Last updated:** [July 8, 2010, 9:05am UTC](https://www.ruby-forum.com/t/jrubyc-with-problem/191245 "2010-07-08T09:05:09Z")

</div>

when run: jrubyc ruby-des.rb, it generates: Compiling ruby-des.rb to class ruby\_minus\_des i want to get ruby-des.class. Is there any good way?

---

## [Treequel 1.0.4](https://www.ruby-forum.com/t/treequel-1-0-4/191248)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 0\
**Last updated:** [July 8, 2010, 8:33am UTC](https://www.ruby-forum.com/t/treequel-1-0-4/191248 "2010-07-08T08:33:32Z")

</div>

Version 1.0.4 of treequel has been released. Treequel is an LDAP toolkit for Ruby. It is intended to allow quick, easy access to LDAP directories in a manner consistent with LDAPâ€™s hierarchical, free-form nature. …

---

## [Extending OpenStruct to be lazy and recursive](https://www.ruby-forum.com/t/extending-openstruct-to-be-lazy-and-recursive/191244)

<div class="topic-metadata">

**Author:** [@kuzb](https://www.ruby-forum.com/u/kuzb)\
**Replies:** 3\
**Last updated:** [July 8, 2010, 6:18am UTC](https://www.ruby-forum.com/t/extending-openstruct-to-be-lazy-and-recursive/191244 "2010-07-08T06:18:42Z")

</div>

I’m trying to extend OpenStruct for an application I’m building, where I’d like to access nested hashes as models. OpenStruct (in core) sounds perfect for this, but I ran into two problems: Recursion My hashes have …

---

## [How can i make connecting MS SQL Sever using jruby + ar](https://www.ruby-forum.com/t/how-can-i-make-connecting-ms-sql-sever-using-jruby-ar/190947)

<div class="topic-metadata">

**Author:** [@jinleileiking](https://www.ruby-forum.com/u/jinleileiking)\
**Replies:** 11\
**Last updated:** [July 8, 2010, 5:23am UTC](https://www.ruby-forum.com/t/how-can-i-make-connecting-ms-sql-sever-using-jruby-ar/190947 "2010-07-08T05:23:51Z")

</div>

how can i make connecting MS SQL Sever using jruby + Active record? Env: jruby 1.5.1 + win xp… gem installed : activerecord-sqlserver-adapter-2.3.8.gem test case: require “rubygems” require “active\_record” Acti…

---

## [Symbols vs. variable](https://www.ruby-forum.com/t/symbols-vs-variable/191225)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 3\
**Last updated:** [July 8, 2010, 4:34am UTC](https://www.ruby-forum.com/t/symbols-vs-variable/191225 "2010-07-08T04:34:46Z")

</div>

What is the main difference between using a symbol (begins with :), and a variable? When should we use one over another? Thanks.

---

## [JRuby 1.5.0.RC1 + Rails3: OutOfMemoryError: Java heap space](https://www.ruby-forum.com/t/jruby-1-5-0-rc1-rails3-outofmemoryerror-java-heap-space/191215)

<div class="topic-metadata">

**Author:** [@Leonardo\_Borges](https://www.ruby-forum.com/u/Leonardo_Borges)\
**Replies:** 5\
**Last updated:** [July 8, 2010, 3:32am UTC](https://www.ruby-forum.com/t/jruby-1-5-0-rc1-rails3-outofmemoryerror-java-heap-space/191215 "2010-07-08T03:32:09Z")

</div>

Hi guys, So I have just finished upgrading a simple rails app to rails 3 and am getting the following stack trace when starting up with tomcat (also tested on jetty): Does it ring any bells? If not, I can prepare a…

---

## [\[feature:trunk\] %:z and %::z for strftime](https://www.ruby-forum.com/t/feature-trunk-z-and-z-for-strftime/191202)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 2\
**Last updated:** [July 7, 2010, 11:07pm UTC](https://www.ruby-forum.com/t/feature-trunk-z-and-z-for-strftime/191202 "2010-07-07T23:07:37Z")

</div>

strftime e$B$Ge(B %:z e$B$He(B %::z e$B$H$$$&;XDj$r2DG=$K$9$k$N$O$I$&$G$7$g$&$+!#e(B % ./ruby -e ‘p Time.now.strftime("%z %:z %::z")’ “+0900 +09:00 +09:00:00” e$B;~:9$r%U%)!\<%^%C%H$9$k$N$K8=:\_$Oe(B %z e$B$,$"$j$^$9$,…

---

## [\[ANN\] Win32::Screenshot 0.0.5](https://www.ruby-forum.com/t/ann-win32-screenshot-0-0-5/191236)

<div class="topic-metadata">

**Author:** [@juuser](https://www.ruby-forum.com/u/juuser)\
**Replies:** 0\
**Last updated:** [July 7, 2010, 10:58pm UTC](https://www.ruby-forum.com/t/ann-win32-screenshot-0-0-5/191236 "2010-07-07T22:58:13Z")

</div>

Hello! I’ve release version 0.0.5 of Win32::Screenshot - Capture Screenshots on Windows with Ruby! = 0.0.5 2010-07-07 Added method window\_area for capturing specified area of the window instead of full window (Jarm…

---

## [Ruby 1.9.1-p429](https://www.ruby-forum.com/t/ruby-1-9-1-p429/191221)

<div class="topic-metadata">

**Author:** [@mitkok](https://www.ruby-forum.com/u/mitkok)\
**Replies:** 2\
**Last updated:** [July 7, 2010, 10:05pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-p429/191221 "2010-07-07T22:05:34Z")

</div>

Hey, guys. Just wanted to try out ruby 1.9.1-p492 through rvm, but I’ve got nasty error message while compiling it. Any ideas ? \[2010-07-03 15:43:45\] make eval.c: In function â€˜ruby\_cleanupâ€™: eval.c:139: warning:…

---

## [Mail issue](https://www.ruby-forum.com/t/mail-issue/191228)

<div class="topic-metadata">

**Author:** [@di3go](https://www.ruby-forum.com/u/di3go)\
**Replies:** 1\
**Last updated:** [July 7, 2010, 9:25pm UTC](https://www.ruby-forum.com/t/mail-issue/191228 "2010-07-07T21:25:45Z")

</div>

Hello! I need to get mails from a mail server using pop3, save to disk to later resend. The get part: pop = Net::POP3.new ‘mail server’ pop.start ‘address’, ‘password’ if pop.mails.empty? puts “No mail” else put…

---

## [IronRuby-Rake-0.0.9-Universal-dotnet only for IIS 7?](https://www.ruby-forum.com/t/ironruby-rake-0-0-9-universal-dotnet-only-for-iis-7/191231)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 2\
**Last updated:** [July 7, 2010, 9:15pm UTC](https://www.ruby-forum.com/t/ironruby-rake-0-0-9-universal-dotnet-only-for-iis-7/191231 "2010-07-07T21:15:13Z")

</div>

I have a Windows XP machine and noticed when i try and run the deploy2iis i get an error (see below). Looking at the source of the error its trying to do something with the user IIS\_IUSRS which isn’t a user under Win…

---

## [Ruby switches](https://www.ruby-forum.com/t/ruby-switches/191195)

<div class="topic-metadata">

**Author:** [@kentorwow](https://www.ruby-forum.com/u/kentorwow)\
**Replies:** 10\
**Last updated:** [July 7, 2010, 7:15pm UTC](https://www.ruby-forum.com/t/ruby-switches/191195 "2010-07-07T19:15:13Z")

</div>

Let’s say I have something like this case when “”.empty? then puts “Empty” when “”.nil? then puts “Nil” when “”.include?(“a”) then puts “Includes ‘a’” end Is there a way to do something like this in…

---

## [Global method usage in standard libs](https://www.ruby-forum.com/t/global-method-usage-in-standard-libs/191204)

<div class="topic-metadata">

**Author:** [@Alexander\_ESFische](https://www.ruby-forum.com/u/Alexander_ESFische)\
**Replies:** 1\
**Last updated:** [July 7, 2010, 7:12pm UTC](https://www.ruby-forum.com/t/global-method-usage-in-standard-libs/191204 "2010-07-07T19:12:17Z")

</div>

I noticed that at least some of the standard libs use global methods to provide some kind of shortcut to the actual new method. For example the excellent Pathname class’ objects can be generated either by Pathname.new…

---

## [Rubygarden?](https://www.ruby-forum.com/t/rubygarden/191173)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 6\
**Last updated:** [July 7, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/rubygarden/191173 "2010-07-07T18:06:31Z")

</div>

Anybody know what happened to rubygarden.org? -r

---

## [Problem of share variable in function using thread](https://www.ruby-forum.com/t/problem-of-share-variable-in-function-using-thread/191158)

<div class="topic-metadata">

**Author:** [@Nita\_N](https://www.ruby-forum.com/u/Nita_N)\
**Replies:** 3\
**Last updated:** [July 7, 2010, 5:55pm UTC](https://www.ruby-forum.com/t/problem-of-share-variable-in-function-using-thread/191158 "2010-07-07T17:55:35Z")

</div>

Hi All I got a little problem when using thread function and variable, let’s say this code : require ‘rubygems’ require ‘watir’ require ‘thread’ def testfunc(id) total = id + 5 puts “id #{id} is #{total}” end t…

---

## [Ruby 1.9 Old School $LOAD\_PATH](https://www.ruby-forum.com/t/ruby-1-9-old-school-load-path/191212)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 1\
**Last updated:** [July 7, 2010, 5:02pm UTC](https://www.ruby-forum.com/t/ruby-1-9-old-school-load-path/191212 "2010-07-07T17:02:16Z")

</div>

In Ruby 1.9+ is there a way to get the $LOAD\_PATH without the gem entries? I need access to the old-school style load path.

---

## [RubyGems on GitHub](https://www.ruby-forum.com/t/rubygems-on-github/191214)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 1\
**Last updated:** [July 7, 2010, 4:48pm UTC](https://www.ruby-forum.com/t/rubygems-on-github/191214 "2010-07-07T16:48:13Z")

</div>

All, As Nick recently announced at RailsConf, we’ve moved the RubyGems repo to GitHub (RubyGems · GitHub). If you’ve ever wanted to change (or fix) anything about RubyGems, it’s time to put your money where your mout…

---

## [Consuming a SOAP Service in Ruby](https://www.ruby-forum.com/t/consuming-a-soap-service-in-ruby/191144)

<div class="topic-metadata">

**Author:** [@saeed](https://www.ruby-forum.com/u/saeed)\
**Replies:** 2\
**Last updated:** [July 7, 2010, 4:41pm UTC](https://www.ruby-forum.com/t/consuming-a-soap-service-in-ruby/191144 "2010-07-07T16:41:46Z")

</div>

Hi, I am trying to consume a SOAP service. I don’t know a lot about this area but from what I have read, I have come up with the following code so far; require ‘soap/wsdlDriver’ wsdl=“http://realtime.nationalrail.co…

---

## [Hashes don't allow preceding commas by design?](https://www.ruby-forum.com/t/hashes-dont-allow-preceding-commas-by-design/191189)

<div class="topic-metadata">

**Author:** [@tensaiji](https://www.ruby-forum.com/u/tensaiji)\
**Replies:** 11\
**Last updated:** [July 7, 2010, 3:59pm UTC](https://www.ruby-forum.com/t/hashes-dont-allow-preceding-commas-by-design/191189 "2010-07-07T15:59:36Z")

</div>

This is the output from irb that shows ruby 1.9.1 doesn’t like hash entries to be preceded by a comma, only ended by one: myhash3 = { :first =\> “first”, :second =\> “second” } {:first=\>“first”, :second=\>“second”} m…

---

## [Is there any best OCR library in Ruby?](https://www.ruby-forum.com/t/is-there-any-best-ocr-library-in-ruby/191209)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 0\
**Last updated:** [July 7, 2010, 3:44pm UTC](https://www.ruby-forum.com/t/is-there-any-best-ocr-library-in-ruby/191209 "2010-07-07T15:44:48Z")

</div>

is there any best OCR(Optical Character Recognition) library in Ruby ?

---

## [Global methods in Ruby standard lib](https://www.ruby-forum.com/t/global-methods-in-ruby-standard-lib/191203)

<div class="topic-metadata">

**Author:** [@Alexander\_ESFische](https://www.ruby-forum.com/u/Alexander_ESFische)\
**Replies:** 1\
**Last updated:** [July 7, 2010, 3:06pm UTC](https://www.ruby-forum.com/t/global-methods-in-ruby-standard-lib/191203 "2010-07-07T15:06:18Z")

</div>

I noticed that at least some of the standard libs use global methods to provide some kind of shortcut to the actual new method. For example the excellent Pathname class’ objects can be generated either by Pathname.new…

---

## [Error on tomcat console in Jruby on rails project](https://www.ruby-forum.com/t/error-on-tomcat-console-in-jruby-on-rails-project/190123)

<div class="topic-metadata">

**Author:** [@yani\_engico](https://www.ruby-forum.com/u/yani_engico)\
**Replies:** 7\
**Last updated:** [July 7, 2010, 2:21pm UTC](https://www.ruby-forum.com/t/error-on-tomcat-console-in-jruby-on-rails-project/190123 "2010-07-07T14:21:38Z")

</div>

Hi, I am developping a rails project and i am using jruby instead of ruby. I got this error continuously on my console: java.lang.NullPointerException at com.kenai.jffi.Function.finalize(Function.java:177) at java.l…

---

## [Rdoc 2.5.9 Released](https://www.ruby-forum.com/t/rdoc-2-5-9-released/191177)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 1\
**Last updated:** [July 7, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/rdoc-2-5-9-released/191177 "2010-07-07T13:20:53Z")

</div>

rdoc version 2.5.9 has been released! RDoc Project Page - http://rubyforge.org/projects/rdoc/ RDoc Documentation - http://rdoc.rubyforge.org/ RDoc Bug Tracker - http://rubyforge.org/tracker/?atid=2472&group\_id=627&f…

---

## [Problem wrapping Voldemort client Java class into JRuby class: dependencies not loading](https://www.ruby-forum.com/t/problem-wrapping-voldemort-client-java-class-into-jruby-class-dependencies-not-loading/191121)

<div class="topic-metadata">

**Author:** [@Russell\_J](https://www.ruby-forum.com/u/Russell_J)\
**Replies:** 2\
**Last updated:** [July 7, 2010, 9:20am UTC](https://www.ruby-forum.com/t/problem-wrapping-voldemort-client-java-class-into-jruby-class-dependencies-not-loading/191121 "2010-07-07T09:20:48Z")

</div>

I am trying to use the Voldemort http://project-voldemort.com/ Java client from JRuby by wrapping the voldemort.clienthttp://github.com/voldemort/voldemort/tree/master/src/java/voldemort/client/ Java class in a JRub…

---

## [DTD documents and Ruby](https://www.ruby-forum.com/t/dtd-documents-and-ruby/191182)

<div class="topic-metadata">

**Author:** [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Replies:** 0\
**Last updated:** [July 7, 2010, 8:05am UTC](https://www.ruby-forum.com/t/dtd-documents-and-ruby/191182 "2010-07-07T08:05:53Z")

</div>

Has anyone ever run across some tools that would read a DTD and produce usable Ruby classes from that? Seems like quite a daunting task, but thought maybe someone has given it a shot. I did find the Quickbooks Ruby g…

---

## [Namespacing a class](https://www.ruby-forum.com/t/namespacing-a-class/190448)

<div class="topic-metadata">

**Author:** [@Eric\_MSP\_Veith](https://www.ruby-forum.com/u/Eric_MSP_Veith)\
**Replies:** 17\
**Last updated:** [July 7, 2010, 5:19am UTC](https://www.ruby-forum.com/t/namespacing-a-class/190448 "2010-07-07T05:19:07Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello List, what’s the difference between: —%\<— namespace A class B def foo # … end end end —\>%— and —%\<— class C def bar … end end —\>%— Besindes, of cours…

---

## [Respond\_to?(\<protected method name\>) returns true](https://www.ruby-forum.com/t/respond-to-protected-method-name-returns-true/183912)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 13\
**Last updated:** [July 7, 2010, 4:39am UTC](https://www.ruby-forum.com/t/respond-to-protected-method-name-returns-true/183912 "2010-07-07T04:39:54Z")

</div>

ã€€ä»Šã•ã‚‰ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ respond\_to? ã§ protected ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ æ¤œæŸ»ã™ã‚‹ã¨çœŸã«ãªã‚‹ã®ã£ã¦ãã†ã„ã†ã‚‚ã®ã§ã—ãŸã£ã‘ã€‚ ã€€respond\_to? ã‚’ä½¿ã†ç›®çš„ã‚’è€ƒãˆã‚‹ã¨é‡ˆç„¶ã¨ã—ãªã„…

---

## [Extending a core class cleanly \[noobish alert\]](https://www.ruby-forum.com/t/extending-a-core-class-cleanly-noobish-alert/191118)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 4\
**Last updated:** [July 7, 2010, 2:59am UTC](https://www.ruby-forum.com/t/extending-a-core-class-cleanly-noobish-alert/191118 "2010-07-07T02:59:48Z")

</div>

Assume I’d like to create a statistics package designed to work on Arrays \[but see P.S.\]. One way to do this would be to create functions that take an array as an argument: def mean(array) return NaN unless array && …

---

## [Save your money and open all blocked sites now](https://www.ruby-forum.com/t/save-your-money-and-open-all-blocked-sites-now/191168)

<div class="topic-metadata">

**Author:** [@porxy](https://www.ruby-forum.com/u/porxy)\
**Replies:** 0\
**Last updated:** [July 6, 2010, 11:10pm UTC](https://www.ruby-forum.com/t/save-your-money-and-open-all-blocked-sites-now/191168 "2010-07-06T23:10:54Z")

</div>

save your money and open all blocked sites now just enter to this proxy and put your site for free

---

## [Synchronize a "mocked" clock in a distributed system](https://www.ruby-forum.com/t/synchronize-a-mocked-clock-in-a-distributed-system/190987)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 12\
**Last updated:** [July 6, 2010, 8:47pm UTC](https://www.ruby-forum.com/t/synchronize-a-mocked-clock-in-a-distributed-system/190987 "2010-07-06T20:47:28Z")

</div>

I’ve been banging on a problem for a few days now and don’t feel any closer to solving it. I’m hoping some of the big brains on the ruby ML can shed some light. Following are a few paragraphs with a brief system overv…

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

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