# Ruby

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

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

---

## [How can I switch over an array?](https://www.ruby-forum.com/t/how-can-i-switch-over-an-array/158790)

<div class="topic-metadata">

**Author:** [@tsunami](https://www.ruby-forum.com/u/tsunami)\
**Replies:** 7\
**Last updated:** [January 28, 2009, 7:40pm UTC](https://www.ruby-forum.com/t/how-can-i-switch-over-an-array/158790 "2009-01-28T19:40:50Z")

</div>

I have the following code snippet : def call(char,value) case char when " “,”#","!","@","$","%","^","&","\*","(",")","{","}"," \[","\]","’",""","\<","\>",",",".","?",";","\\n","\\r" @map\[char\].call(value) when “digit” @m…

---

## [Function inside a function](https://www.ruby-forum.com/t/function-inside-a-function/158840)

<div class="topic-metadata">

**Author:** [@leveille](https://www.ruby-forum.com/u/leveille)\
**Replies:** 4\
**Last updated:** [January 28, 2009, 6:45pm UTC](https://www.ruby-forum.com/t/function-inside-a-function/158840 "2009-01-28T18:45:44Z")

</div>

I have a question about the timing of function evaluations in this case: def function\_a(x = 1) x\*\*2 + x end def function\_b(any\_function) y = 4 + 5 #this would actually be more complex function\_a(y) end puts funct…

---

## [Ruby interpreter not working](https://www.ruby-forum.com/t/ruby-interpreter-not-working/158777)

<div class="topic-metadata">

**Author:** [@willdeluca](https://www.ruby-forum.com/u/willdeluca)\
**Replies:** 13\
**Last updated:** [January 28, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/ruby-interpreter-not-working/158777 "2009-01-28T18:00:56Z")

</div>

Hello, I think this problem will be best explained by simply showing you the code first… \[code\]class ConfigSettings def initiliaze puts ‘initializing ConfigSettings’ end end class Dog def initialize puts ‘initi…

---

## [How to get an absolute address of a link](https://www.ruby-forum.com/t/how-to-get-an-absolute-address-of-a-link/158818)

<div class="topic-metadata">

**Author:** [@tsunami](https://www.ruby-forum.com/u/tsunami)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/how-to-get-an-absolute-address-of-a-link/158818 "2009-01-28T17:35:48Z")

</div>

Is there some URL lib that I can use to get the absolute address of a relative URL ? Maybe I could pass a “base” link to the method . Ideally , I would like to know if this could by achieved from mechanize , but anyth…

---

## [Regexp multiple matches](https://www.ruby-forum.com/t/regexp-multiple-matches/158817)

<div class="topic-metadata">

**Author:** [@micktaiwan](https://www.ruby-forum.com/u/micktaiwan)\
**Replies:** 6\
**Last updated:** [January 28, 2009, 5:26pm UTC](https://www.ruby-forum.com/t/regexp-multiple-matches/158817 "2009-01-28T17:26:36Z")

</div>

Hi, /(\\d+),(\\d+)(;(\\d+),(\\d+))\*/ This regexp matches are: 0: (5,1;5,7;3,2) 1: (5) 2: (1) 3: (;3,2) 4: (3) 5: (2) My question is why ;5,7 is not matched ? Thanks, Mickael.

---

## [Rails edge now includes activerecord test adaptors for jdbc databases](https://www.ruby-forum.com/t/rails-edge-now-includes-activerecord-test-adaptors-for-jdbc-databases/158631)

<div class="topic-metadata">

**Author:** [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Replies:** 13\
**Last updated:** [January 28, 2009, 4:53pm UTC](https://www.ruby-forum.com/t/rails-edge-now-includes-activerecord-test-adaptors-for-jdbc-databases/158631 "2009-01-28T16:53:56Z")

</div>

---

## [Backup.rb](https://www.ruby-forum.com/t/backup-rb/158838)

<div class="topic-metadata">

**Author:** [@Rolando\_A](https://www.ruby-forum.com/u/Rolando_A)\
**Replies:** 0\
**Last updated:** [January 28, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/backup-rb/158838 "2009-01-28T16:46:53Z")

</div>

short and concise: ruby script for incremental backup, AKA “Poor Man’s Time Machine”: :wink: Enjoy!

---

## [Pushing up to Module or Class?](https://www.ruby-forum.com/t/pushing-up-to-module-or-class/158834)

<div class="topic-metadata">

**Author:** [@Shak](https://www.ruby-forum.com/u/Shak)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/pushing-up-to-module-or-class/158834 "2009-01-28T16:45:08Z")

</div>

Hi all, Yes, this question has been asked many times all over the Internet so I’m a bit embarrassed to admit that I still don’t know what the difference is. Apologies in advance for making you roll your eyes. If I h…

---

## [Need help for Ruby DBI and PostgreSQl](https://www.ruby-forum.com/t/need-help-for-ruby-dbi-and-postgresql/158647)

<div class="topic-metadata">

**Author:** [@manisha](https://www.ruby-forum.com/u/manisha)\
**Replies:** 13\
**Last updated:** [January 28, 2009, 4:33pm UTC](https://www.ruby-forum.com/t/need-help-for-ruby-dbi-and-postgresql/158647 "2009-01-28T16:33:15Z")

</div>

Hi, I am trying to access aPostgreSQL database from a Ruby program. I have the Linux(Ubuntu) OS, database server running and Ruby installed well. I have the gems postgres-pr. I downloaded rubu-dbi package manually an…

---

## [IronRuby with Asp.Net MVC is possible or not...?](https://www.ruby-forum.com/t/ironruby-with-asp-net-mvc-is-possible-or-not/158802)

<div class="topic-metadata">

**Author:** [@webreservoir](https://www.ruby-forum.com/u/webreservoir)\
**Replies:** 4\
**Last updated:** [January 28, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/ironruby-with-asp-net-mvc-is-possible-or-not/158802 "2009-01-28T15:15:09Z")

</div>

Hello… Hi Phil, Great News shared. I am dying to work with IronRuby and Asp.Net MVC since ages, but no good news are seen nearby. Can you kindly make it clear for once and all that should i leave all the hopes to …

---

## [Load a local gem while an older lib version still exists](https://www.ruby-forum.com/t/load-a-local-gem-while-an-older-lib-version-still-exists/158819)

<div class="topic-metadata">

**Author:** [@edouard](https://www.ruby-forum.com/u/edouard)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 3:06pm UTC](https://www.ruby-forum.com/t/load-a-local-gem-while-an-older-lib-version-still-exists/158819 "2009-01-28T15:06:20Z")

</div>

Hi I have installed the mechanize 0.9.0.gem on ubuntu. The older mechanize-hpricot installed from the ubuntu repository is still the default. How can i load/make the new version the default? Note that i want to keep…

---

## [Ruby 1.8.7 has been released](https://www.ruby-forum.com/t/ruby-1-8-7-has-been-released/139154)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 15\
**Last updated:** [January 28, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-has-been-released/139154 "2009-01-28T14:33:04Z")

</div>

Folks, It is my pleasure to announce that Ruby 1.8.7 has just been released. The new version of Ruby includes many bug fixes, lots of feature enhancements backported from 1.9 and some performance improvements since 1…

---

## [Re: Question about BlankSlate.reveal](https://www.ruby-forum.com/t/re-question-about-blankslate-reveal/158594)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 11:25am UTC](https://www.ruby-forum.com/t/re-question-about-blankslate-reveal/158594 "2009-01-28T11:25:39Z")

</div>

On Sun, Jan 25, 2009 at 5:30 AM, Gregory B. removed\_email\_address@domain.invalid wrote: As it turns out, I was able to stop the method from binding to a single instance without re-binding on every call. I simply chan…

---

## [Discover BSSIDs of Surrounding Access Points](https://www.ruby-forum.com/t/discover-bssids-of-surrounding-access-points/158811)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 0\
**Last updated:** [January 28, 2009, 11:23am UTC](https://www.ruby-forum.com/t/discover-bssids-of-surrounding-access-points/158811 "2009-01-28T11:23:51Z")

</div>

Hello all, I’d like to write a Ruby plugin to query the Skyhook Wireless API for geolocation information. However, I’m not sure how to go about discovering what the BSSID is for access points a device can see. Does …

---

## [How to iterate on date ranges](https://www.ruby-forum.com/t/how-to-iterate-on-date-ranges/158801)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 7:19am UTC](https://www.ruby-forum.com/t/how-to-iterate-on-date-ranges/158801 "2009-01-28T07:19:18Z")

</div>

Hi…here me again If user enters, 2 date parameters.i want to find all the folders between these date ranges. For example if the user enters 2009-01-02 and 2009-01-30.i want to make check between these two dates. I h…

---

## [MatchData#\[\] $B$J$I$,JV$9(B String](https://www.ruby-forum.com/t/matchdata-b-j-i-jv-9-b-string/158734)

<div class="topic-metadata">

**Author:** [@KISHIMOTOS\_Makoto](https://www.ruby-forum.com/u/KISHIMOTOS_Makoto)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 3:59am UTC](https://www.ruby-forum.com/t/matchdata-b-j-i-jv-9-b-string/158734 "2009-01-28T03:59:18Z")

</div>

e$B$-$7$b$H$G$9e(B MatchData e$B$Ne(B \[\] e$B$J$I$,JV$9e(B String e$B$K$D$$$F$J$N$G$9$,!“e(B chop! e$B$J$I$N$h$&$JI{:nMQ$N$”$k%a%=%C%I$r8F$V$H!"%(%i!\<$Ke(B e$B$J$i$:JQ99$G$-$?$+$N$h$&$K8+$($FJQ99$5$l$F$J$$$G$9$,!“e(B …

---

## [Mysql Broken Pipe](https://www.ruby-forum.com/t/mysql-broken-pipe/158689)

<div class="topic-metadata">

**Author:** [@ADADAD](https://www.ruby-forum.com/u/ADADAD)\
**Replies:** 4\
**Last updated:** [January 28, 2009, 3:22am UTC](https://www.ruby-forum.com/t/mysql-broken-pipe/158689 "2009-01-28T03:22:55Z")

</div>

getting the following error with rails 2.2 and JNDI enabled inside tomcat. Jruby 1.1.6, rails 2.2.2 ActiveRecord::StatementInvalid (ActiveRecord::ActiveRecordError: Broken pipe: SELECT \* FROM sessions WHERE (session\_…

---

## [Code Review: compilefix](https://www.ruby-forum.com/t/code-review-compilefix/158506)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 1:18am UTC](https://www.ruby-forum.com/t/code-review-compilefix/158506 "2009-01-28T01:18:16Z")

</div>

tfpt review “/shelveset:compilefix;REDMOND\\jdeville” Comment : This shelveset removes the project transforms from the Ruby rakefiles. This means that there is no longer a need to set MERLIN\_ROOT for external contrib…

---

## [Is it possible to install exe via ruby code?](https://www.ruby-forum.com/t/is-it-possible-to-install-exe-via-ruby-code/158198)

<div class="topic-metadata">

**Author:** [@jazzezravi](https://www.ruby-forum.com/u/jazzezravi)\
**Replies:** 12\
**Last updated:** [January 28, 2009, 12:45am UTC](https://www.ruby-forum.com/t/is-it-possible-to-install-exe-via-ruby-code/158198 "2009-01-28T00:45:45Z")

</div>

I have a exe file in c:/test.exe I have a script to run the exe. Script : require ‘watir’ ie=Watir::IE.new ie.goto(“file:///C:/putty.rar”) But unfortunately i was not able to handle the run time windows such as as…

---

## [Git push](https://www.ruby-forum.com/t/git-push/158789)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 12:26am UTC](https://www.ruby-forum.com/t/git-push/158789 "2009-01-28T00:26:44Z")

</div>

As you may have seen via the RSS feed, I have pushed a new IronRuby revision out. This still requires the MERLIN\_ROOT variable and the CSPROJ has load issues due to SpecSharp.targets, but both of those are being phase…

---

## [Read a ruby script like you would read a text file](https://www.ruby-forum.com/t/read-a-ruby-script-like-you-would-read-a-text-file/158763)

<div class="topic-metadata">

**Author:** [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Replies:** 2\
**Last updated:** [January 27, 2009, 11:55pm UTC](https://www.ruby-forum.com/t/read-a-ruby-script-like-you-would-read-a-text-file/158763 "2009-01-27T23:55:00Z")

</div>

Do you know if this is possible: I want to read each ruby script in a directory (btw there a hundreds of them) and then use that info to lable and make reports later. For now, I just want to know if there is a possibl…

---

## [Weird character downcasing issue](https://www.ruby-forum.com/t/weird-character-downcasing-issue/158451)

<div class="topic-metadata">

**Author:** [@mauricio](https://www.ruby-forum.com/u/mauricio)\
**Replies:** 4\
**Last updated:** [January 27, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/weird-character-downcasing-issue/158451 "2009-01-27T23:38:10Z")

</div>

Hi guys. Anyone knows why if I try this: “Ö”.downcase I get this: =\> “\\303\\226” In pure Java: “Ö”.toLowerCase() Yields the correct result. Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://…

---

## [Using java's implementation of MessageDigest on JRuby but it](https://www.ruby-forum.com/t/using-javas-implementation-of-messagedigest-on-jruby-but-it/158786)

<div class="topic-metadata">

**Author:** [@gordons11](https://www.ruby-forum.com/u/gordons11)\
**Replies:** 0\
**Last updated:** [January 27, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/using-javas-implementation-of-messagedigest-on-jruby-but-it/158786 "2009-01-27T23:35:03Z")

</div>

So I was just testing out JRuby seeing how well you can call java code into it, and i wanted to use java’s implementation of MessageDigest instead ruby’s. I ran this code. require ‘java’ include\_class ‘java.security.…

---

## [OpenSSL: no such provider: BC](https://www.ruby-forum.com/t/openssl-no-such-provider-bc/158693)

<div class="topic-metadata">

**Author:** [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Replies:** 4\
**Last updated:** [January 27, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/openssl-no-such-provider-bc/158693 "2009-01-27T23:32:53Z")

</div>

I am trying to use openssl cryptography. The program works fine in MRI but fails under jruby. I think I am doing everything right, but it still doesn;t work. The application includes a file called bouncycastle.rb and…

---

## [Help on Directory Iteration](https://www.ruby-forum.com/t/help-on-directory-iteration/158715)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 7\
**Last updated:** [January 27, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/help-on-directory-iteration/158715 "2009-01-27T23:32:17Z")

</div>

Hi People i have never done file or Directory manipulations before. now in my form i have given date field and search button. if the user enters date and clicks the search button,accoding to the date entered it has t…

---

## ["org.jruby.rack.RackInitializationException: IO error -- rack" on Tomcat 5.5](https://www.ruby-forum.com/t/org-jruby-rack-rackinitializationexception-io-error-rack-on-tomcat-5-5/143565)

<div class="topic-metadata">

**Author:** [@Albert\_R](https://www.ruby-forum.com/u/Albert_R)\
**Replies:** 7\
**Last updated:** [January 27, 2009, 9:03pm UTC](https://www.ruby-forum.com/t/org-jruby-rack-rackinitializationexception-io-error-rack-on-tomcat-5-5/143565 "2009-01-27T21:03:28Z")

</div>

Hi. I am trying to deploy a war i made with warbler 0.9.9. When i drop it into tomcat i get a wierd error in the logs: SEVERE: Warning: error application could not be initialized org.jruby.rack.RackInitializationExce…

---

## [A bug in Ruby regexp lib?](https://www.ruby-forum.com/t/a-bug-in-ruby-regexp-lib/158761)

<div class="topic-metadata">

**Author:** [@arturaz](https://www.ruby-forum.com/u/arturaz)\
**Replies:** 3\
**Last updated:** [January 27, 2009, 9:02pm UTC](https://www.ruby-forum.com/t/a-bug-in-ruby-regexp-lib/158761 "2009-01-27T21:02:11Z")

</div>

ruby 1.8.7 (2008-08-11 patchlevel 72) \[i486-linux\] x11@www:~$ irb irb(main):001:0\> s = “www.myspace.com/djmamania www.myspace.com/djmantini” =\> “www.myspace.com/djmamania www.myspace.com/djmantini” irb(main):002:0\> …

---

## [When is JRuby 1.2/1.1.7 release?](https://www.ruby-forum.com/t/when-is-jruby-1-2-1-1-7-release/158755)

<div class="topic-metadata">

**Author:** [@Vivek\_P](https://www.ruby-forum.com/u/Vivek_P)\
**Replies:** 4\
**Last updated:** [January 27, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/when-is-jruby-1-2-1-1-7-release/158755 "2009-01-27T19:32:14Z")

</div>

Hi everyone, Post JRuby 1.1.6 has some important performance related fixes and it will be good to know when is the release of jruby 1.2 or 1.1.7 is planned. Considering one of the goal of jruby 1.2 is jruby 1.9 suppo…

---

## [Secure client api for a web service](https://www.ruby-forum.com/t/secure-client-api-for-a-web-service/158559)

<div class="topic-metadata">

**Author:** [@Carla](https://www.ruby-forum.com/u/Carla)\
**Replies:** 2\
**Last updated:** [January 27, 2009, 7:22pm UTC](https://www.ruby-forum.com/t/secure-client-api-for-a-web-service/158559 "2009-01-27T19:22:15Z")

</div>

Hello, I have to make a client api using ruby, to a java web service. Using wsdl2ruby, I generated the client stubs and now I am trying to use one of many popular methods of web service in a secure way i.e. digital s…

---

## [How can I get the arguments passed to the caller](https://www.ruby-forum.com/t/how-can-i-get-the-arguments-passed-to-the-caller/158611)

<div class="topic-metadata">

**Author:** [@stefankroes](https://www.ruby-forum.com/u/stefankroes)\
**Replies:** 8\
**Last updated:** [January 27, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/how-can-i-get-the-arguments-passed-to-the-caller/158611 "2009-01-27T18:49:21Z")

</div>

Hey guys. I have a rather weird question. I want to write a function that programatically determines the arguments passed to its caller. Say, if i do $stuff = \[\] def bar(arg) foo end def foo first\_arg = … $stuf…

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

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