# Ruby

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

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

---

## [My hashe is only storing 1 set of values](https://www.ruby-forum.com/t/my-hashe-is-only-storing-1-set-of-values/120152)

<div class="topic-metadata">

**Author:** [@pood](https://www.ruby-forum.com/u/pood)\
**Replies:** 2\
**Last updated:** [November 14, 2007, 6:46am UTC](https://www.ruby-forum.com/t/my-hashe-is-only-storing-1-set-of-values/120152 "2007-11-14T06:46:47Z")

</div>

Dir.foreach(directory) do |f| @file\_sizes = {f =\> File.size(directory+"/"+f)} end So I’m storing the file name and size in a hash, with the name of the file as the key. The above piece of code seems to only store th…

---

## [Recursion with blocks](https://www.ruby-forum.com/t/recursion-with-blocks/120122)

<div class="topic-metadata">

**Author:** [@mperham](https://www.ruby-forum.com/u/mperham)\
**Replies:** 12\
**Last updated:** [November 14, 2007, 4:19am UTC](https://www.ruby-forum.com/t/recursion-with-blocks/120122 "2007-11-14T04:19:32Z")

</div>

I have a tree structure where I want to walk the structure and find a node based on a name. I’m unclear how to use recursion with blocks such that I can return the correct node. All code snippets I’ve seen have invo…

---

## [Rrdtool gem](https://www.ruby-forum.com/t/rrdtool-gem/120088)

<div class="topic-metadata">

**Author:** [@haleythrapp](https://www.ruby-forum.com/u/haleythrapp)\
**Replies:** 3\
**Last updated:** [November 14, 2007, 4:17am UTC](https://www.ruby-forum.com/t/rrdtool-gem/120088 "2007-11-14T04:17:12Z")

</div>

I am trying to use RRDtool through ruby. I have installed rrdtool and it appears to be working(I can run the sample scripts). I downloaded the RubyRRDtool gem and tried to install it. The install appears to work wi…

---

## [Round missing (mswin32)](https://www.ruby-forum.com/t/round-missing-mswin32/120019)

<div class="topic-metadata">

**Author:** [@KIMURA\_Koichi](https://www.ruby-forum.com/u/KIMURA_Koichi)\
**Replies:** 7\
**Last updated:** [November 14, 2007, 4:07am UTC](https://www.ruby-forum.com/t/round-missing-mswin32/120019 "2007-11-14T04:07:49Z")

</div>

e$BLZB\<$G$9!#e(B e$BKhEY%S%k%I$,$G$-$J$$$H$$$&Ej9F$P$+$j$G?=$7Lu$J$$$G$9$,e(B cl -nologo main.obj dmydln.obj prelude.obj array.obj (e$BN,e(B) numeric.obj : error LNK2019: e$BL$2r7h$N30It%7%s%%ke(B \_round e$B$,4…

---

## [Yydebug](https://www.ruby-forum.com/t/yydebug/119812)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 4\
**Last updated:** [November 14, 2007, 4:01am UTC](https://www.ruby-forum.com/t/yydebug/119812 "2007-11-14T04:01:59Z")

</div>

e$B$J$+$@$G$9!#e(B e$B%3%^%s%I%i%$%s%\*%W%7%g%s$+$i?($l$kFbItJQ?t$r!"%0%m!\<%P%k$+$ie(BVMe$B$+e(B parsere$B$K0\\9T$7$?$$$H9M$($F$$$k$N$G$9$,!“e(Byydebuge$B$Oe(Bbisone$B$G@8@.$5$le(B e$B$k%=!\<%9$KKd$a9~$^$l$F$$$k$N$G%3%s%…

---

## [Creating a framework to wrap a gem](https://www.ruby-forum.com/t/creating-a-framework-to-wrap-a-gem/120136)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [November 14, 2007, 3:04am UTC](https://www.ruby-forum.com/t/creating-a-framework-to-wrap-a-gem/120136 "2007-11-14T03:04:02Z")

</div>

Anyone know of a good way to wrap a rubygem into a framework for xcode? I wana take my custom gem, make it into a framework for use in a rubycocoa app

---

## [Vehicle Counters (#146)](https://www.ruby-forum.com/t/vehicle-counters-146/119715)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 3\
**Last updated:** [November 14, 2007, 2:50am UTC](https://www.ruby-forum.com/t/vehicle-counters-146/119715 "2007-11-14T02:50:35Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Catch and throw](https://www.ruby-forum.com/t/catch-and-throw/118919)

<div class="topic-metadata">

**Author:** [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Replies:** 2\
**Last updated:** [November 14, 2007, 2:31am UTC](https://www.ruby-forum.com/t/catch-and-throw/118919 "2007-11-14T02:31:19Z")

</div>

I did a quick implementation of Kernel#catch and Kernel#throw. http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-catch-throw Hopefully it is quick but not dirty.

---

## [Can't run cgi script with Apache 2.2 with Windows XP](https://www.ruby-forum.com/t/cant-run-cgi-script-with-apache-2-2-with-windows-xp/120140)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 0\
**Last updated:** [November 14, 2007, 2:19am UTC](https://www.ruby-forum.com/t/cant-run-cgi-script-with-apache-2-2-with-windows-xp/120140 "2007-11-14T02:19:35Z")

</div>

I’m trying to get Ruby up and running using a CGI script in a Windows XP/Pro. I entered the following URL in the IE browser: localhost:8080/cgi-bin/hello.cgi. The following is returned on the browser: 500 Internet Se…

---

## [Android + JRuby?](https://www.ruby-forum.com/t/android-jruby/119322)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 10\
**Last updated:** [November 14, 2007, 12:41am UTC](https://www.ruby-forum.com/t/android-jruby/119322 "2007-11-14T00:41:26Z")

</div>

Hey Mr. Nutter… Any idea if JRuby will work on Android??? Sure would be cool to have a Ruby angle on phone software, even though there is no Android phone yet…

---

## [The dragon has-a traits object](https://www.ruby-forum.com/t/the-dragon-has-a-traits-object/120123)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 10:58pm UTC](https://www.ruby-forum.com/t/the-dragon-has-a-traits-object/120123 "2007-11-13T22:58:23Z")

</div>

Is this the “correct” way to change the dragon’s traits? C:\\code\> C:\\code\> C:\\code\>composition.rb #Dragon:0x277057c C:\\code\> C:\\code\> C:\\code\>dir Volume in drive C has no label. Volume Serial Number is 0491-510F …

---

## [ML issues?](https://www.ruby-forum.com/t/ml-issues/120119)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 1\
**Last updated:** [November 13, 2007, 10:48pm UTC](https://www.ruby-forum.com/t/ml-issues/120119 "2007-11-13T22:48:25Z")

</div>

hi all- i haven’t personally seen all this thread http://groups.google.com/group/ruby-talk-google/browse\_frm/thread/ 3de853a80e312fff land in my inbox. ml issues or personal problem? thanks a @ http://codeforpeopl…

---

## [Re: ML issues?](https://www.ruby-forum.com/t/re-ml-issues/120121)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/re-ml-issues/120121 "2007-11-13T22:43:07Z")

</div>

From: ara.t.howard \[mailto:removed\_email\_address@domain.invalid\] i haven’t personally seen all this thread http://groups.google.com/group/ruby-talk-google/browse\_frm/thread/3de853 a80e312fff land in my inbox. ml …

---

## [Bash to ruby](https://www.ruby-forum.com/t/bash-to-ruby/118076)

<div class="topic-metadata">

**Author:** [@fernan2](https://www.ruby-forum.com/u/fernan2)\
**Replies:** 12\
**Last updated:** [November 13, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/bash-to-ruby/118076 "2007-11-13T21:45:46Z")

</div>

Hi people, I’m not a ruby developer just yet, but I’ve been reading a couple of in-depth references and I already like it… a lot. Today I got, once again as usual, annoyed by having to get into cygwin just to run bui…

---

## [Comp.lang.fortran challenge](https://www.ruby-forum.com/t/comp-lang-fortran-challenge/119903)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 13\
**Last updated:** [November 13, 2007, 9:37pm UTC](https://www.ruby-forum.com/t/comp-lang-fortran-challenge/119903 "2007-11-13T21:37:00Z")

</div>

Having Ruby fun with the comp.lang.fortran folks: http://tinyurl.com/38o8ex http://tinyurl.com/2pw22q Please riff a better Ruby answer… Regards,

---

## [RubySites](https://www.ruby-forum.com/t/rubysites/120046)

<div class="topic-metadata">

**Author:** [@editkid](https://www.ruby-forum.com/u/editkid)\
**Replies:** 1\
**Last updated:** [November 13, 2007, 8:52pm UTC](https://www.ruby-forum.com/t/rubysites/120046 "2007-11-13T20:52:28Z")

</div>

Is there any rule for when you should put DynamicSite instances into Ruby.Builtins.RubySites rather than local to the class that uses them? As an example, Numeric has a method called coerce that is used quite a lot i…

---

## [Installing bleak house on osx](https://www.ruby-forum.com/t/installing-bleak-house-on-osx/119089)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 6\
**Last updated:** [November 13, 2007, 7:42pm UTC](https://www.ruby-forum.com/t/installing-bleak-house-on-osx/119089 "2007-11-13T19:42:43Z")

</div>

anyone else gotten this? cfp:~ \> sudo gem install bleak\_house Password: Install required dependency ccsv? \[Yn\] y Building native extensions. This could take a while… Building native extensions. This could take …

---

## [Extconf.rb \>\> mkmf](https://www.ruby-forum.com/t/extconf-rb-mkmf/119980)

<div class="topic-metadata">

**Author:** [@flnative](https://www.ruby-forum.com/u/flnative)\
**Replies:** 1\
**Last updated:** [November 13, 2007, 7:06pm UTC](https://www.ruby-forum.com/t/extconf-rb-mkmf/119980 "2007-11-13T19:06:54Z")

</div>

hi @all I would like to extend my rubyapp with a c++ program. I used the features of mkmf (require ‘mkmf’) and saved it into the extconf.rb. So already the whole program is running, but I want to compile the c-file w…

---

## [Indenting REXML output](https://www.ruby-forum.com/t/indenting-rexml-output/120029)

<div class="topic-metadata">

**Author:** [@soroe](https://www.ruby-forum.com/u/soroe)\
**Replies:** 6\
**Last updated:** [November 13, 2007, 6:24pm UTC](https://www.ruby-forum.com/t/indenting-rexml-output/120029 "2007-11-13T18:24:30Z")

</div>

Hey Guys, Anyone know how to get REXML to generate indented XML? At the moment I get something like this: Superglue is great stuff. When I really want this: Superglue is great stuff. Sonny.

---

## [Automating gem installs?](https://www.ruby-forum.com/t/automating-gem-installs/119734)

<div class="topic-metadata">

**Author:** [@jhernandez](https://www.ruby-forum.com/u/jhernandez)\
**Replies:** 10\
**Last updated:** [November 13, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/automating-gem-installs/119734 "2007-11-13T17:51:54Z")

</div>

I’m trying to setup an automated build system for all of our upstream binary dependencies (that we don’t get from our OS). Since we track a newer ruby than most of our machines ship with, this means building ruby and …

---

## [RFLOAT\_VALUE(val), DOUBLE2NUM(dbl)](https://www.ruby-forum.com/t/rfloat-value-val-double2num-dbl/120076)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 9\
**Last updated:** [November 13, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/rfloat-value-val-double2num-dbl/120076 "2007-11-13T17:44:51Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!:G6a$Oe(B RHoge e$B$N%(%s%H%j$r%^%/%m$r2p$7$F%"%/%;%9$G$-$k$h$&$K$9$k$Ne(B e$B$,N.9T$N$h$&$G$9$N$G!$e(BRFloat e$B$b$=$&$7$^$;$s$+!%e(B e$B!!e(Bext/ e$B0J2\<$G$O$\[$H$s$I%"%/%;%9$7$F$$$J$+$C$?$…

---

## [Regexp ignore case option](https://www.ruby-forum.com/t/regexp-ignore-case-option/120072)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 1\
**Last updated:** [November 13, 2007, 5:27pm UTC](https://www.ruby-forum.com/t/regexp-ignore-case-option/120072 "2007-11-13T17:27:48Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!e(B1.9 e$B$Ge(B test-all e$B$r$9$k$H$3$s$J\<:GT$r$7$^$9!%e(B Failure: test\_s\_new(TC\_IPAddr) \[/home/ko1/ruby/trunk/lib/ipaddr.rb:580\]: Exception raised: Class: Message: \<“invalid address”\> …

---

## [Array ordering / selection according to elements -](https://www.ruby-forum.com/t/array-ordering-selection-according-to-elements/120080)

<div class="topic-metadata">

**Author:** [@harper](https://www.ruby-forum.com/u/harper)\
**Replies:** 4\
**Last updated:** [November 13, 2007, 4:49pm UTC](https://www.ruby-forum.com/t/array-ordering-selection-according-to-elements/120080 "2007-11-13T16:49:34Z")

</div>

given that time1 \< time2 \< time3 \< time4 … (and are all Time objects) myarray= \[ time1, time2, time3, time4, time5 , time6 , time7 , … \] special\_sort(time4)= \[ time3, time4, time5 \] …basically, passing an arg of a cer…

---

## [How do I exit from a block](https://www.ruby-forum.com/t/how-do-i-exit-from-a-block/120069)

<div class="topic-metadata">

**Author:** [@cujigar](https://www.ruby-forum.com/u/cujigar)\
**Replies:** 9\
**Last updated:** [November 13, 2007, 4:33pm UTC](https://www.ruby-forum.com/t/how-do-i-exit-from-a-block/120069 "2007-11-13T16:33:08Z")

</div>

base\_dir = “C:/pde” def list base\_dir d= Dir.new base\_dir d.each {|x| return “asd” if x.eql? “.” return “asd” if x.eql? “…” puts “Got #{x}” full\_name = base\_dir+"/"+x if(File.directory?(full\_name)) list full\_na…

---

## [File Uploading in Ruby](https://www.ruby-forum.com/t/file-uploading-in-ruby/120030)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 2\
**Last updated:** [November 13, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/file-uploading-in-ruby/120030 "2007-11-13T16:31:43Z")

</div>

Hi All i am a totally new comer to the Ruby and currently i have stared working in RUBY on RAILS. write now i came to some kind of a dead point in my development. where i have to create my on codes for a file uploadin…

---

## [Gem install problem](https://www.ruby-forum.com/t/gem-install-problem/119985)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 1\
**Last updated:** [November 13, 2007, 4:20pm UTC](https://www.ruby-forum.com/t/gem-install-problem/119985 "2007-11-13T16:20:51Z")

</div>

bcck@tom-desktop:~/packages$ gem update Updating installed gems… Bulk updating Gem source index for: http://gems.rubyforge.org ERROR: While executing gem … (Gem::RemoteSourceException) Error fetching remote gem cach…

---

## [Problems with rexml](https://www.ruby-forum.com/t/problems-with-rexml/120079)

<div class="topic-metadata">

**Author:** [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/problems-with-rexml/120079 "2007-11-13T16:16:51Z")

</div>

I’m using this: require ‘firewatir’ require “rexml/document” include REXML And I’m having problems when I’m requiring firewatir and REXML but not if I require ‘watir’ instead of firewatir. When I use rexml even if …

---

## [How to ensure signature compliance while mocking in ruby](https://www.ruby-forum.com/t/how-to-ensure-signature-compliance-while-mocking-in-ruby/120047)

<div class="topic-metadata">

**Author:** [@pradeepgatram](https://www.ruby-forum.com/u/pradeepgatram)\
**Replies:** 4\
**Last updated:** [November 13, 2007, 3:45pm UTC](https://www.ruby-forum.com/t/how-to-ensure-signature-compliance-while-mocking-in-ruby/120047 "2007-11-13T15:45:04Z")

</div>

Let me put my dilemma as an example. Take a look at a snippet from FooTest. #using mocha def test\_method1 Bar.expects(:method2).with(‘param1’, ‘param2’).once Foo.method1 end And now the implementation class Foo …

---

## [How to install ruby in home folder?](https://www.ruby-forum.com/t/how-to-install-ruby-in-home-folder/119932)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 7\
**Last updated:** [November 13, 2007, 3:14pm UTC](https://www.ruby-forum.com/t/how-to-install-ruby-in-home-folder/119932 "2007-11-13T15:14:31Z")

</div>

I don’t have root access Is there any idea to install ruby in home folder(/home/username/) only ?

---

## [Open URI & web scraping. Part II](https://www.ruby-forum.com/t/open-uri-web-scraping-part-ii/120064)

<div class="topic-metadata">

**Author:** [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Replies:** 3\
**Last updated:** [November 13, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/open-uri-web-scraping-part-ii/120064 "2007-11-13T14:59:06Z")

</div>

Hi (short form of a post I made yesterday that got no love, I suspect it’ sbecuase I was long winded) Nutshell if I use open URI (and Hpricot) to download a web page and ‘scrape’ all the images to write them to my lo…

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

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