# Ruby

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

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

---

## [\[FYI| Pure Java Nokogiri 1.5.0.beta.2](https://www.ruby-forum.com/t/fyi-pure-java-nokogiri-1-5-0-beta-2/192540)

<div class="topic-metadata">

**Author:** [@Yoko\_H](https://www.ruby-forum.com/u/Yoko_H)\
**Replies:** 3\
**Last updated:** [August 4, 2010, 3:14pm UTC](https://www.ruby-forum.com/t/fyi-pure-java-nokogiri-1-5-0-beta-2/192540 "2010-08-04T15:14:52Z")

</div>

Hi, Pure Java Nokogiri 1.5.0.beta.2 has been released. If you want to use, install Nokogiri with --pre option: gem install nokogiri --pre Since Nokogiri 1.5.0 doesn’t have ffi support, pure Java version will start r…

---

## [Remove the error](https://www.ruby-forum.com/t/remove-the-error/192664)

<div class="topic-metadata">

**Author:** [@amiref](https://www.ruby-forum.com/u/amiref)\
**Replies:** 3\
**Last updated:** [August 4, 2010, 12:23pm UTC](https://www.ruby-forum.com/t/remove-the-error/192664 "2010-08-04T12:23:53Z")

</div>

Hi Why these codes result error ? 1- array = \[\*1…10\] sum = array.inject { |memo,item| memo+item if item !=3 } 2- array = \[\*1…10\] sum = array.inject { |memo,item| puts memo+item }

---

## [Ruby PRAWN PDF](https://www.ruby-forum.com/t/ruby-prawn-pdf/192711)

<div class="topic-metadata">

**Author:** [@rorjeff](https://www.ruby-forum.com/u/rorjeff)\
**Replies:** 0\
**Last updated:** [August 4, 2010, 12:07pm UTC](https://www.ruby-forum.com/t/ruby-prawn-pdf/192711 "2010-08-04T12:07:52Z")

</div>

Is there a simpler code to set the Headers and Footers on all N pages in a PDF file that is generated by PRAWN Plugin. the codes are to be written in a “report.pdf.prawn” file, which is a direct coding area of the PDF…

---

## [Method with array PROBLEM](https://www.ruby-forum.com/t/method-with-array-problem/192701)

<div class="topic-metadata">

**Author:** [@cisco](https://www.ruby-forum.com/u/cisco)\
**Replies:** 3\
**Last updated:** [August 4, 2010, 11:06am UTC](https://www.ruby-forum.com/t/method-with-array-problem/192701 "2010-08-04T11:06:00Z")

</div>

Hi, I have a problem, I have to write a method using an array but I’m not able to combine the two things. I have a txt file which contains words and puntuaction symbols separated whit spaces. I have to write a method…

---

## [Documenting string](https://www.ruby-forum.com/t/documenting-string/192671)

<div class="topic-metadata">

**Author:** [@Ciur\_Eugen](https://www.ruby-forum.com/u/Ciur_Eugen)\
**Replies:** 4\
**Last updated:** [August 4, 2010, 10:49am UTC](https://www.ruby-forum.com/t/documenting-string/192671 "2010-08-04T10:49:36Z")

</div>

Hi everyone, Below is a short and functioning program: #!/usr/bin/ruby def call\_me e = \<\<SOME this is a nice string! SOME e end puts call\_me It runs and displays string between SOME delimiters. My question is…

---

## [Different between 2 code](https://www.ruby-forum.com/t/different-between-2-code/192655)

<div class="topic-metadata">

**Author:** [@amiref](https://www.ruby-forum.com/u/amiref)\
**Replies:** 2\
**Last updated:** [August 4, 2010, 10:08am UTC](https://www.ruby-forum.com/t/different-between-2-code/192655 "2010-08-04T10:08:26Z")

</div>

Hi Why 2 different sort in below code return different result ? ( I dont understand different between “v1 \<=\> v2” and “v2 \<=\> v1” ). array = \[3,1,5,2,4\] =\> \[3, 1, 5, 2, 4\] array.sort {|v1,v2| v1 \<=\> v2 } =\> \[1, 2,…

---

## [Can't install Mongrel and My SQL gem on Windows XP 64 bit](https://www.ruby-forum.com/t/cant-install-mongrel-and-my-sql-gem-on-windows-xp-64-bit/192628)

<div class="topic-metadata">

**Author:** [@javix](https://www.ruby-forum.com/u/javix)\
**Replies:** 4\
**Last updated:** [August 4, 2010, 9:20am UTC](https://www.ruby-forum.com/t/cant-install-mongrel-and-my-sql-gem-on-windows-xp-64-bit/192628 "2010-08-04T09:20:42Z")

</div>

I have no access to the Internet to be able to install all needed gems, so I downloaded them one by one and put to a local folder: cgi\_multipart\_eof\_fix-2.5.0.gem, fastthread-1.0.7.gem, gem\_plugin-0.2.3.gem json-1.1.9…

---

## [Timeout::AnonymousExcep raised after Timeout.timeout returns](https://www.ruby-forum.com/t/timeout-anonymousexcep-raised-after-timeout-timeout-returns/192468)

<div class="topic-metadata">

**Author:** [@katerman](https://www.ruby-forum.com/u/katerman)\
**Replies:** 1\
**Last updated:** [August 4, 2010, 7:49am UTC](https://www.ruby-forum.com/t/timeout-anonymousexcep-raised-after-timeout-timeout-returns/192468 "2010-08-04T07:49:17Z")

</div>

I have a process that makes lots of requests to a fairly slow http server. After processing about 30k requests, a timeout exception often kills the process. But the exception isn’t Timeout::Error, and it doesn’t get p…

---

## [JRubyClassLoader not getting released](https://www.ruby-forum.com/t/jrubyclassloader-not-getting-released/191906)

<div class="topic-metadata">

**Author:** [@sean-lerner](https://www.ruby-forum.com/u/sean-lerner)\
**Replies:** 8\
**Last updated:** [August 4, 2010, 7:34am UTC](https://www.ruby-forum.com/t/jrubyclassloader-not-getting-released/191906 "2010-08-04T07:34:39Z")

</div>

We’re running a small JRuby on Rails app under Tomcat 6.0.28 with a Spring-based backend. I’ve spent some time with the Eclipse Memory Analysis tool and I can definitely tell that instances of theJRubyClassLoader are …

---

## ["require" non-packed Java package](https://www.ruby-forum.com/t/require-non-packed-java-package/192391)

<div class="topic-metadata">

**Author:** [@arkadi](https://www.ruby-forum.com/u/arkadi)\
**Replies:** 7\
**Last updated:** [August 4, 2010, 7:24am UTC](https://www.ruby-forum.com/t/require-non-packed-java-package/192391 "2010-08-04T07:24:41Z")

</div>

Hello everybody, What is a way to “require” Java package that is not packed into JAR? From my point of view I could expect something like follow to work: include Java require ‘/mypath/project1/bin’ java\_import ‘co…

---

## [Monkey Patching, passing in extra data, FXRuby bug](https://www.ruby-forum.com/t/monkey-patching-passing-in-extra-data-fxruby-bug/192694)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 0\
**Last updated:** [August 4, 2010, 7:17am UTC](https://www.ruby-forum.com/t/monkey-patching-passing-in-extra-data-fxruby-bug/192694 "2010-08-04T07:17:40Z")

</div>

Because of an apparent bug in FXRuby/Fox/Something that causes a segmentation fault … I am looking for a workaround to a problem. FXRuby defines a class FXTreeItem. That class has an instance method for the spaceship…

---

## [Leak tracking x64](https://www.ruby-forum.com/t/leak-tracking-x64/192440)

<div class="topic-metadata">

**Author:** [@Spurtus](https://www.ruby-forum.com/u/Spurtus)\
**Replies:** 2\
**Last updated:** [August 4, 2010, 6:55am UTC](https://www.ruby-forum.com/t/leak-tracking-x64/192440 "2010-08-04T06:55:25Z")

</div>

Have easily reproducable memory leaks, need to find them. I’m running Ruby 1.8.6 on an windows7 x64 machine. I checked out memprof, bleak\_house et al. I can’t find anything compatible with my architecture / ruby versi…

---

## [64 bit ruby installation on 64 bit windows](https://www.ruby-forum.com/t/64-bit-ruby-installation-on-64-bit-windows/192363)

<div class="topic-metadata">

**Author:** [@ichigo\_poi](https://www.ruby-forum.com/u/ichigo_poi)\
**Replies:** 4\
**Last updated:** [August 4, 2010, 6:53am UTC](https://www.ruby-forum.com/t/64-bit-ruby-installation-on-64-bit-windows/192363 "2010-08-04T06:53:39Z")

</div>

hi, could anyone help me answer the following questions. i’ve tried installing a 64-bit ruby on a 64-bit windows. i’ve successfully installed it and able to try some codes using irb. but when i tried to update the gem…

---

## [Compiling Ruby through JRuby?](https://www.ruby-forum.com/t/compiling-ruby-through-jruby/192453)

<div class="topic-metadata">

**Author:** [@MrZombie](https://www.ruby-forum.com/u/MrZombie)\
**Replies:** 3\
**Last updated:** [August 4, 2010, 6:53am UTC](https://www.ruby-forum.com/t/compiling-ruby-through-jruby/192453 "2010-08-04T06:53:04Z")

</div>

Hi! I’m currently building a program which will be mostly standalone, and use little libraries, if at all. If I want to use the project as a library within a Java program, would it be possible to compile it through JR…

---

## [ENV\['someapp'\]" is nil when the code is run with "sudo"](https://www.ruby-forum.com/t/env-someapp-is-nil-when-the-code-is-run-with-sudo/192611)

<div class="topic-metadata">

**Author:** [@kadishmal](https://www.ruby-forum.com/u/kadishmal)\
**Replies:** 6\
**Last updated:** [August 4, 2010, 4:52am UTC](https://www.ruby-forum.com/t/env-someapp-is-nil-when-the-code-is-run-with-sudo/192611 "2010-08-04T04:52:06Z")

</div>

Hi, Some very weird behavior is happening with Ruby when I run the code with “sudo” command. Let’s say I have the following code in “myex.rb” source file: if ENV\[“CUBRID”\] puts “ENV\[CUBRID\] is: ‘#{ENV\[“CUBRID”\]}’” e…

---

## [Code Review: Fix Silverlight builds](https://www.ruby-forum.com/t/code-review-fix-silverlight-builds/192562)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 1\
**Last updated:** [August 4, 2010, 4:09am UTC](https://www.ruby-forum.com/t/code-review-fix-silverlight-builds/192562 "2010-08-04T04:09:47Z")

</div>

http://github.com/jschementi/ironruby/commit/e806c00a47e8620385defa348dd702fa35b91430 Add required Silverlight 3 and 4 runtime and SDK binaries so Silverlight builds can occur without having those Silverlight versions …

---

## [Standard IO streams in Ruby](https://www.ruby-forum.com/t/standard-io-streams-in-ruby/192541)

<div class="topic-metadata">

**Author:** [@silver-spoon](https://www.ruby-forum.com/u/silver-spoon)\
**Replies:** 3\
**Last updated:** [August 4, 2010, 3:55am UTC](https://www.ruby-forum.com/t/standard-io-streams-in-ruby/192541 "2010-08-04T03:55:44Z")

</div>

In my rails controller, I am doing the following : @output = g++ j.cpp -o "prog" && ./prog This gives the output in the @output variable which i can display in my view. But the above works only if the j.cpp is correct…

---

## [\[\].all?{} and \[\].any?{} Behavior](https://www.ruby-forum.com/t/all-and-any-behavior/192421)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 27\
**Last updated:** [August 3, 2010, 11:52pm UTC](https://www.ruby-forum.com/t/all-and-any-behavior/192421 "2010-08-03T23:52:50Z")

</div>

I find the following behavior interesting (so interesting that I modified it), and I would like to hear others’ thoughts on the subject: \[3\].all? {|element| element == 3 } # =\> true \[3\].all? {|element| element != 3 }…

---

## [YARD documentation for splat (lists) as parameters](https://www.ruby-forum.com/t/yard-documentation-for-splat-lists-as-parameters/192675)

<div class="topic-metadata">

**Author:** [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 9:40pm UTC](https://www.ruby-forum.com/t/yard-documentation-for-splat-lists-as-parameters/192675 "2010-08-03T21:40:30Z")

</div>

\[I am using YARD to document my code. I’m new to YARD, but I’ve read through the documentation and didn’t see this: \] How do I properly document splat lists? The method I’m thinking about takes an arbitrary list of ru…

---

## [Inject problem](https://www.ruby-forum.com/t/inject-problem/192663)

<div class="topic-metadata">

**Author:** [@amiref](https://www.ruby-forum.com/u/amiref)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 8:24pm UTC](https://www.ruby-forum.com/t/inject-problem/192663 "2010-08-03T20:24:56Z")

</div>

Hi In inject method , everytime that inject called what is returned ? for example in this code everytime what is returned ? array = \[\*1…10\] array.inject(0) { | memo , item | memo + item }

---

## [Installing mysql gem on Win7 x64 for MySQL 5.1.x](https://www.ruby-forum.com/t/installing-mysql-gem-on-win7-x64-for-mysql-5-1-x/192601)

<div class="topic-metadata">

**Author:** [@growell](https://www.ruby-forum.com/u/growell)\
**Replies:** 5\
**Last updated:** [August 3, 2010, 8:07pm UTC](https://www.ruby-forum.com/t/installing-mysql-gem-on-win7-x64-for-mysql-5-1-x/192601 "2010-08-03T20:07:40Z")

</div>

As of the time this was written, I’m running: Windows 7 x64 mysql Ver 14.14 Distrib 5.1.48, for Win64 (unknown) ruby 1.8.7 (2010-06-23 patchlevel 299) \[i386-mingw32\] gem 1.3.7 This setup presents a particular problem,…

---

## [Unit testing with NullDB, Shoulda and Factory\_Girl](https://www.ruby-forum.com/t/unit-testing-with-nulldb-shoulda-and-factory-girl/192616)

<div class="topic-metadata">

**Author:** [@soderic](https://www.ruby-forum.com/u/soderic)\
**Replies:** 2\
**Last updated:** [August 3, 2010, 7:57pm UTC](https://www.ruby-forum.com/t/unit-testing-with-nulldb-shoulda-and-factory-girl/192616 "2010-08-03T19:57:07Z")

</div>

Does anyone have any advice on how to setup NullDB in a JRuby on Rails environment? Or is there a better way to avoid hitting the DB during unit testing? I’m using JRuby 1.5.1, Rails 2.3.8, Test::Unit, Shoulda, and wi…

---

## [Ruby committers Q&A at RubyKaigi](https://www.ruby-forum.com/t/ruby-committers-q-a-at-rubykaigi/192658)

<div class="topic-metadata">

**Author:** [@Shugo\_M](https://www.ruby-forum.com/u/Shugo_M)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 7:21pm UTC](https://www.ruby-forum.com/t/ruby-committers-q-a-at-rubykaigi/192658 "2010-08-03T19:21:37Z")

</div>

Hi, I’m the moderator of Ruby committers Q&A (RubyKaigi 2010, August 27-29) at RubyKaigi. We committers will accept questions from audience at this session. However, Japanese Rubyists are so shy that there may be onl…

---

## [Ruport, reading a csv whose column name have white spaces](https://www.ruby-forum.com/t/ruport-reading-a-csv-whose-column-name-have-white-spaces/192387)

<div class="topic-metadata">

**Author:** [@fourchette](https://www.ruby-forum.com/u/fourchette)\
**Replies:** 4\
**Last updated:** [August 3, 2010, 7:19pm UTC](https://www.ruby-forum.com/t/ruport-reading-a-csv-whose-column-name-have-white-spaces/192387 "2010-08-03T19:19:16Z")

</div>

hi there, i am not a expert with ruby at all. this is my first post, i do hope it’s at right place, please advise otherwise. i have some dump reporting to do. The input is a csv file. i figured rupert could be my fri…

---

## [Rubygem dependencies autoremoval](https://www.ruby-forum.com/t/rubygem-dependencies-autoremoval/192644)

<div class="topic-metadata">

**Author:** [@botp](https://www.ruby-forum.com/u/botp)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 6:52pm UTC](https://www.ruby-forum.com/t/rubygem-dependencies-autoremoval/192644 "2010-08-03T18:52:20Z")

</div>

Hi all, this is rubygems specific question. apology in advance. if i install a gem, eg, say ruport $ gem install ruport Successfully installed fastercsv-1.5.3 Successfully installed color-1.4.1 Successfully install…

---

## [Complex associations](https://www.ruby-forum.com/t/complex-associations/192641)

<div class="topic-metadata">

**Author:** [@Trish](https://www.ruby-forum.com/u/Trish)\
**Replies:** 2\
**Last updated:** [August 3, 2010, 6:23pm UTC](https://www.ruby-forum.com/t/complex-associations/192641 "2010-08-03T18:23:04Z")

</div>

I am working on a project that has some complex table associations, and I am having a hard time declaring this association in a Model, and fear it can’t be done. Here is an example of my issue… class StoreType \< Acti…

---

## [How to save session using open-uri](https://www.ruby-forum.com/t/how-to-save-session-using-open-uri/192603)

<div class="topic-metadata">

**Author:** [@arpittandon](https://www.ruby-forum.com/u/arpittandon)\
**Replies:** 2\
**Last updated:** [August 3, 2010, 6:15pm UTC](https://www.ruby-forum.com/t/how-to-save-session-using-open-uri/192603 "2010-08-03T18:15:59Z")

</div>

I am trying to pull out some information from a site. There are 2 steps involved in order to get data from site. The first step is a translation of the some user id to THEIR id. After the translation is complete,use T…

---

## [String encoding issues](https://www.ruby-forum.com/t/string-encoding-issues/192646)

<div class="topic-metadata">

**Author:** [@oliver-peng](https://www.ruby-forum.com/u/oliver-peng)\
**Replies:** 2\
**Last updated:** [August 3, 2010, 6:02pm UTC](https://www.ruby-forum.com/t/string-encoding-issues/192646 "2010-08-03T18:02:25Z")

</div>

I found several issues in string encoding. Here is the problem: \[root@mars mysql\]# irb -E ascii I start irb with default external encoding ascii irb(main):014:0\> String.new.encoding =\> #Encoding:ASCII-8BIT irb(main):…

---

## [Easy and fast job (SCRIPT) , 50 â‚¬](https://www.ruby-forum.com/t/easy-and-fast-job-script-50-a/192645)

<div class="topic-metadata">

**Author:** [@trav281](https://www.ruby-forum.com/u/trav281)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 4:36pm UTC](https://www.ruby-forum.com/t/easy-and-fast-job-script-50-a/192645 "2010-08-03T16:36:57Z")

</div>

Hello, I need a script to automate some http POST requests to a server and i need the requests routed through a privoxy setup. 50â‚¬ with paypal or other. Contact me: removed\_email\_address@domain.invalid

---

## [\[ANN\] Money 3.1.0.pre1](https://www.ruby-forum.com/t/ann-money-3-1-0-pre1/192642)

<div class="topic-metadata">

**Author:** [@semmons99](https://www.ruby-forum.com/u/semmons99)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 3:50pm UTC](https://www.ruby-forum.com/t/ann-money-3-1-0-pre1/192642 "2010-08-03T15:50:46Z")

</div>

Money 3.1.0.pre1 Implemented Money::bank::Base (closes #14) Added Bank::Base#exchange\_with Deprecated Bank::Base#exchange (removal in 3.2.0) Implented Money::bank::VariableExchange Deprecated Money::VariableExchangeBan…

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

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