# Ruby

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

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

---

## [Process or Thread?](https://www.ruby-forum.com/t/process-or-thread/174209)

<div class="topic-metadata">

**Author:** [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Replies:** 8\
**Last updated:** [September 3, 2009, 7:29am UTC](https://www.ruby-forum.com/t/process-or-thread/174209 "2009-09-03T07:29:43Z")

</div>

I have a parent application (which I think of as a test harness) that wants to invoke a fairly intensive image processing application against a directory full of image files. Each image is processed independently. So,…

---

## [Confirm my Performance Test Against Java?](https://www.ruby-forum.com/t/confirm-my-performance-test-against-java/174018)

<div class="topic-metadata">

**Author:** [@bch36](https://www.ruby-forum.com/u/bch36)\
**Replies:** 39\
**Last updated:** [September 3, 2009, 7:22am UTC](https://www.ruby-forum.com/t/confirm-my-performance-test-against-java/174018 "2009-09-03T07:22:42Z")

</div>

I’m evaluating Ruby for use in a variety of systems that are planned by default to be Java. I’ve started down a path of doing various performance tests to see what kind of impact will occur by using Ruby and in my fir…

---

## [Kind of ParsTree for 1.9.1](https://www.ruby-forum.com/t/kind-of-parstree-for-1-9-1/173162)

<div class="topic-metadata">

**Author:** [@macario](https://www.ruby-forum.com/u/macario)\
**Replies:** 21\
**Last updated:** [September 3, 2009, 7:21am UTC](https://www.ruby-forum.com/t/kind-of-parstree-for-1-9-1/173162 "2009-09-03T07:21:30Z")

</div>

Hi, I’ve been missing ParseTree very badly in 1.9.1. So in my naivitÃ© I decided to try to convert YARV iseq’s to Sexp’s similar of those produced by ParseTree. So far I can convert simple expressions, method calls, n…

---

## [Updating gems for ruby 1.9](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605)

<div class="topic-metadata">

**Author:** [@Space\_Ship\_T](https://www.ruby-forum.com/u/Space_Ship_T)\
**Replies:** 7\
**Last updated:** [September 3, 2009, 6:56am UTC](https://www.ruby-forum.com/t/updating-gems-for-ruby-1-9/174605 "2009-09-03T06:56:54Z")

</div>

Hi, This might have been discussed somewhere else already, if this is the case, I apologize. I publish a significant number of gems. These were all designed for Ruby 1.8. Apart from syntax and functional changes, how…

---

## [Reg Ex exclusion](https://www.ruby-forum.com/t/reg-ex-exclusion/174816)

<div class="topic-metadata">

**Author:** [@nescripter](https://www.ruby-forum.com/u/nescripter)\
**Replies:** 5\
**Last updated:** [September 3, 2009, 6:17am UTC](https://www.ruby-forum.com/t/reg-ex-exclusion/174816 "2009-09-03T06:17:32Z")

</div>

Hi all, I thought this would be easy, but I am clearly mixing up my logic. I have a string like so string = “joe|blogg|clothing|” I want to remove the last pipe with a reg ex and I am trying to use the following cod…

---

## [Clogger 0.0.5 - configurable request logging for Rack](https://www.ruby-forum.com/t/clogger-0-0-5-configurable-request-logging-for-rack/174853)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 0\
**Last updated:** [September 3, 2009, 4:01am UTC](https://www.ruby-forum.com/t/clogger-0-0-5-configurable-request-logging-for-rack/174853 "2009-09-03T04:01:54Z")

</div>

http://clogger.rubyforge.org/ removed\_email\_address@domain.invalid git://git.bogomips.org/clogger.git Clogger is Rack middleware for logging HTTP requests. The log format is customizable so you can specify exactly wh…

---

## [Ruby-debug19 0.11.6 released](https://www.ruby-forum.com/t/ruby-debug19-0-11-6-released/174848)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 0\
**Last updated:** [September 3, 2009, 2:20am UTC](https://www.ruby-forum.com/t/ruby-debug19-0-11-6-released/174848 "2009-09-03T02:20:22Z")

</div>

Fixes: breakpoints will work in threads created after the breakpoint is set line numbers corrected for code in {} blocks Enhancements: “jump” command added; allows you to change the next statement to be executed, e…

---

## [Gem server - cannot redirect to gem repository](https://www.ruby-forum.com/t/gem-server-cannot-redirect-to-gem-repository/174846)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 0\
**Last updated:** [September 3, 2009, 1:44am UTC](https://www.ruby-forum.com/t/gem-server-cannot-redirect-to-gem-repository/174846 "2009-09-03T01:44:54Z")

</div>

Due to some quirk of my install-from-source (done earlier today), my gems are in /home/tomc/.gem/ruby/1.8/doc, on my Kubuntu Linix OS. I need to redirect the gem server to this location, but nothing I’ve tried has wor…

---

## [How to Know What Exception a Method Will Raise?](https://www.ruby-forum.com/t/how-to-know-what-exception-a-method-will-raise/174843)

<div class="topic-metadata">

**Author:** [@MaggotChild](https://www.ruby-forum.com/u/MaggotChild)\
**Replies:** 1\
**Last updated:** [September 3, 2009, 1:17am UTC](https://www.ruby-forum.com/t/how-to-know-what-exception-a-method-will-raise/174843 "2009-09-03T01:17:58Z")

</div>

How is one supposed to know what exception (if any) a method will raise? The docs for all of the core Ruby classes I’ve seen fail to mention this.

---

## [Repost: Using Ruby fork from C](https://www.ruby-forum.com/t/repost-using-ruby-fork-from-c/174842)

<div class="topic-metadata">

**Author:** [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Replies:** 0\
**Last updated:** [September 2, 2009, 11:44pm UTC](https://www.ruby-forum.com/t/repost-using-ruby-fork-from-c/174842 "2009-09-02T23:44:18Z")

</div>

This is a repost of an earlier message posted on ruby-talk-google As a learning exercise I’m goofing around with ruby’s fork within a C program. I’ve posted my current testing code here: http://pastie.org/591998 It s…

---

## [Hash and Array sorting - a bit confused](https://www.ruby-forum.com/t/hash-and-array-sorting-a-bit-confused/174836)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 2\
**Last updated:** [September 2, 2009, 11:27pm UTC](https://www.ruby-forum.com/t/hash-and-array-sorting-a-bit-confused/174836 "2009-09-02T23:27:26Z")

</div>

So, I have the following model method: def self.cupcake\_report\_list list = Schedule.find\_all\_by\_division(2, :select =\> ‘schedules.team\_id, schedules.cupcake’, :order =\> :team\_id) cupcakes = \[\] list.each do |row| te…

---

## [Gem install failure - probably easy to fix](https://www.ruby-forum.com/t/gem-install-failure-probably-easy-to-fix/174797)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 6\
**Last updated:** [September 2, 2009, 11:24pm UTC](https://www.ruby-forum.com/t/gem-install-failure-probably-easy-to-fix/174797 "2009-09-02T23:24:24Z")

</div>

I can get “gem install …” to execute, but not “sudo gem install…”. I’ve always had to use the latter, and to my best knowledge still do, but at present only the former works. I’ve never seen this problem, and am baffl…

---

## [Xmlrpc - get caller's IP address in handler?](https://www.ruby-forum.com/t/xmlrpc-get-callers-ip-address-in-handler/174841)

<div class="topic-metadata">

**Author:** [@matthew](https://www.ruby-forum.com/u/matthew)\
**Replies:** 0\
**Last updated:** [September 2, 2009, 11:20pm UTC](https://www.ruby-forum.com/t/xmlrpc-get-callers-ip-address-in-handler/174841 "2009-09-02T23:20:52Z")

</div>

Hi, I have an xmlrpc standalone server created using XMLRPC::Server#add\_handler( interface, obj ) It all works nicely, but I really want to log the address of the calling machine as they hit the handler method (I’m u…

---

## [Confusing string parsing problem](https://www.ruby-forum.com/t/confusing-string-parsing-problem/174808)

<div class="topic-metadata">

**Author:** [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Replies:** 9\
**Last updated:** [September 2, 2009, 11:05pm UTC](https://www.ruby-forum.com/t/confusing-string-parsing-problem/174808 "2009-09-02T23:05:38Z")

</div>

I don’t understand how to do the following, any help is very appreciated. I have been programming in ruby 1.8.7 for about a month. I have a string that has in it: 2 byte UINT16 2 byte UINT16 1 byte UINT8 representi…

---

## [Clogger 0.0.4 - configurable request logging for Rack](https://www.ruby-forum.com/t/clogger-0-0-4-configurable-request-logging-for-rack/174794)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 9\
**Last updated:** [September 2, 2009, 10:59pm UTC](https://www.ruby-forum.com/t/clogger-0-0-4-configurable-request-logging-for-rack/174794 "2009-09-02T22:59:13Z")

</div>

http://clogger.rubyforge.org/ removed\_email\_address@domain.invalid git://git.bogomips.org/clogger.git Clogger is Rack middleware for logging HTTP requests. The log format is customizable so you can specify exactly wh…

---

## [RMagick 2.11.0 install fails with ImageMagick 6.5.4](https://www.ruby-forum.com/t/rmagick-2-11-0-install-fails-with-imagemagick-6-5-4/174838)

<div class="topic-metadata">

**Author:** [@pharrington](https://www.ruby-forum.com/u/pharrington)\
**Replies:** 1\
**Last updated:** [September 2, 2009, 10:56pm UTC](https://www.ruby-forum.com/t/rmagick-2-11-0-install-fails-with-imagemagick-6-5-4/174838 "2009-09-02T22:56:52Z")

</div>

Trying to install RMagick 2.11.0 was giving me the following error: Updating rmagick Building native extensions. This could take a while… ERROR: While executing gem … (Gem::Installer::ExtensionBuildError) ERROR: Fa…

---

## [Start\_with? Does someone need a grammar lesson?](https://www.ruby-forum.com/t/start-with-does-someone-need-a-grammar-lesson/173859)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 14\
**Last updated:** [September 2, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/start-with-does-someone-need-a-grammar-lesson/173859 "2009-09-02T22:42:49Z")

</div>

String#start\_with?------------------------------- str.start\_with?(\[prefix\]+) =\> true or false From Ruby 1.9.1 Returns true if \_str\_ starts with the prefix given. Whoever wrote the docs doesn’t: Returns true if…

---

## [DRb: is there any way to actually secure it?](https://www.ruby-forum.com/t/drb-is-there-any-way-to-actually-secure-it/174824)

<div class="topic-metadata">

**Author:** [@matthew](https://www.ruby-forum.com/u/matthew)\
**Replies:** 5\
**Last updated:** [September 2, 2009, 9:51pm UTC](https://www.ruby-forum.com/t/drb-is-there-any-way-to-actually-secure-it/174824 "2009-09-02T21:51:38Z")

</div>

Hi, I’m trying to build a client-server application and it seems that DRb is a really nice way of doing this. The problem is that there doesn’t seem to be any good way of actually locking down DRb if the service is p…

---

## [\[Feature #2017\] String#/(sep)](https://www.ruby-forum.com/t/feature-2017-string-sep/174639)

<div class="topic-metadata">

**Author:** [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Replies:** 5\
**Last updated:** [September 2, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/feature-2017-string-sep/174639 "2009-09-02T21:37:49Z")

</div>

Feature #2017: String#/(sep) http://redmine.ruby-lang.org/issues/show/2017 e$B5/I\<\<Te(B: Yui NARUSE e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: core String#/(separator) e$B$re(B String#join(separato…

---

## [\[Mechanize\] Invisible button?](https://www.ruby-forum.com/t/mechanize-invisible-button/172708)

<div class="topic-metadata">

**Author:** [@kaizen](https://www.ruby-forum.com/u/kaizen)\
**Replies:** 3\
**Last updated:** [September 2, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/mechanize-invisible-button/172708 "2009-09-02T19:10:56Z")

</div>

I’m trying to scrap http://www.ryanair.com/site/ES/. I’m looking for the button “Buscar vuelos”. Making a pretty printing of the principal url and the iframe containing the button: require ‘mechanize’ agent = WWW::Me…

---

## [Regex issue confusing](https://www.ruby-forum.com/t/regex-issue-confusing/174798)

<div class="topic-metadata">

**Author:** [@ahmet](https://www.ruby-forum.com/u/ahmet)\
**Replies:** 6\
**Last updated:** [September 2, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/regex-issue-confusing/174798 "2009-09-02T18:31:38Z")

</div>

This is OK line\[/\\sclass\\s(\\w+)/, 1\] but line\[/\\s#include\\s(\\w+)/, 1\] this is not. why??? please help.

---

## [Read and parse xml](https://www.ruby-forum.com/t/read-and-parse-xml/174807)

<div class="topic-metadata">

**Author:** [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Replies:** 2\
**Last updated:** [September 2, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/read-and-parse-xml/174807 "2009-09-02T18:21:06Z")

</div>

Hi all, I need to hit a URL that returns me a xml file,which I should read and parse. How could I do it,access the URL,retrieve the content of the response and process it? Regards, Rafael R.

---

## [Problems with XMPP4R with Google Apps for your Domain account](https://www.ruby-forum.com/t/problems-with-xmpp4r-with-google-apps-for-your-domain-account/174817)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 0\
**Last updated:** [September 2, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/problems-with-xmpp4r-with-google-apps-for-your-domain-account/174817 "2009-09-02T18:05:52Z")

</div>

I am having problems connecting (using the xmpp4r ruby api) to an account on a ‘Google Apps for your Domain’ service. I am able to connect to a standard gmail.com account (using Jabber::Simple) fine, but when I try co…

---

## [Problem in ruby1.9 gems](https://www.ruby-forum.com/t/problem-in-ruby1-9-gems/174799)

<div class="topic-metadata">

**Author:** [@abhishek](https://www.ruby-forum.com/u/abhishek)\
**Replies:** 3\
**Last updated:** [September 2, 2009, 3:12pm UTC](https://www.ruby-forum.com/t/problem-in-ruby1-9-gems/174799 "2009-09-02T15:12:34Z")

</div>

hi i have installed ruby 1.9.1 side by side with previously installed ruby 1.8.7 i have created symlink to ruby1.9 also. now when i say ‘gem1.8 list’, it shows the list of gems installed for ruby 1.8 i’ve not instal…

---

## [Best Practice for Multiline Regexps](https://www.ruby-forum.com/t/best-practice-for-multiline-regexps/174722)

<div class="topic-metadata">

**Author:** [@viatropos](https://www.ruby-forum.com/u/viatropos)\
**Replies:** 9\
**Last updated:** [September 2, 2009, 1:56pm UTC](https://www.ruby-forum.com/t/best-practice-for-multiline-regexps/174722 "2009-09-02T13:56:27Z")

</div>

Hey, What is the recommended way to parse a tree of files and replace multiline pattern-matches, if you have say 20 regular expressions you’re looking for. I understand how to traverse directories, read/write files,…

---

## [What is the ruby conventions to name private method?](https://www.ruby-forum.com/t/what-is-the-ruby-conventions-to-name-private-method/174662)

<div class="topic-metadata">

**Author:** [@pierr](https://www.ruby-forum.com/u/pierr)\
**Replies:** 15\
**Last updated:** [September 2, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/what-is-the-ruby-conventions-to-name-private-method/174662 "2009-09-02T13:35:22Z")

</div>

Hi, What would you name the private method \_insert in below situation? Class Binary\_search\_tree def insert node \_insert @root, node end private def \_insert tree, node #.... end end

---

## [How to convert string to binary and back in Ruby 1.9?](https://www.ruby-forum.com/t/how-to-convert-string-to-binary-and-back-in-ruby-1-9/174774)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 9\
**Last updated:** [September 2, 2009, 12:08pm UTC](https://www.ruby-forum.com/t/how-to-convert-string-to-binary-and-back-in-ruby-1-9/174774 "2009-09-02T12:08:47Z")

</div>

I’m using Ruby 1.9.1-p243 on Mac OS X 10.5.8. I have this UTF-8 string that I want to turn into binary, and then from binary into ISO-8859-1. The result should be some garbage string, which I need for debugging purpo…

---

## [Nice algorithm for 'spreading' indexes across an array?](https://www.ruby-forum.com/t/nice-algorithm-for-spreading-indexes-across-an-array/174755)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 12\
**Last updated:** [September 2, 2009, 11:21am UTC](https://www.ruby-forum.com/t/nice-algorithm-for-spreading-indexes-across-an-array/174755 "2009-09-02T11:21:55Z")

</div>

Little ruby algorithm puzzle… I have a situation where i have an array of 12 items. If someone chooses to have n of them (where n can be between 3 and 12) then i want to always include the first and last, and then ‘s…

---

## [URI.escape\_component](https://www.ruby-forum.com/t/uri-escape-component/174550)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 4\
**Last updated:** [September 2, 2009, 10:38am UTC](https://www.ruby-forum.com/t/uri-escape-component/174550 "2009-09-02T10:38:36Z")

</div>

ã€€JavaScript ã® escapeURIComponent() ç›¸å½“ã®é–¢æ•°ã£ã¦ã‚ã‚Šã¾ã—ãŸã£ã‘ï¼Ÿ ã‚‚ã—ãªã‘ã‚Œã°URIãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã«è¿½åŠ ã™ã‚‹ã®ã¯ã©ã†ã§ã™ã‹ã€‚ ã€€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ä¿®æ­£ã‚‚æ··ã–ã£ã¦ã„ã¾ã™ãŒ…

---

## [Content\_tag doubts](https://www.ruby-forum.com/t/content-tag-doubts/174789)

<div class="topic-metadata">

**Author:** [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Replies:** 0\
**Last updated:** [September 2, 2009, 9:50am UTC](https://www.ruby-forum.com/t/content-tag-doubts/174789 "2009-09-02T09:50:59Z")

</div>

I have of the doubts of use content\_tag, if i write this: \<% for object in @object %\> \<%= object.title %\> \<% end %\> using content\_tag: \<% for object in @object content\_tag :li do concat object.title end …

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

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