# Ruby

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

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

---

## [And here we've been wasting it on case statements](https://www.ruby-forum.com/t/and-here-weve-been-wasting-it-on-case-statements/146635)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 10:22am UTC](https://www.ruby-forum.com/t/and-here-weve-been-wasting-it-on-case-statements/146635 "2008-08-23T10:22:39Z")

</div>

http://thedailywtf.com/Comments/pider-Detection.aspx?pg=2#212634

---

## [How do I make an autonomous program?](https://www.ruby-forum.com/t/how-do-i-make-an-autonomous-program/146624)

<div class="topic-metadata">

**Author:** [@raymondtjay](https://www.ruby-forum.com/u/raymondtjay)\
**Replies:** 9\
**Last updated:** [August 23, 2008, 9:35am UTC](https://www.ruby-forum.com/t/how-do-i-make-an-autonomous-program/146624 "2008-08-23T09:35:50Z")

</div>

First, I would like to ask you all to excuse a Ruby-newbie question. I’m very new to Ruby and, in fact, very new to programing at all. But anyway… I’ve finally finished this program which reads latitude and longitude …

---

## [FILE \* friom C to ruby with swig](https://www.ruby-forum.com/t/file-friom-c-to-ruby-with-swig/146486)

<div class="topic-metadata">

**Author:** [@lyes](https://www.ruby-forum.com/u/lyes)\
**Replies:** 3\
**Last updated:** [August 23, 2008, 9:33am UTC](https://www.ruby-forum.com/t/file-friom-c-to-ruby-with-swig/146486 "2008-08-23T09:33:29Z")

</div>

Hello list, I have written a function which prototype is: FILE \* getContent (void \* objetc, char \* code); This function a FILE \* to a temporary file it fill with user data, and copy in “code” (with strcpy) some st…

---

## [Serializable Continuations in Ruby](https://www.ruby-forum.com/t/serializable-continuations-in-ruby/146626)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 4\
**Last updated:** [August 23, 2008, 8:58am UTC](https://www.ruby-forum.com/t/serializable-continuations-in-ruby/146626 "2008-08-23T08:58:58Z")

</div>

Does anyone know if there are any plans for implementing serializable continuations in the future? I need the feature, and Scheme has it, but I would like to avoid having to learn Scheme if possible. I’m just not a pr…

---

## [Expiration-date 1.0.0 (Stale Green Bacon)](https://www.ruby-forum.com/t/expiration-date-1-0-0-stale-green-bacon/146599)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 8:11am UTC](https://www.ruby-forum.com/t/expiration-date-1-0-0-stale-green-bacon/146599 "2008-08-23T08:11:36Z")

</div>

expiration-date version 1.0.0 by Tim P. http://codeforpeople.rubyforge.org/expiration-date (the “Stale Green Bacon” release) == DESCRIPTION Wandering the grocery aisle the other day I saw a package of bacon with a …

---

## [Rake aborted problem](https://www.ruby-forum.com/t/rake-aborted-problem/146630)

<div class="topic-metadata">

**Author:** [@eric2323223](https://www.ruby-forum.com/u/eric2323223)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 8:04am UTC](https://www.ruby-forum.com/t/rake-aborted-problem/146630 "2008-08-23T08:04:06Z")

</div>

I am new to rails and when I am follow one the rails guide to create a simple application. I got this error. E:\\RoRLab\\toolset\>rake db:migrate --trace (in /cygdrive/e/RoRLab/toolset) \*\* Invoke db:migrate (first\_time) …

---

## [1.9 tail-call optimization status?](https://www.ruby-forum.com/t/1-9-tail-call-optimization-status/146623)

<div class="topic-metadata">

**Author:** [@samoht](https://www.ruby-forum.com/u/samoht)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 6:39am UTC](https://www.ruby-forum.com/t/1-9-tail-call-optimization-status/146623 "2008-08-23T06:39:49Z")

</div>

vm\_opts.h contains: #define OPT\_TAILCALL\_OPTIMIZATION 0 In an interview, ko1 mentioned it should be enabled in 1.9’s release, and needed testing: Gray Soft / Not Found Current Ruby 1.9 (trunk) is not enabled this…

---

## [\[trunk\] fail to compile mingw32 on Cygwin](https://www.ruby-forum.com/t/trunk-fail-to-compile-mingw32-on-cygwin/146618)

<div class="topic-metadata">

**Author:** [@Masaki\_S](https://www.ruby-forum.com/u/Masaki_S)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 2:26am UTC](https://www.ruby-forum.com/t/trunk-fail-to-compile-mingw32-on-cygwin/146618 "2008-08-23T02:26:39Z")

</div>

e$B=uED$G$9!#e(B e$B$9$$$^$;$s!#Js9p$@$1$G$9!#e(B Cygwine$B\>e$G!"e(BCC=‘gcc -mno-cygwin’ e$B$Ge(B mingw32e$BHGe(BRubye$B$r%3%s%Q%$%k$7$h$&$He(B e$B$9$k$H\<:GT$7$^$9!#e(B ./miniruby.exe -I…/…/…/…/svn/ruby/trunk/lib -I…

---

## [\[trunk\] fail to compile on cygwin](https://www.ruby-forum.com/t/trunk-fail-to-compile-on-cygwin/146617)

<div class="topic-metadata">

**Author:** [@Masaki\_S](https://www.ruby-forum.com/u/Masaki_S)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 2:20am UTC](https://www.ruby-forum.com/t/trunk-fail-to-compile-on-cygwin/146617 "2008-08-23T02:20:47Z")

</div>

e$B=uED$G$9!#e(B e$B$9$$$^$;$s!#Js9p$@$1$G$9!#e(B Cygwine$B$Ge(B trunke$B$Ne(BRubye$B$r%3%s%Q%$%k$9$k$H0J2\<$N$h$&$K\<:GT$7$^$9!#e(B This should work unless it involves constant data structures referencing symbols fro…

---

## [1.9, C extension vs encoding](https://www.ruby-forum.com/t/1-9-c-extension-vs-encoding/146402)

<div class="topic-metadata">

**Author:** [@Victor\_SZverokS\_She](https://www.ruby-forum.com/u/Victor_SZverokS_She)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 2:03am UTC](https://www.ruby-forum.com/t/1-9-c-extension-vs-encoding/146402 "2008-08-23T02:03:14Z")

</div>

Hello all. Ruby 1.9. When I create some strings with Russian letters in C extensions, they have str.encoding #=\> #Encoding:ASCII-8BIT while being created in Ruby, they have proper UTF-8. Where is I’m idiot? Thanks. …

---

## [Code Review: bugs-2](https://www.ruby-forum.com/t/code-review-bugs-2/146607)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 12:40am UTC](https://www.ruby-forum.com/t/code-review-bugs-2/146607 "2008-08-23T00:40:11Z")

</div>

tfpt review “/shelveset:bugs-2;REDMOND\\jflam” Comment : Fixes Rubyforge #21069: Array#delete on a frozen array throws a TypeError even if modification doesn’t take place Fixes Array#flatten frozen bug (relate…

---

## [Error requiring action\_mailer - "Text is not a module"](https://www.ruby-forum.com/t/error-requiring-action-mailer-text-is-not-a-module/146608)

<div class="topic-metadata">

**Author:** [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 11:36pm UTC](https://www.ruby-forum.com/t/error-requiring-action-mailer-text-is-not-a-module/146608 "2008-08-22T23:36:26Z")

</div>

Does anyone have gotten this error? require ‘action\_mailer’ C:/ruby/lib/ruby/gems/1.8/gems/actionmailer-2.1.0/lib/action\_mailer/vendor/text-format-0.6.3/text/format.rb:49: Text is not a module (TypeError)

---

## [Warbler: Simple question re: Rack inclusion in deployed Rails vs. Merb apps](https://www.ruby-forum.com/t/warbler-simple-question-re-rack-inclusion-in-deployed-rails-vs-merb-apps/146587)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 3\
**Last updated:** [August 22, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/warbler-simple-question-re-rack-inclusion-in-deployed-rails-vs-merb-apps/146587 "2008-08-22T22:13:12Z")

</div>

I have two simple apps. - one in Rails, one in Merb. The Rack gem is explicitly included in the WAR file for the Merb app, but not for the Rails app. But I am using the RackServlet to serve dynamic requests in both ap…

---

## [Iterating through a hash](https://www.ruby-forum.com/t/iterating-through-a-hash/146412)

<div class="topic-metadata">

**Author:** [@circlefusion](https://www.ruby-forum.com/u/circlefusion)\
**Replies:** 12\
**Last updated:** [August 22, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/iterating-through-a-hash/146412 "2008-08-22T22:02:24Z")

</div>

How can I iterate through a hash so that each key is modified and saved into a new hash? Beginning of code hash = {“name”=\>“greg”, “job”=\>“boring”, “hair”=\>“plenty”} p hash map = hash.each\_key do |key| key.upcase …

---

## [No such file to load -- dbi (LoadError)?](https://www.ruby-forum.com/t/no-such-file-to-load-dbi-loaderror/146602)

<div class="topic-metadata">

**Author:** [@laredotornado](https://www.ruby-forum.com/u/laredotornado)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-dbi-loaderror/146602 "2008-08-22T21:40:55Z")

</div>

Hi, I’m trying to run a ruby script from the command line (using version 1.8.6 on Fedora linus). But this line: require ‘dbi’ is giving me the error: \[me@mymachine\]~/w/easyrx% ruby email.rb /usr/local/lib/ruby/sit…

---

## [Saving the state of a Thread?](https://www.ruby-forum.com/t/saving-the-state-of-a-thread/146581)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 9\
**Last updated:** [August 22, 2008, 9:23pm UTC](https://www.ruby-forum.com/t/saving-the-state-of-a-thread/146581 "2008-08-22T21:23:10Z")

</div>

Hi, Does anyone have any clever ideas on saving the state of a Thread? I have a thread that runs for a couple of hours, and I need to save the progress to disk, so that I can restart from where I left off. Any ideas …

---

## [Code Review: RubyFxCop](https://www.ruby-forum.com/t/code-review-rubyfxcop/146596)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 1\
**Last updated:** [August 22, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/code-review-rubyfxcop/146596 "2008-08-22T20:05:23Z")

</div>

tfpt review “/shelveset:RubyFxCop;REDMOND\\tomat” Enables some FxCop rules for IronRuby.dll and fixes reported issues. Tomas

---

## [ActionMailer,Templates (erb) and aweson\_mail without Rails](https://www.ruby-forum.com/t/actionmailer-templates-erb-and-aweson-mail-without-rails/146593)

<div class="topic-metadata">

**Author:** [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Replies:** 1\
**Last updated:** [August 22, 2008, 7:48pm UTC](https://www.ruby-forum.com/t/actionmailer-templates-erb-and-aweson-mail-without-rails/146593 "2008-08-22T19:48:23Z")

</div>

Hi Rubiceros, I have built an mail delivery system using Action Mailer, it works without rails. I would like to use erb template with it but I’m having problem defining view path for it. I got this: \*Unprocessed vi…

---

## [Temporarily redefine the 'puts' command?](https://www.ruby-forum.com/t/temporarily-redefine-the-puts-command/146585)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 4\
**Last updated:** [August 22, 2008, 6:30pm UTC](https://www.ruby-forum.com/t/temporarily-redefine-the-puts-command/146585 "2008-08-22T18:30:57Z")

</div>

Hi, Is it possible to temporarily redefine the ‘puts’ command? I have a gem that unnecessarily writes to the console, which effects the Rspec Story Runner logging, I do not want to manual comment out the puts as I us…

---

## [Newly created thread blocks all others in Ruby 1.8.7 patchlevel 72 on Cygwin](https://www.ruby-forum.com/t/newly-created-thread-blocks-all-others-in-ruby-1-8-7-patchlevel-72-on-cygwin/146267)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 5\
**Last updated:** [August 22, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/newly-created-thread-blocks-all-others-in-ruby-1-8-7-patchlevel-72-on-cygwin/146267 "2008-08-22T16:31:12Z")

</div>

Hello together, I am using the following Ruby version: ruby 1.8.7 (2008-08-11 patchlevel 72) \[i386-cygwin\] I have problems with threads now that did not occur in Ruby 1.8.6. I execute the following code (derived fro…

---

## [Problem with text wrapping within the div](https://www.ruby-forum.com/t/problem-with-text-wrapping-within-the-div/146560)

<div class="topic-metadata">

**Author:** [@kirankinuforu](https://www.ruby-forum.com/u/kirankinuforu)\
**Replies:** 3\
**Last updated:** [August 22, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/problem-with-text-wrapping-within-the-div/146560 "2008-08-22T16:13:37Z")

</div>

Hi, All I am trying to wrap a longer text within the div. I am using following code. Contents to be displayed This code works fine in Internet explorer, but does not works in mozilla, Please sugge…

---

## [Not generating WSDL file when using actionwebservice?](https://www.ruby-forum.com/t/not-generating-wsdl-file-when-using-actionwebservice/146576)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 3:24pm UTC](https://www.ruby-forum.com/t/not-generating-wsdl-file-when-using-actionwebservice/146576 "2008-08-22T15:24:42Z")

</div>

Hi All, I have a class that extends ActionWebService and is able to generate a wsdl (http://localhost/mycontroller/service.wsdl) Error is: Template is missing Missing template ./script/…/config/…/app/views/mycontrol…

---

## [Issues with Warbler and plugins that make assumptions about structure of Rails app. (e.g ActiveScaff](https://www.ruby-forum.com/t/issues-with-warbler-and-plugins-that-make-assumptions-about-structure-of-rails-app-e-g-activescaff/146514)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 7\
**Last updated:** [August 22, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/issues-with-warbler-and-plugins-that-make-assumptions-about-structure-of-rails-app-e-g-activescaff/146514 "2008-08-22T15:17:15Z")

</div>

Yesterday, I attempted to deploy a Rails application that used ActiveScaffold (hereafter referred to as AS) with Warbler into a JEE container. I ran into a few issues that have to do with the fact that AS and another…

---

## [Wrapper for JRuby on Rails apps](https://www.ruby-forum.com/t/wrapper-for-jruby-on-rails-apps/146556)

<div class="topic-metadata">

**Author:** [@PartogiS\_Joshua](https://www.ruby-forum.com/u/PartogiS_Joshua)\
**Replies:** 2\
**Last updated:** [August 22, 2008, 2:48pm UTC](https://www.ruby-forum.com/t/wrapper-for-jruby-on-rails-apps/146556 "2008-08-22T14:48:31Z")

</div>

Hi all, Just simple question: Has anyone succeed creating a Wrapper for JRuby on Rails apps with WindowsWrapper ? Could you please share it here? I’m having trouble with setting up the wrapper.conf best regards, IM…

---

## [Parser](https://www.ruby-forum.com/t/parser/146535)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [August 22, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/parser/146535 "2008-08-22T13:32:20Z")

</div>

What is Parser??? What is the usage of it??Pls Explain what i meant to say is… what it does actually??

---

## [Nesting exception](https://www.ruby-forum.com/t/nesting-exception/146566)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 4\
**Last updated:** [August 22, 2008, 1:12pm UTC](https://www.ruby-forum.com/t/nesting-exception/146566 "2008-08-22T13:12:51Z")

</div>

Hi I have the following code It is working I have no file named a begin f=File.open(‘a’) rescue Exception =\> exception if exception.message == ‘No such file or directory - a’ puts ’ in first rescue’ else puts ‘in…

---

## [Removing JI features](https://www.ruby-forum.com/t/removing-ji-features/145249)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 6\
**Last updated:** [August 22, 2008, 12:13pm UTC](https://www.ruby-forum.com/t/removing-ji-features/145249 "2008-08-22T12:13:07Z")

</div>

I’m still in the midst of the JI refactoring, and I’m coming across a few places where it seems like features represent enough complexity and enough code that they should just be deleted and reconsidered. Usually thes…

---

## ["num in " in a cool way?](https://www.ruby-forum.com/t/num-in-in-a-cool-way/146429)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 16\
**Last updated:** [August 22, 2008, 9:57am UTC](https://www.ruby-forum.com/t/num-in-in-a-cool-way/146429 "2008-08-22T09:57:42Z")

</div>

Hi, AFAIK in Ruby the only (or the “coolest”) way to do something as: if num in \[1,2,3,4\] is by doing: if \[1,2,3,4\].index(num) Is it? any other “cooler” way? Thanks.

---

## [Using ruby from svn](https://www.ruby-forum.com/t/using-ruby-from-svn/146536)

<div class="topic-metadata">

**Author:** [@john\_maclean](https://www.ruby-forum.com/u/john_maclean)\
**Replies:** 1\
**Last updated:** [August 22, 2008, 9:56am UTC](https://www.ruby-forum.com/t/using-ruby-from-svn/146536 "2008-08-22T09:56:31Z")

</div>

I once built ruby 1.X from source and worked out that I needed to “point it” to where my distribution puts stuff like the gems. Are there any general recommendations for this case? If I am building 1.9 from svn would …

---

## [Want to compare data in two files](https://www.ruby-forum.com/t/want-to-compare-data-in-two-files/146513)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [August 22, 2008, 9:22am UTC](https://www.ruby-forum.com/t/want-to-compare-data-in-two-files/146513 "2008-08-22T09:22:33Z")

</div>

I have two CSV files and i want to find the duplicates records. For ex. Sheet1 Sheet2 Vipul Anthony John Wayne …

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

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