# Ruby

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

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

---

## [\[Backport #1655\](Closed) fdiv $B$N;HMQ$G(B Segmentation fault $B$,H/@8$9$k(B](https://www.ruby-forum.com/t/backport-1655-closed-fdiv-b-n-hmq-g-b-segmentation-fault-b-h-8-9-k-b/179843)

<div class="topic-metadata">

**Author:** [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Replies:** 0\
**Last updated:** [December 5, 2009, 2:49am UTC](https://www.ruby-forum.com/t/backport-1655-closed-fdiv-b-n-hmq-g-b-segmentation-fault-b-h-8-9-k-b/179843 "2009-12-05T02:49:39Z")

</div>

e$B%A%1%C%He(B #1655 e$B$,99?7$5$l$^$7$?!#e(B (by Yuki S.) e$B%9%F!\<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B merged at r23801. http://redmine.ruby-lang.org/issues/show/1655

---

## [Tempfile naming](https://www.ruby-forum.com/t/tempfile-naming/179835)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [December 5, 2009, 1:42am UTC](https://www.ruby-forum.com/t/tempfile-naming/179835 "2009-12-05T01:42:44Z")

</div>

Is there any way to influence/control the naming of a Tempfile file? Thanks, Wes

---

## [Finding an element in an array of hashes](https://www.ruby-forum.com/t/finding-an-element-in-an-array-of-hashes/179829)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 3\
**Last updated:** [December 5, 2009, 12:24am UTC](https://www.ruby-forum.com/t/finding-an-element-in-an-array-of-hashes/179829 "2009-12-05T00:24:29Z")

</div>

Hi, I have an array of Facebooker::User objects so friends.class = Array and friends\[1\].class = Facebooker::User Facebooker::User objects which are basically hashes. each friend has a unique facebook\_id so friends\[…

---

## [Equivalent of Python's virtualenv](https://www.ruby-forum.com/t/equivalent-of-pythons-virtualenv/179831)

<div class="topic-metadata">

**Author:** [@vineire77](https://www.ruby-forum.com/u/vineire77)\
**Replies:** 3\
**Last updated:** [December 4, 2009, 11:24pm UTC](https://www.ruby-forum.com/t/equivalent-of-pythons-virtualenv/179831 "2009-12-04T23:24:12Z")

</div>

Does anyone know of a Ruby equivalent of Python’s virtualenv? I need to start getting up to speed on some stuff and think this would be a great way to do it… Safely. Thanks in advance.

---

## [Ruby language parser in ruby](https://www.ruby-forum.com/t/ruby-language-parser-in-ruby/179581)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 26\
**Last updated:** [December 4, 2009, 10:45pm UTC](https://www.ruby-forum.com/t/ruby-language-parser-in-ruby/179581 "2009-12-04T22:45:24Z")

</div>

I’m looking for a ruby language parser written in ruby, that I can hack to play about with generating other ruby-like languages. I’ve found RubyParser. Are there any other options I should be looking at? I see ruby…

---

## [Ffi-glpk extension demonstrator bugs with jruby-1.4](https://www.ruby-forum.com/t/ffi-glpk-extension-demonstrator-bugs-with-jruby-1-4/179018)

<div class="topic-metadata">

**Author:** [@Diamantini\_Maurice](https://www.ruby-forum.com/u/Diamantini_Maurice)\
**Replies:** 2\
**Last updated:** [December 4, 2009, 9:40pm UTC](https://www.ruby-forum.com/t/ffi-glpk-extension-demonstrator-bugs-with-jruby-1-4/179018 "2009-12-04T21:40:01Z")

</div>

Bonjour à tous, Some month ago, i tested an ffi-glpk validator. The full test files are available from the original announce: \[annonce\] ffi-glpk extension demonstrator for jruby - JRuby - Ruby-Forum Or directly at: h…

---

## [System function using variables from fieldset](https://www.ruby-forum.com/t/system-function-using-variables-from-fieldset/179788)

<div class="topic-metadata">

**Author:** [@musty](https://www.ruby-forum.com/u/musty)\
**Replies:** 7\
**Last updated:** [December 4, 2009, 8:26pm UTC](https://www.ruby-forum.com/t/system-function-using-variables-from-fieldset/179788 "2009-12-04T20:26:51Z")

</div>

Hey everyone…trying to get a handle on Ruby syntax but having a bit of an issue. I am trying to create a form and then call a linux system call that will create a directory using the value of the variable within the f…

---

## [Rails on JRuby, activerecord-jdbc-adapter, db2 boolean type](https://www.ruby-forum.com/t/rails-on-jruby-activerecord-jdbc-adapter-db2-boolean-type/179046)

<div class="topic-metadata">

**Author:** [@Andy\_Hu](https://www.ruby-forum.com/u/Andy_Hu)\
**Replies:** 14\
**Last updated:** [December 4, 2009, 7:33pm UTC](https://www.ruby-forum.com/t/rails-on-jruby-activerecord-jdbc-adapter-db2-boolean-type/179046 "2009-12-04T19:33:35Z")

</div>

Hi All, Has anyone worked on project based on Rails on JRuby and db2 database? As we know db2 has no native boolean type, I thought activerecord-jdbc-adapter can convert it automatically. But actually as Nick repl…

---

## [Development of Ruby VMs](https://www.ruby-forum.com/t/development-of-ruby-vms/179713)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 7\
**Last updated:** [December 4, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/development-of-ruby-vms/179713 "2009-12-04T19:30:40Z")

</div>

Hi, I had heard of most of the mentioned projects once but is impressive to see them all in a single list: it’s longer than I would have guessed! http://www.igvita.com/2009/11/20/state-of-ruby-vms-ruby-renaissance/ C…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/179822)

<div class="topic-metadata">

**Author:** [@Javier\_Charne](https://www.ruby-forum.com/u/Javier_Charne)\
**Replies:** 0\
**Last updated:** [December 4, 2009, 7:03pm UTC](https://www.ruby-forum.com/t/unsubscribe/179822 "2009-12-04T19:03:09Z")

</div>

unsubscribe removed\_email\_address@domain.invalid

---

## [Graphics mode again](https://www.ruby-forum.com/t/graphics-mode-again/179814)

<div class="topic-metadata">

**Author:** [@diabolator2](https://www.ruby-forum.com/u/diabolator2)\
**Replies:** 14\
**Last updated:** [December 4, 2009, 7:01pm UTC](https://www.ruby-forum.com/t/graphics-mode-again/179814 "2009-12-04T19:01:52Z")

</div>

Hi, all! here is my prog: it calculates the trajectory of a cannon shell: puts " give angle(degrees): " angle = gets puts " give speed(km/h)" speed = gets puts " convert degrees to radian: " angle = angle.to\_f…

---

## [Const\_defined?](https://www.ruby-forum.com/t/const-defined/179821)

<div class="topic-metadata">

**Author:** [@sshaikh](https://www.ruby-forum.com/u/sshaikh)\
**Replies:** 1\
**Last updated:** [December 4, 2009, 5:30pm UTC](https://www.ruby-forum.com/t/const-defined/179821 "2009-12-04T17:30:40Z")

</div>

Hi all, Why would const-defined? as used below throw a NameError? Surely the whole point of the method is to tell you what isn’t defined? Or are we supposed to look for an exception instead of false? If so, what’s t…

---

## [Using heredoc string in erb](https://www.ruby-forum.com/t/using-heredoc-string-in-erb/179809)

<div class="topic-metadata">

**Author:** [@jakemiles](https://www.ruby-forum.com/u/jakemiles)\
**Replies:** 8\
**Last updated:** [December 4, 2009, 5:26pm UTC](https://www.ruby-forum.com/t/using-heredoc-string-in-erb/179809 "2009-12-04T17:26:30Z")

</div>

Hi. I’d like to use heredoc notation in an erb view (I’m using Merb, but I believe this is an erb issue, not specific to merb). For example, I wrote a helper function that lets me use syntax like that below. Howeve…

---

## [Rake Environment variables gone missing](https://www.ruby-forum.com/t/rake-environment-variables-gone-missing/179673)

<div class="topic-metadata">

**Author:** [@hermans](https://www.ruby-forum.com/u/hermans)\
**Replies:** 6\
**Last updated:** [December 4, 2009, 5:07pm UTC](https://www.ruby-forum.com/t/rake-environment-variables-gone-missing/179673 "2009-12-04T17:07:13Z")

</div>

I posted this about six months ago but the form seems to have gone missing. Unfortunately, I have been sent back to work on the project from hell and am running into the same issue. The previous posts didn’t produce …

---

## [Windows 7 can't install rails](https://www.ruby-forum.com/t/windows-7-cant-install-rails/179341)

<div class="topic-metadata">

**Author:** [@dale](https://www.ruby-forum.com/u/dale)\
**Replies:** 6\
**Last updated:** [December 4, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/windows-7-cant-install-rails/179341 "2009-12-04T16:42:05Z")

</div>

I’m sorry to be so ignorant, but; I can’t seem to get started and learn more. c:\\ruby\\bin\>gem install rails ERROR: While executing gem … (Gem::RemoteSourceException) HTTP Response 403 c:\\ruby\\bin\>gem list --remote …

---

## [Increment/decrement](https://www.ruby-forum.com/t/increment-decrement/179813)

<div class="topic-metadata">

**Author:** [@diabolator2](https://www.ruby-forum.com/u/diabolator2)\
**Replies:** 4\
**Last updated:** [December 4, 2009, 2:26pm UTC](https://www.ruby-forum.com/t/increment-decrement/179813 "2009-12-04T14:26:16Z")

</div>

what is Ruby’s style of increment/decrement? I mean like in C++ someVar++ or someVar–

---

## [\[Bug:1.8\] Re: Ruby:r25230 (ruby\_1\_8, trunk): \* marshal.c (struct {dump,load}\_arg): manage with dfree](https://www.ruby-forum.com/t/bug-1-8-re-ruby-r25230-ruby-1-8-trunk-marshal-c-struct-dump-load-arg-manage-with-dfree/179189)

<div class="topic-metadata">

**Author:** [@Urabe\_S](https://www.ruby-forum.com/u/Urabe_S)\
**Replies:** 1\
**Last updated:** [December 4, 2009, 1:57pm UTC](https://www.ruby-forum.com/t/bug-1-8-re-ruby-r25230-ruby-1-8-trunk-marshal-c-struct-dump-load-arg-manage-with-dfree/179189 "2009-12-04T13:57:35Z")

</div>

removed\_email\_address@domain.invalid e$B$5$s$O=q$-$^$7$?e(B: Modified files: branches/ruby\_1\_8/ChangeLog branches/ruby\_1\_8/marshal.c branches/ruby\_1\_8/test/ruby/test\_marshal.rb trunk/ChangeLog trunk/marshal.c tru…

---

## [How to make net-ping thread safe?](https://www.ruby-forum.com/t/how-to-make-net-ping-thread-safe/132034)

<div class="topic-metadata">

**Author:** [@Laurent\_J](https://www.ruby-forum.com/u/Laurent_J)\
**Replies:** 14\
**Last updated:** [December 4, 2009, 11:26am UTC](https://www.ruby-forum.com/t/how-to-make-net-ping-thread-safe/132034 "2009-12-04T11:26:32Z")

</div>

Hi, I’m using the excellent net-ping gem (v 1.2.2 on Ruby 1.8.6 Linux box) from Daniel B. to ping a number of machines on a local area network. I recently refactored my code to use threads and I’m having troubles wit…

---

## [Enumerable ObjectSpace (#222)](https://www.ruby-forum.com/t/enumerable-objectspace-222/177827)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 8\
**Last updated:** [December 4, 2009, 8:01am UTC](https://www.ruby-forum.com/t/enumerable-objectspace-222/177827 "2009-12-04T08:01:42Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this m…

---

## [Ruby script server/console through readline (LoadError)](https://www.ruby-forum.com/t/ruby-script-server-console-through-readline-loaderror/179804)

<div class="topic-metadata">

**Author:** [@prabakar007](https://www.ruby-forum.com/u/prabakar007)\
**Replies:** 0\
**Last updated:** [December 4, 2009, 6:42am UTC](https://www.ruby-forum.com/t/ruby-script-server-console-through-readline-loaderror/179804 "2009-12-04T06:42:27Z")

</div>

i have centos5.1 and ruby version “ruby 1.8.6 (2007-03-13 patchlevel 0) \[x86\_64-linux\]” “gem version 1.3.5” \[root@localhost\]$ script/console ./script/…/config/boot.rb:25:Warning: Gem::SourceIndex#search support for S…

---

## [Racc: when is on\_error called?](https://www.ruby-forum.com/t/racc-when-is-on-error-called/118635)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 1\
**Last updated:** [December 4, 2009, 5:35am UTC](https://www.ruby-forum.com/t/racc-when-is-on-error-called/118635 "2009-12-04T05:35:20Z")

</div>

When is on\_error supposed to be called? Will on\_error be called when the error rule is triggered? After reading the lex/yacc book, it seems as though the error rule is supposed to eat up tokens until it can find a pi…

---

## [Duda sobre nuevo metodo](https://www.ruby-forum.com/t/duda-sobre-nuevo-metodo/179721)

<div class="topic-metadata">

**Author:** [@elegant](https://www.ruby-forum.com/u/elegant)\
**Replies:** 18\
**Last updated:** [December 4, 2009, 4:25am UTC](https://www.ruby-forum.com/t/duda-sobre-nuevo-metodo/179721 "2009-12-04T04:25:25Z")

</div>

mi routers.rb es ActionController::Routing::Routes.draw do |map| map.resources :alergias\_pacientes map.resources :citas, :member =\> { :cambiar\_estado =\> :put } map.resources :citas, :member =\> { :cambiar\_estado\_nov…

---

## [Ruby Challenge for Beginners #4](https://www.ruby-forum.com/t/ruby-challenge-for-beginners-4/179797)

<div class="topic-metadata">

**Author:** [@indianguru](https://www.ruby-forum.com/u/indianguru)\
**Replies:** 0\
**Last updated:** [December 4, 2009, 3:10am UTC](https://www.ruby-forum.com/t/ruby-challenge-for-beginners-4/179797 "2009-12-04T03:10:15Z")

</div>

Ruby beginners: The fourth installment of the Ruby P.ming Challenge for Newbies is now live. The problem has been set by Michael K… There is no Entry Fee. Registration is optional. You stand a chance to win a prize.…

---

## [Have a problem with the loops and variable](https://www.ruby-forum.com/t/have-a-problem-with-the-loops-and-variable/179631)

<div class="topic-metadata">

**Author:** [@magiccoder](https://www.ruby-forum.com/u/magiccoder)\
**Replies:** 19\
**Last updated:** [December 4, 2009, 2:21am UTC](https://www.ruby-forum.com/t/have-a-problem-with-the-loops-and-variable/179631 "2009-12-04T02:21:42Z")

</div>

Hi Friends. My first Code : q = 1 w = 2 while q \< w s1 = 1 puts s1 q += 1 end My last code : q = 1 w = 2 while q \< w s\[q\] = 1 puts s\[q\] q += 1 end Why does not work ?

---

## [Ruby-kerberos](https://www.ruby-forum.com/t/ruby-kerberos/69398)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 6\
**Last updated:** [December 4, 2009, 1:04am UTC](https://www.ruby-forum.com/t/ruby-kerberos/69398 "2009-12-04T01:04:14Z")

</div>

I just put up a first release of kerberos bindings for ruby on rubyforge. The distribution is just a tarball with an extconf.rb, the c extension, some basic rdocs, and examples in example.rb. License is BSD. This i…

---

## [Variable references in yaml files](https://www.ruby-forum.com/t/variable-references-in-yaml-files/179793)

<div class="topic-metadata">

**Author:** [@dara](https://www.ruby-forum.com/u/dara)\
**Replies:** 5\
**Last updated:** [December 4, 2009, 12:42am UTC](https://www.ruby-forum.com/t/variable-references-in-yaml-files/179793 "2009-12-04T00:42:08Z")

</div>

I have been trying to include variable references in a yaml file. I have a feeling it’s not possible to do this, but I thought I’d ask here before giving up. Here is my ruby script: require ‘yaml’ hash = YAML.load\_f…

---

## [JMS Queue Listener with Warbler](https://www.ruby-forum.com/t/jms-queue-listener-with-warbler/179675)

<div class="topic-metadata">

**Author:** [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Replies:** 9\
**Last updated:** [December 4, 2009, 12:07am UTC](https://www.ruby-forum.com/t/jms-queue-listener-with-warbler/179675 "2009-12-04T00:07:00Z")

</div>

We have a rails app we’re packaging with Warbler. We have a JMS queue listener in Ruby that we want to start listening when the app boots in our servlet container (Tomcat). The listener needs access to models and o…

---

## [Feedtools 0.2.29](https://www.ruby-forum.com/t/feedtools-0-2-29/179795)

<div class="topic-metadata">

**Author:** [@Hal\_F](https://www.ruby-forum.com/u/Hal_F)\
**Replies:** 0\
**Last updated:** [December 3, 2009, 11:14pm UTC](https://www.ruby-forum.com/t/feedtools-0-2-29/179795 "2009-12-03T23:14:20Z")

</div>

I suppose this lib may be defunct, but I used it and liked it a few years back. Now I install the gem, and the require doesn’t work. Huh? FYI this is ruby 1.8.7 (2008-08-11 patchlevel 72) \[i686-linux\] Thanks, Hal

---

## [Ruby 1.9.1 gem command - can't find user for 500](https://www.ruby-forum.com/t/ruby-1-9-1-gem-command-cant-find-user-for-500/179787)

<div class="topic-metadata">

**Author:** [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Replies:** 2\
**Last updated:** [December 3, 2009, 10:27pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-gem-command-cant-find-user-for-500/179787 "2009-12-03T22:27:31Z")

</div>

Has anyone else encountered this error or can suggest a way to correct it? These errors occur when running the gem command under ruby 1.9.1. The same error occurs with a different user #(0) when run as root. Under 1.…

---

## [Ruby-1.9.1: require 'rio' fails](https://www.ruby-forum.com/t/ruby-1-9-1-require-rio-fails/179765)

<div class="topic-metadata">

**Author:** [@wybodekker](https://www.ruby-forum.com/u/wybodekker)\
**Replies:** 9\
**Last updated:** [December 3, 2009, 9:34pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-require-rio-fails/179765 "2009-12-03T21:34:15Z")

</div>

Since moving to ruby-1.9.1-p243, when I try to install the rio gem, I get: $ sudo gem install -r rio Successfully installed rio-0.4.2 1 gem installed Installing ri documentation for rio-0.4.2… Updating class cache …

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

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