# Ruby

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

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

---

## [Float in Spreadsheet](https://www.ruby-forum.com/t/float-in-spreadsheet/159977)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 14\
**Last updated:** [March 10, 2010, 3:02pm UTC](https://www.ruby-forum.com/t/float-in-spreadsheet/159977 "2010-03-10T15:02:17Z")

</div>

Hi, I am using the ruby spreadsheet gem to create Excel files from within Ruby. Could someone tell me how to write a decimal value (in this case 34.00) to an Excel cell. I have looked in the documentation (http://sp…

---

## [How to test if a file is open?](https://www.ruby-forum.com/t/how-to-test-if-a-file-is-open/184914)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvue](https://www.ruby-forum.com/u/Une_BSSSSvue)\
**Replies:** 7\
**Last updated:** [March 10, 2010, 2:54pm UTC](https://www.ruby-forum.com/t/how-to-test-if-a-file-is-open/184914 "2010-03-10T14:54:49Z")

</div>

i’d like to know how to test if a file is open from another app ? i’ve read http://www.ruby-forum.com/topic/144114 and have tested with : ruby 1.8.7 (2008-08-11 patchlevel 72) \[universal-darwin10.0\] and MacRuby vers…

---

## [Install fcgi-ruby for Apache on Windows Xp](https://www.ruby-forum.com/t/install-fcgi-ruby-for-apache-on-windows-xp/184832)

<div class="topic-metadata">

**Author:** [@gorkimaximum](https://www.ruby-forum.com/u/gorkimaximum)\
**Replies:** 7\
**Last updated:** [March 10, 2010, 1:34pm UTC](https://www.ruby-forum.com/t/install-fcgi-ruby-for-apache-on-windows-xp/184832 "2010-03-10T13:34:12Z")

</div>

Hello I need some help with gem fcgi-ruby-0.8.8. I have tried to create from the source rubygem, but in Windows Xp, always i get a lot of errors and the process is aborted. I have tried also to make a direct install …

---

## [Capturing incremental output from STDOUT](https://www.ruby-forum.com/t/capturing-incremental-output-from-stdout/184780)

<div class="topic-metadata">

**Author:** [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Replies:** 4\
**Last updated:** [March 10, 2010, 1:28pm UTC](https://www.ruby-forum.com/t/capturing-incremental-output-from-stdout/184780 "2010-03-10T13:28:35Z")

</div>

Hi all, If I run an external process, e.g. IO.popen(‘cucumber’) Then Ruby blocks while waiting for the whole output of the subprocess. Is there a way to read the subprocess’ output incrementally as it is being writ…

---

## [Lorax 0.1.0 Released](https://www.ruby-forum.com/t/lorax-0-1-0-released/184895)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 3\
**Last updated:** [March 10, 2010, 12:10pm UTC](https://www.ruby-forum.com/t/lorax-0-1-0-released/184895 "2010-03-10T12:10:22Z")

</div>

lorax version 0.1.0 has been released! http://github.com/flavorjones/lorax The Lorax is a diff and patch library for XML/HTML documents, based on Nokogiri. It can tell you whether two XML/HTML documents are identica…

---

## [Shortest code](https://www.ruby-forum.com/t/shortest-code/184803)

<div class="topic-metadata">

**Author:** [@daretake](https://www.ruby-forum.com/u/daretake)\
**Replies:** 17\
**Last updated:** [March 10, 2010, 10:25am UTC](https://www.ruby-forum.com/t/shortest-code/184803 "2010-03-10T10:25:37Z")

</div>

hi i’m a newbie in ruby and was test out some interesting problems in ruby, i came across a small one to print the sum of positive numbers from a list of n numbers… with the shortest code possible… well the best i co…

---

## [Running autospec](https://www.ruby-forum.com/t/running-autospec/184909)

<div class="topic-metadata">

**Author:** [@xjivan](https://www.ruby-forum.com/u/xjivan)\
**Replies:** 0\
**Last updated:** [March 10, 2010, 9:58am UTC](https://www.ruby-forum.com/t/running-autospec/184909 "2010-03-10T09:58:06Z")

</div>

Hi With the latest HEAD version I can successfully run autospec without any modifications. But I can’t send it SIGINT (ctrl-c) to reinit itself. IronRuby will just exit leaving the command prompt in an invalid state …

---

## [Question on threads](https://www.ruby-forum.com/t/question-on-threads/184824)

<div class="topic-metadata">

**Author:** [@Jean\_G](https://www.ruby-forum.com/u/Jean_G)\
**Replies:** 3\
**Last updated:** [March 10, 2010, 9:24am UTC](https://www.ruby-forum.com/t/question-on-threads/184824 "2010-03-10T09:24:45Z")

</div>

Hello, count = 0 threads = \[\] 10.times do |i| threads\[i\] = Thread.new do sleep(rand(0.1)) Thread.current\[“mycount”\] = count count += 1 end end threads.each {|t| t.join; print t\[“mycount”\], ", " } For the code …

---

## [Compile/Close Ruby Code](https://www.ruby-forum.com/t/compile-close-ruby-code/184878)

<div class="topic-metadata">

**Author:** [@gurbux](https://www.ruby-forum.com/u/gurbux)\
**Replies:** 6\
**Last updated:** [March 10, 2010, 8:47am UTC](https://www.ruby-forum.com/t/compile-close-ruby-code/184878 "2010-03-10T08:47:47Z")

</div>

I write scripts under Linux using Ruby. It wouldn’t matter releasing the code as long as the code is MINE. However, if I develop software for a company, and if a rival gets a hold of the code; you can consider me fire…

---

## [Hash](https://www.ruby-forum.com/t/hash/184896)

<div class="topic-metadata">

**Author:** [@dhananjay1972](https://www.ruby-forum.com/u/dhananjay1972)\
**Replies:** 3\
**Last updated:** [March 10, 2010, 7:53am UTC](https://www.ruby-forum.com/t/hash/184896 "2010-03-10T07:53:26Z")

</div>

Hello the code is like this hash\_fruit = {} hash\_fruit \[‘mango’\]=‘orange’ hash\_fruit \[‘banana’\]=‘yellow’ hash\_fruit \[‘grapes’\]=‘green’ hash\_fruit \[‘apple’\] = ‘red’ hash\_fruit .each do |key , value | puts key + ’ …

---

## [Mcbean 0.1.1 Released](https://www.ruby-forum.com/t/mcbean-0-1-1-released/184893)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 0\
**Last updated:** [March 10, 2010, 4:39am UTC](https://www.ruby-forum.com/t/mcbean-0-1-1-released/184893 "2010-03-10T04:39:08Z")

</div>

mcbean version 0.1.1 has been released! http://github.com/flavorjones/mcbean McBean transforms HTML into Markdown with the help of Loofah and Nokogiri. The vision is to eventually be able to transform (with the help…

---

## [Fast Exception creation with raw backtrace](https://www.ruby-forum.com/t/fast-exception-creation-with-raw-backtrace/184888)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 2\
**Last updated:** [March 10, 2010, 3:54am UTC](https://www.ruby-forum.com/t/fast-exception-creation-with-raw-backtrace/184888 "2010-03-10T03:54:04Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!e(BException e$B%\*%V%8%'%/%H$r:n@.$9$k$H$-!$I,$:!VFI$$d$9$$%P%C%/%H%l!\<%9!We(B e$B$r@8@.$7$^$9$,!$;H$o$J$$$H$-$b7k9=$"$j$^$9!%;H$o$J$$\>l9g$b!$?M$K!VFI$$de(B e$B$9$$%P%C%/%H%l!\<%9!W$r:n@.$9$k…

---

## [Assistance dynamically building a nested hash](https://www.ruby-forum.com/t/assistance-dynamically-building-a-nested-hash/127382)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 7\
**Last updated:** [March 10, 2010, 2:34am UTC](https://www.ruby-forum.com/t/assistance-dynamically-building-a-nested-hash/127382 "2010-03-10T02:34:54Z")

</div>

I’ve done some searching and have found some nested hash references but not quite enough to get me going with what I need. I’m looking to build a structure like so… actuals = {actual\_id, {date =\> count, date =\> count,…

---

## [Godaddy promo codes 2010](https://www.ruby-forum.com/t/godaddy-promo-codes-2010/184880)

<div class="topic-metadata">

**Author:** [@jakob\_jak](https://www.ruby-forum.com/u/jakob_jak)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 9:10pm UTC](https://www.ruby-forum.com/t/godaddy-promo-codes-2010/184880 "2010-03-09T21:10:51Z")

</div>

Godaddy promo codes 2010

---

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

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 7:47pm UTC](https://www.ruby-forum.com/t/code-review-gems/184873 "2010-03-09T19:47:08Z")

</div>

tfpt review “/shelveset:gems;REDMOND\\sborde” Comment : When installing gems from a remote server that is using MRI, the gem information that is sent down to the local machine is incorrect since MRI is not able to p…

---

## [Re: Code Review: gems](https://www.ruby-forum.com/t/re-code-review-gems/184874)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 7:46pm UTC](https://www.ruby-forum.com/t/re-code-review-gems/184874 "2010-03-09T19:46:33Z")

</div>

Actually, the change in platform.rb is a nop as the string “universal-.net” will get converted to a Gem::Platform before comparsion. I will undo this change. We could consider adding a case for the string “.net” if we…

---

## [Testing Symlinks](https://www.ruby-forum.com/t/testing-symlinks/184868)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 7:29pm UTC](https://www.ruby-forum.com/t/testing-symlinks/184868 "2010-03-09T19:29:34Z")

</div>

I probably should know the answers to these, but it’s never come up before. How to check if a symbolic link exists and already points to where you expect it to point? And how to check for dead symbolic links? Thanks…

---

## [WIN32OLE status?](https://www.ruby-forum.com/t/win32ole-status/184862)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 7:14pm UTC](https://www.ruby-forum.com/t/win32ole-status/184862 "2010-03-09T19:14:55Z")

</div>

I saw some discussion on irc last week about WIN32OLE support. I’d be willing to put it through its paces for some of the work I do. Is it part of master or is there a specific branch I should checkout and build? Als…

---

## [Getting Constructor Not Found (Ruby Java Bridge, RJB)](https://www.ruby-forum.com/t/getting-constructor-not-found-ruby-java-bridge-rjb/184863)

<div class="topic-metadata">

**Author:** [@anukulsinghal](https://www.ruby-forum.com/u/anukulsinghal)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/getting-constructor-not-found-ruby-java-bridge-rjb/184863 "2010-03-09T18:06:32Z")

</div>

Hi, I am a newbie to using RJB gem, and this is the issue I am facing. Following is my code: require ‘rjb’ classpath = “” Rjb::load(classpath, \[“-DMC\_HOME=”\]) selenium\_import = Rjb::import(‘com.thoughtworks.seleni…

---

## [Flatten out Hash](https://www.ruby-forum.com/t/flatten-out-hash/184843)

<div class="topic-metadata">

**Author:** [@glenn\_nz](https://www.ruby-forum.com/u/glenn_nz)\
**Replies:** 6\
**Last updated:** [March 9, 2010, 2:26pm UTC](https://www.ruby-forum.com/t/flatten-out-hash/184843 "2010-03-09T14:26:21Z")

</div>

Hi, I would like to take a nested hash that looks like this: {“a”=\>{“b”=\>{“c”=\>1}, “b2”=\>{“c2”=\>2}}} and turn it into an array of 2 element arrays like this: \[\["a: b2: c2: ", 2\], \["a: b: c: ", 1\]\] Is there a simple …

---

## [US-ASCII to UTF-8](https://www.ruby-forum.com/t/us-ascii-to-utf-8/184846)

<div class="topic-metadata">

**Author:** [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Replies:** 2\
**Last updated:** [March 9, 2010, 2:19pm UTC](https://www.ruby-forum.com/t/us-ascii-to-utf-8/184846 "2010-03-09T14:19:57Z")

</div>

I’m having trouble in with us-ascii strings. I have written a script which receives emails straight from postfix. The emails are generally encoded in “iso-8859-1”, and I can’t get all of the characters to display pro…

---

## [Test-unit 2.0.7](https://www.ruby-forum.com/t/test-unit-2-0-7/184842)

<div class="topic-metadata">

**Author:** [@Kouhei\_S](https://www.ruby-forum.com/u/Kouhei_S)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 2:15pm UTC](https://www.ruby-forum.com/t/test-unit-2-0-7/184842 "2010-03-09T14:15:13Z")

</div>

Hi, test-unit 2.0.7 has been released: http://test-unit.rubyforge.org/ Install: % sudo gem install test-unit Highlights: This release includes redefined test method detection: test-calc.rb: require ‘rubygems’ ge…

---

## [What to do if anything bites](https://www.ruby-forum.com/t/what-to-do-if-anything-bites/184852)

<div class="topic-metadata">

**Author:** [@EDWARD\_ZOEL](https://www.ruby-forum.com/u/EDWARD_ZOEL)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 2:10pm UTC](https://www.ruby-forum.com/t/what-to-do-if-anything-bites/184852 "2010-03-09T14:10:32Z")

</div>

What to do if anything bites. Check our bites treatment at

---

## [Rake error with IronRuby on Mono - PathName2 / System.dll](https://www.ruby-forum.com/t/rake-error-with-ironruby-on-mono-pathname2-system-dll/184709)

<div class="topic-metadata">

**Author:** [@bantic](https://www.ruby-forum.com/u/bantic)\
**Replies:** 3\
**Last updated:** [March 9, 2010, 2:07pm UTC](https://www.ruby-forum.com/t/rake-error-with-ironruby-on-mono-pathname2-system-dll/184709 "2010-03-09T14:07:01Z")

</div>

Hi All, I’m following Aslak’s instructions here to get IronRuby running on Mono/OSX. http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-mono I’m getting a failure when I do the “rake compile mono=1” that it c…

---

## [Test::Unit::Omission - Unable to omit tests](https://www.ruby-forum.com/t/test-omission-unable-to-omit-tests/184522)

<div class="topic-metadata">

**Author:** [@champak](https://www.ruby-forum.com/u/champak)\
**Replies:** 11\
**Last updated:** [March 9, 2010, 1:11pm UTC](https://www.ruby-forum.com/t/test-omission-unable-to-omit-tests/184522 "2010-03-09T13:11:24Z")

</div>

I am trying to omit some tests while using the test unit framework. My code and result below. Code: require ‘rubygems’ gem ‘test-unit’ require ‘test/unit’ def testing puts “hi1” omit puts “hi2” end testing Er…

---

## [All attempts to install gems hang](https://www.ruby-forum.com/t/all-attempts-to-install-gems-hang/183431)

<div class="topic-metadata">

**Author:** [@idahoev](https://www.ruby-forum.com/u/idahoev)\
**Replies:** 10\
**Last updated:** [March 9, 2010, 1:01pm UTC](https://www.ruby-forum.com/t/all-attempts-to-install-gems-hang/183431 "2010-03-09T13:01:43Z")

</div>

For a couple weeks, I haven’t been able to install any gems on my MacBook Pro. I got so fed up with it that I eventually even wiped and reinstalled the drive and OS … and the problem hasn’t gone away. Here’s what hap…

---

## [Re: Re: Do I need to install ruby & gems on production server?](https://www.ruby-forum.com/t/re-re-do-i-need-to-install-ruby-gems-on-production-server/184838)

<div class="topic-metadata">

**Author:** [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 12:42pm UTC](https://www.ruby-forum.com/t/re-re-do-i-need-to-install-ruby-gems-on-production-server/184838 "2010-03-09T12:42:07Z")

</div>

My guess is that when you use the following in your environment, you make use of the jdbc driver: config.gem “activerecord-jdbc-adapter”, :lib =\> “jdbc\_adapter” config.gem “jdbc-oracle”, :lib =\> false Although, I’m n…

---

## [Rufus Sheduler, Dinamic timing changing](https://www.ruby-forum.com/t/rufus-sheduler-dinamic-timing-changing/184829)

<div class="topic-metadata">

**Author:** [@aldiaz84](https://www.ruby-forum.com/u/aldiaz84)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 11:08am UTC](https://www.ruby-forum.com/t/rufus-sheduler-dinamic-timing-changing/184829 "2010-03-09T11:08:58Z")

</div>

Hi! In my app, i’m using Rufus Sheduler to shedule some automatic tasks, my problem is that i want to set the frecuency of this task from an external VAR. Actually i have something like this: (simplify) repeat = Ruf…

---

## [Daemonize, redirect stdin and stdout and write a pidfile](https://www.ruby-forum.com/t/daemonize-redirect-stdin-and-stdout-and-write-a-pidfile/184796)

<div class="topic-metadata">

**Author:** [@gderosa](https://www.ruby-forum.com/u/gderosa)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 11:07am UTC](https://www.ruby-forum.com/t/daemonize-redirect-stdin-and-stdout-and-write-a-pidfile/184796 "2010-03-09T11:07:00Z")

</div>

Hi! the subject is a very standard requirement and should be done in a very standard way: through ruby core, stdlib or some very popular gem, like Daemons ( http://daemons.rubyforge.org/ ) Anyway, I don’t know how to…

---

## [Problem running Ruby app](https://www.ruby-forum.com/t/problem-running-ruby-app/184774)

<div class="topic-metadata">

**Author:** [@aldiaz84](https://www.ruby-forum.com/u/aldiaz84)\
**Replies:** 3\
**Last updated:** [March 9, 2010, 10:51am UTC](https://www.ruby-forum.com/t/problem-running-ruby-app/184774 "2010-03-09T10:51:48Z")

</div>

Hello! I’m developing a ruby app, and i’m using NetBeans IDE 6.8 for programming, so my problem now it’s that i can execute my app without problems using Netbeans, but if i do ruby myapp.rb from terminal , i have the…

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

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