# Ruby

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

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

---

## [Custom context-param config for web.xml in Warbler](https://www.ruby-forum.com/t/custom-context-param-config-for-web-xml-in-warbler/147246)

<div class="topic-metadata">

**Author:** [@pletisan](https://www.ruby-forum.com/u/pletisan)\
**Replies:** 10\
**Last updated:** [August 30, 2008, 11:36pm UTC](https://www.ruby-forum.com/t/custom-context-param-config-for-web-xml-in-warbler/147246 "2008-08-30T23:36:06Z")

</div>

Hi there, Has anyone successfully configured custom context parameters in web.xml via config/warbler.rb? I tried: config.webxml.foo.bar.baz = “something” as well as config.webxml.context\_params\[‘foo.bar.baz’\] = “so…

---

## [Bug in Warbler 0.9.10?](https://www.ruby-forum.com/t/bug-in-warbler-0-9-10/146203)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 11:30pm UTC](https://www.ruby-forum.com/t/bug-in-warbler-0-9-10/146203 "2008-08-30T23:30:50Z")

</div>

I’ve noticed when using Warbler to build WAR files for Merb applications, that a tmp directory gets created in the WEB-INF directory which contains all of the gems (again - they are already in WEB-INF/gems) and ends u…

---

## [WARBLER - What is the difference between Merb and Rack webxml booters?](https://www.ruby-forum.com/t/warbler-what-is-the-difference-between-merb-and-rack-webxml-booters/146281)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 5\
**Last updated:** [August 30, 2008, 11:28pm UTC](https://www.ruby-forum.com/t/warbler-what-is-the-difference-between-merb-and-rack-webxml-booters/146281 "2008-08-30T23:28:28Z")

</div>

What is the actual difference at runtime between doing config.webxml.booter = :merb and config.webxml.booter = :rack in the warble.rb file? Currently, I’m using :merb. Should I be using :rack, or would that only m…

---

## [Where to find list of changes between Ruby 1.8 (pickax book version) and current (j)ruby version?](https://www.ruby-forum.com/t/where-to-find-list-of-changes-between-ruby-1-8-pickax-book-version-and-current-j-ruby-version/146511)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 1\
**Last updated:** [August 30, 2008, 11:24pm UTC](https://www.ruby-forum.com/t/where-to-find-list-of-changes-between-ruby-1-8-pickax-book-version-and-current-j-ruby-version/146511 "2008-08-30T23:24:58Z")

</div>

I’d like to know what’s changed and been added. Thanks, Ken To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage\_email

---

## [(maven) jruby-rake-plugin 1.1.3?](https://www.ruby-forum.com/t/maven-jruby-rake-plugin-1-1-3/146525)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 1\
**Last updated:** [August 30, 2008, 11:22pm UTC](https://www.ruby-forum.com/t/maven-jruby-rake-plugin-1-1-3/146525 "2008-08-30T23:22:02Z")

</div>

Now the jruby 1.1.3 has been released, when might there be an update to jruby-rake-plugin to 1.1.3 available? Thanks, David

---

## [Accessing camelCase static field of an Java interface](https://www.ruby-forum.com/t/accessing-camelcase-static-field-of-an-java-interface/147134)

<div class="topic-metadata">

**Author:** [@Peter\_K\_Chan](https://www.ruby-forum.com/u/Peter_K_Chan)\
**Replies:** 1\
**Last updated:** [August 30, 2008, 11:20pm UTC](https://www.ruby-forum.com/t/accessing-camelcase-static-field-of-an-java-interface/147134 "2008-08-30T23:20:17Z")

</div>

I tried to use the notation Java::net.foo.Interface.field and Java::net.foo.Interface::field to access a public static field of a Java interface, but both forms erred out with a undefined method ‘field’ error. It see…

---

## [Net::FTP](https://www.ruby-forum.com/t/net-ftp/147295)

<div class="topic-metadata">

**Author:** [@andrewdon](https://www.ruby-forum.com/u/andrewdon)\
**Replies:** 5\
**Last updated:** [August 30, 2008, 11:18pm UTC](https://www.ruby-forum.com/t/net-ftp/147295 "2008-08-30T23:18:25Z")

</div>

I have setup an ftp script to fetch all files from a directory on my ftp server… my bit of code looks like this, files = ftp.chdir(‘folder’) files\_list = ftp.dir log.info “found files, #{files\_list}” log.info “Maki…

---

## [Ncurses module inclusion question](https://www.ruby-forum.com/t/ncurses-module-inclusion-question/147248)

<div class="topic-metadata">

**Author:** [@Jos\_B](https://www.ruby-forum.com/u/Jos_B)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 11:13pm UTC](https://www.ruby-forum.com/t/ncurses-module-inclusion-question/147248 "2008-08-30T23:13:51Z")

</div>

lizzy:~% cat n Math.sqrt(4) include Math sqrt(4) require ‘rubygems’ require ‘ncurses’ Ncurses.initscr include Ncurses initscr lizzy:~% ruby n 2\> err lizzy:~% cat err n:12: undefined local variable or method \`i…

---

## [Question about the web.xml session store workaround when using Goldspike to deploy a Rails 2.1 app](https://www.ruby-forum.com/t/question-about-the-web-xml-session-store-workaround-when-using-goldspike-to-deploy-a-rails-2-1-app/147191)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [August 30, 2008, 11:10pm UTC](https://www.ruby-forum.com/t/question-about-the-web-xml-session-store-workaround-when-using-goldspike-to-deploy-a-rails-2-1-app/147191 "2008-08-30T23:10:20Z")

</div>

All, I was getting “No :secret given to the #protect\_from\_forgery call.” errors in my Websphere - deployed Rails 2.1 app. (packaged w/Goldspike). I ran across the following in the JRuby wiki: "Rails Error: No :secre…

---

## [Mechanize 0.7.8 Released](https://www.ruby-forum.com/t/mechanize-0-7-8-released/147189)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/mechanize-0-7-8-released/147189 "2008-08-30T22:42:50Z")

</div>

mechanize version 0.7.8 has been released! http://mechanize.rubyforge.org/ The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, …

---

## [Show elements of array separated](https://www.ruby-forum.com/t/show-elements-of-array-separated/147288)

<div class="topic-metadata">

**Author:** [@Kless](https://www.ruby-forum.com/u/Kless)\
**Replies:** 10\
**Last updated:** [August 30, 2008, 10:07pm UTC](https://www.ruby-forum.com/t/show-elements-of-array-separated/147288 "2008-08-30T22:07:44Z")

</div>

Why when is showed an array into a variable , it is showed with all characters followed? foo = \[‘a’, ‘b’, ‘c’\] puts “the content is: #{foo}” # =\> the content is: abc I’m supposed that is because at the first it con…

---

## [Missing header stdio.h? (when updating hpricot gem)](https://www.ruby-forum.com/t/missing-header-stdio-h-when-updating-hpricot-gem/147172)

<div class="topic-metadata">

**Author:** [@carluva](https://www.ruby-forum.com/u/carluva)\
**Replies:** 6\
**Last updated:** [August 30, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/missing-header-stdio-h-when-updating-hpricot-gem/147172 "2008-08-30T21:39:38Z")

</div>

I just ran ‘gem update’ this evening, and during the update for hpricot, I got a rather surprising error. Here’s the complete output from gem: Updating installed gems Updating hpricot Building native extensions. T…

---

## [Re: How to use log4r to generate xml format log file?](https://www.ruby-forum.com/t/re-how-to-use-log4r-to-generate-xml-format-log-file/147261)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 9:33pm UTC](https://www.ruby-forum.com/t/re-how-to-use-log4r-to-generate-xml-format-log-file/147261 "2008-08-30T21:33:12Z")

</div>

I want to use log4r to generate xml formatted log file Aside: is there a standard way of using XML for log files? I had a need for writing structured data to a log a while ago, and considered XML, but rejected it o…

---

## [\[trunk\] fail to make mingw32 on Cygwin Box](https://www.ruby-forum.com/t/trunk-fail-to-make-mingw32-on-cygwin-box/147271)

<div class="topic-metadata">

**Author:** [@Masaki\_S](https://www.ruby-forum.com/u/Masaki_S)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 9:22pm UTC](https://www.ruby-forum.com/t/trunk-fail-to-make-mingw32-on-cygwin-box/147271 "2008-08-30T21:22:41Z")

</div>

e$B=uED$G$9!#e(B e$BJs9p$@$1$G$9!#e(B trunk:18934e$B$G!"e(BCygwine$B\>e$Ge(B CC=‘gcc -mno-cygwin’ e$B$r;XDj$7$Fe(B mingw32e$BHGe(BRubye$B$re(Bmakee$B$7$h$&$H$9$k$H\<:GT$7$^$9!#e(B ./miniruby.exe -I…/…/…/…/svn/ruby/tru…

---

## [Another Date Class](https://www.ruby-forum.com/t/another-date-class/147299)

<div class="topic-metadata">

**Author:** [@damiennn](https://www.ruby-forum.com/u/damiennn)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/another-date-class/147299 "2008-08-30T19:31:29Z")

</div>

hi, I need to develop new date class in ruby rather then built in date class program needs to do these things below Read a series of dates from an ASCII text file. You can assume that all dates in the file are in an…

---

## [Array#push](https://www.ruby-forum.com/t/array-push/147285)

<div class="topic-metadata">

**Author:** [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Replies:** 3\
**Last updated:** [August 30, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/array-push/147285 "2008-08-30T16:35:20Z")

</div>

Given the foloowing code: class Person attr\_accessor :first\_name, :middle\_name, :last\_name def whole\_name n = first\_name + " " n \<\< "#{middle\_name} " if middle\_name n \<\< last\_name return n.size end end m = Pers…

---

## [Using assert outside of test unit](https://www.ruby-forum.com/t/using-assert-outside-of-test-unit/147296)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 3:47pm UTC](https://www.ruby-forum.com/t/using-assert-outside-of-test-unit/147296 "2008-08-30T15:47:18Z")

</div>

hi is it possible to use assert in your actual code i.e. not just in the unit test but in say your class methods etc. I tried to use it but ruby complains its not a recognised method for my class. (i made sure to writ…

---

## [Is RDT from rubypeople.org really dead?](https://www.ruby-forum.com/t/is-rdt-from-rubypeople-org-really-dead/147294)

<div class="topic-metadata">

**Author:** [@Akira\_Hayakawa](https://www.ruby-forum.com/u/Akira_Hayakawa)\
**Replies:** 0\
**Last updated:** [August 30, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/is-rdt-from-rubypeople-org-really-dead/147294 "2008-08-30T14:35:56Z")

</div>

Hi guys, I am Akira from Kyoto, Japan. I try to move from Java to Ruby. I installed RDT from rubypeople.org but it seems to have some bugs and it does not help me much. Then, I searched ruby-talk achives and finally f…

---

## [How to use gsub method?](https://www.ruby-forum.com/t/how-to-use-gsub-method/147282)

<div class="topic-metadata">

**Author:** [@his2000x](https://www.ruby-forum.com/u/his2000x)\
**Replies:** 4\
**Last updated:** [August 30, 2008, 1:55pm UTC](https://www.ruby-forum.com/t/how-to-use-gsub-method/147282 "2008-08-30T13:55:07Z")

</div>

hi sorry! i can not speak english well… This is how I know… “abcdef”.gsub(/c/) {|h| puts h} but, Why do I get an error that my code… this is my code require ‘net/http’ page= Net::HTTP.new(‘www.google.co.kr’,80) r…

---

## [Ping.pingecho](https://www.ruby-forum.com/t/ping-pingecho/147232)

<div class="topic-metadata">

**Author:** [@john\_maclean](https://www.ruby-forum.com/u/john_maclean)\
**Replies:** 4\
**Last updated:** [August 30, 2008, 1:48pm UTC](https://www.ruby-forum.com/t/ping-pingecho/147232 "2008-08-30T13:48:29Z")

</div>

Cisco.com don’t normally allow pings so tracroutes and pings won’t get echo requests. irb(main):003:0\> Ping.pingecho(‘cisco.com’, 10, 80) =\> true How come this works and ping does not? From irb I see that Ruby’s pin…

---

## [Use of "next" in Ruby 1.9?](https://www.ruby-forum.com/t/use-of-next-in-ruby-1-9/147250)

<div class="topic-metadata">

**Author:** [@Charles\_Turner](https://www.ruby-forum.com/u/Charles_Turner)\
**Replies:** 6\
**Last updated:** [August 30, 2008, 1:47pm UTC](https://www.ruby-forum.com/t/use-of-next-in-ruby-1-9/147250 "2008-08-30T13:47:19Z")

</div>

Hi all- Fiddling around with external iterators in Ruby 1.9, and had a question. Given the following method definition: def twice if block\_given? yield 1 yield 2 else self.to\_enum(:twice) end end Why does: it…

---

## [Require question](https://www.ruby-forum.com/t/require-question/147292)

<div class="topic-metadata">

**Author:** [@lpc2148](https://www.ruby-forum.com/u/lpc2148)\
**Replies:** 0\
**Last updated:** [August 30, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/require-question/147292 "2008-08-30T13:28:14Z")

</div>

Hi guys! I’m trying to write a simple source filter . For that purpose I created a module which , when included into a script , it should filter the operations .This is the filter module module Filter def self.recre…

---

## [TypeError from Encoding.compatible? (r18920)](https://www.ruby-forum.com/t/typeerror-from-encoding-compatible-r18920/147242)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 4\
**Last updated:** [August 30, 2008, 10:26am UTC](https://www.ruby-forum.com/t/typeerror-from-encoding-compatible-r18920/147242 "2008-08-30T10:26:40Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B r18920e$B$Ge(BEncoding.compatible?e$B$,e(BTypeErrore$B$r$"$2$k$h$&$K$J$j$^e(B e$B$7$?$,!"$3$l$,0z?t%A%’%C%/$J$7$Ke(BBUILTIN\_TYPE()e$B$r;H$C$F$$$k$?e(B e$B$a!"e(Btest\_m17n.rbe$B$,Mn$A$…

---

## [Jruby-1.1.4.jar size increased by 7MB?](https://www.ruby-forum.com/t/jruby-1-1-4-jar-size-increased-by-7mb/147280)

<div class="topic-metadata">

**Author:** [@Peter\_K\_Chan](https://www.ruby-forum.com/u/Peter_K_Chan)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 8:15am UTC](https://www.ruby-forum.com/t/jruby-1-1-4-jar-size-increased-by-7mb/147280 "2008-08-30T08:15:42Z")

</div>

I noticed that the recent release of JRuby 1.1.4 is at 12 MB, which is a 7 MB increase from the 5 MB of 1.1.3. What led to the rather dramatic increase of the file size? Peter To unsubscribe from this list, please …

---

## [FW: Accessing camelCase static field of an Java interface](https://www.ruby-forum.com/t/fw-accessing-camelcase-static-field-of-an-java-interface/147281)

<div class="topic-metadata">

**Author:** [@Peter\_K\_Chan](https://www.ruby-forum.com/u/Peter_K_Chan)\
**Replies:** 2\
**Last updated:** [August 30, 2008, 8:13am UTC](https://www.ruby-forum.com/t/fw-accessing-camelcase-static-field-of-an-java-interface/147281 "2008-08-30T08:13:22Z")

</div>

I sent out this question a few days ago, but I didn’t see any reply to it. I am sending this one more time, in case someone can help. Thanks, Peter

---

## [Memory Requirements for Glassfish vs. Tomcat vs. JMongrel vs. whatever](https://www.ruby-forum.com/t/memory-requirements-for-glassfish-vs-tomcat-vs-jmongrel-vs-whatever/147244)

<div class="topic-metadata">

**Author:** [@Myron\_M](https://www.ruby-forum.com/u/Myron_M)\
**Replies:** 3\
**Last updated:** [August 30, 2008, 8:08am UTC](https://www.ruby-forum.com/t/memory-requirements-for-glassfish-vs-tomcat-vs-jmongrel-vs-whatever/147244 "2008-08-30T08:08:41Z")

</div>

Hey Folks, I’m currently working on getting my JRuby on Rails app live. I’ve got a VPS host with 512 MB memory. I assumed this would be enough (especially since this is not going to be a high-traffic website–it’s …

---

## [Assignment operator that treats empty and nil as the same thing](https://www.ruby-forum.com/t/assignment-operator-that-treats-empty-and-nil-as-the-same-thing/147263)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [August 30, 2008, 6:00am UTC](https://www.ruby-forum.com/t/assignment-operator-that-treats-empty-and-nil-as-the-same-thing/147263 "2008-08-30T06:00:39Z")

</div>

test1 otest = {}; otest\[‘first\_name’\] ||= ‘homer’; puts otest.inspect; test2 otest = {‘first\_name’=\>’’}; otest\[‘first\_name’\] ||= ‘homer’; puts otest.inspect; Problem: test1 produces the correct output, but …

---

## [Proc and lambda](https://www.ruby-forum.com/t/proc-and-lambda/147213)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 4\
**Last updated:** [August 30, 2008, 4:10am UTC](https://www.ruby-forum.com/t/proc-and-lambda/147213 "2008-08-30T04:10:07Z")

</div>

I’m new to Ruby with PHP background. Is there any super easy explanation or tutorial for proc and lamda? Do I need experience with Lisp or Smalltalk? Proc and lambda are most fun part in ruby, people say. But, I feel …

---

## [\[Bug:1.9\] rake --help $B$N=PNO$,ITB-$7$F$$$k(B](https://www.ruby-forum.com/t/bug-1-9-rake-help-b-n-pno-itb-7-f-k-b/147275)

<div class="topic-metadata">

**Author:** [@okkez](https://www.ruby-forum.com/u/okkez)\
**Replies:** 1\
**Last updated:** [August 30, 2008, 3:47am UTC](https://www.ruby-forum.com/t/bug-1-9-rake-help-b-n-pno-itb-7-f-k-b/147275 "2008-08-30T03:47:57Z")

</div>

okkez e$B$G$9!#e(B e$B0J2\<$N$h$&$Ke(B rake --help e$B$N@bL@$,IT==J,$G$9!#e(B –help e$B$O@bL@$,$J$$!#e(B –rakefile e$B$O0z?t$r\<h$k$N$KB\>$N0z?t$H0c$C$F%\*%W%7%g%s$N9T$Ke(B FILE e$B$N5-=R$,$J$$!#e(B e$B$J$I$G$9!#e(B $ …

---

## [Cycle in Ruby 1.9?](https://www.ruby-forum.com/t/cycle-in-ruby-1-9/147270)

<div class="topic-metadata">

**Author:** [@Charles\_Turner](https://www.ruby-forum.com/u/Charles_Turner)\
**Replies:** 1\
**Last updated:** [August 30, 2008, 2:23am UTC](https://www.ruby-forum.com/t/cycle-in-ruby-1-9/147270 "2008-08-30T02:23:08Z")

</div>

Hi all- I’ve seen a number of references to being able to pass an argument to cycle() to limit its behavior to a finite number of iterations. However, I get this in irb 1.9.0: ruby 1.9.0 (2007-12-25 revision 14709) \[…

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

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