# Ruby

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

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

---

## [RDoc, gems, and documentation for dynamically generated constants](https://www.ruby-forum.com/t/rdoc-gems-and-documentation-for-dynamically-generated-constants/167174)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 1\
**Last updated:** [May 5, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/rdoc-gems-and-documentation-for-dynamically-generated-constants/167174 "2009-05-05T21:08:24Z")

</div>

Hi, I’ve got a library that dynamically generates constants the moment it’s loaded. It looks something like this at the top of the file: \[‘ALPHA’, ‘BETA’, ‘GAMMA’\].each{ |name| Dir.const\_set(name, 1) } The problem …

---

## [Trying to install fastri-server](https://www.ruby-forum.com/t/trying-to-install-fastri-server/167109)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 2\
**Last updated:** [May 5, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/trying-to-install-fastri-server/167109 "2009-05-05T21:06:02Z")

</div>

Hi - I’m new to Ruby/gems, etc. I wanted to put autocompletion on my irb. I discovered http://eigenclass.org/hiki/fastri and followed directions (or thought I did) to install the fastri gem. The problem is that I keep …

---

## [ANN: Relisp 1.0.0 (rubyfied emacs lisp)](https://www.ruby-forum.com/t/ann-relisp-1-0-0-rubyfied-emacs-lisp/167238)

<div class="topic-metadata">

**Author:** [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 8:47pm UTC](https://www.ruby-forum.com/t/ann-relisp-1-0-0-rubyfied-emacs-lisp/167238 "2009-05-05T20:47:46Z")

</div>

This purpose of Relisp is to: call Ruby from Emacs call Elisp from Ruby manipulate Emacs without using Elisp to some extent (Ruby wrappers around some Elisp functions and objects) reduce the number of blog entries tit…

---

## [Jruby on rails setup](https://www.ruby-forum.com/t/jruby-on-rails-setup/167177)

<div class="topic-metadata">

**Author:** [@glenanderson](https://www.ruby-forum.com/u/glenanderson)\
**Replies:** 2\
**Last updated:** [May 5, 2009, 6:10pm UTC](https://www.ruby-forum.com/t/jruby-on-rails-setup/167177 "2009-05-05T18:10:49Z")

</div>

If I develop a new rails application with both new ruby and java files, where is the ideal place for the java files and the resulting .jar to be placed in the rails directory structure? Also, how do you specify cla…

---

## [Building expressions](https://www.ruby-forum.com/t/building-expressions/167079)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 4\
**Last updated:** [May 5, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/building-expressions/167079 "2009-05-05T17:11:22Z")

</div>

Hi I’m trying to get some Moq mockery going in IronRuby but Moq expects Expression\<Func\<MyObject, TReturn\>\> in his methods. Is there a way to make a RubyProc/lambda return an expression or convert it to an expressio…

---

## [Calling ant from ruby, on windows](https://www.ruby-forum.com/t/calling-ant-from-ruby-on-windows/167217)

<div class="topic-metadata">

**Author:** [@melladh](https://www.ruby-forum.com/u/melladh)\
**Replies:** 2\
**Last updated:** [May 5, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/calling-ant-from-ruby-on-windows/167217 "2009-05-05T16:50:51Z")

</div>

I’ve got a script that I want to run on both osx10.5 and windows xp, though I’ll settle for one script each if that is not possible. My problem is with xp. Note that I’m a beginner to ruby, and I apologize if this is …

---

## [Errno::ENOENT No such file or directory - Workbook](https://www.ruby-forum.com/t/errno-enoent-no-such-file-or-directory-workbook/167214)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/errno-enoent-no-such-file-or-directory-workbook/167214 "2009-05-05T16:15:12Z")

</div>

Hi All, While reading xls file through spreadsheet i get the following error. I am working on linux, and using following gems parseexcel-0.5.2, spreadsheet-0.6.3.1. Errno::ENOENT No such file or directory - Workbook …

---

## [Problem accessing variables in module](https://www.ruby-forum.com/t/problem-accessing-variables-in-module/167129)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 2\
**Last updated:** [May 5, 2009, 4:04pm UTC](https://www.ruby-forum.com/t/problem-accessing-variables-in-module/167129 "2009-05-05T16:04:17Z")

</div>

I keep getting blocked trying to do a very simple thing - I want to “include” - in the sense of causing a mere insertion of text - some variables and methods, residing in an external file, in my main code. I just want…

---

## [Selecting certificate from VBScript popup](https://www.ruby-forum.com/t/selecting-certificate-from-vbscript-popup/167211)

<div class="topic-metadata">

**Author:** [@sindhu\_watir](https://www.ruby-forum.com/u/sindhu_watir)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 3:51pm UTC](https://www.ruby-forum.com/t/selecting-certificate-from-vbscript-popup/167211 "2009-05-05T15:51:09Z")

</div>

Hi, sindhu here.I am using WATIR to automate a web based applicatio.when i select a button in the webpage,I get a VBscript popup(Certificate renew window).Popup has a list of certificate names in it.I want to select …

---

## [Min max program](https://www.ruby-forum.com/t/min-max-program/167194)

<div class="topic-metadata">

**Author:** [@ubermouse](https://www.ruby-forum.com/u/ubermouse)\
**Replies:** 10\
**Last updated:** [May 5, 2009, 12:18pm UTC](https://www.ruby-forum.com/t/min-max-program/167194 "2009-05-05T12:18:01Z")

</div>

I’ve just started using ruby for a programming/math class I’m doing at school. Was asked to write a program that finds sum min max and avge of a random set of numbers. Have managed to write that program but it is over…

---

## [Odd number of arguments in Nokogiri](https://www.ruby-forum.com/t/odd-number-of-arguments-in-nokogiri/167188)

<div class="topic-metadata">

**Author:** [@vikasmaskeri](https://www.ruby-forum.com/u/vikasmaskeri)\
**Replies:** 1\
**Last updated:** [May 5, 2009, 9:55am UTC](https://www.ruby-forum.com/t/odd-number-of-arguments-in-nokogiri/167188 "2009-05-05T09:55:27Z")

</div>

Hi, I am using Nokogiri for parsing HTML pages. The gem parses the tags properly only if the tags are properly closed and also if the attributes are syntacticaly proper. But there seems to be an issue with parsing if …

---

## [Getting an error in Johnson's env.js](https://www.ruby-forum.com/t/getting-an-error-in-johnsons-env-js/167186)

<div class="topic-metadata">

**Author:** [@vikasmaskeri](https://www.ruby-forum.com/u/vikasmaskeri)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 8:29am UTC](https://www.ruby-forum.com/t/getting-an-error-in-johnsons-env-js/167186 "2009-05-05T08:29:54Z")

</div>

Hi, I am trying to use Johnson gem to run javascript without a browser. But the env.js gives me an exception which looks like this /var/lib/gems/1.8/gems/johnson-1.1.0/lib/johnson/spidermonkey/runtime.rb:58:in native…

---

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

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 2\
**Last updated:** [May 5, 2009, 7:05am UTC](https://www.ruby-forum.com/t/code-review-firewallwarning/167182 "2009-05-05T07:05:28Z")

</div>

RESENDING with diff: tfpt review “/shelveset:firewallwarning;REDMOND\\jdeville” Comment : This simple change fixes a firewall warning that gets kicked up in the test lab. The change is simply to change the listening …

---

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

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 7:03am UTC](https://www.ruby-forum.com/t/code-review-irinfo/167181 "2009-05-05T07:03:07Z")

</div>

tfpt review “/shelveset:irinfo;REDMOND\\jdeville” Comment : Tag and other changes to get ironruby.info running again. Also fixes crmail to work with new Merlin External path.

---

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

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 6:46am UTC](https://www.ruby-forum.com/t/code-review-irinfo/167180 "2009-05-05T06:46:10Z")

</div>

tfpt review “/shelveset:irinfo;REDMOND\\jdeville” Comment : Tag and other changes to get ironruby.info running again.

---

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

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 6:25am UTC](https://www.ruby-forum.com/t/code-review-firewallwarning/167178 "2009-05-05T06:25:07Z")

</div>

tfpt review “/shelveset:firewallwarning;REDMOND\\jdeville” Comment : This simple change fixes a firewall warning that gets kicked up when running Net::HTTP specs. The change is simply to change the listening address …

---

## [Re: Clr Interop and private member variables](https://www.ruby-forum.com/t/re-clr-interop-and-private-member-variables/167172)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 2:00am UTC](https://www.ruby-forum.com/t/re-clr-interop-and-private-member-variables/167172 "2009-05-05T02:00:50Z")

</div>

If you don’t mind running debug, you can also use -X:PrivateBindings

---

## [Clr Interop and private member variables](https://www.ruby-forum.com/t/clr-interop-and-private-member-variables/167170)

<div class="topic-metadata">

**Author:** [@Orion\_E](https://www.ruby-forum.com/u/Orion_E)\
**Replies:** 4\
**Last updated:** [May 5, 2009, 1:57am UTC](https://www.ruby-forum.com/t/clr-interop-and-private-member-variables/167170 "2009-05-05T01:57:19Z")

</div>

I have the following C# class namespace MyNamespace { public class MyObject { private string m\_Name; } } and I’m extending it from IronRuby class MyNameSpace::MyObject def printme puts m\_Name end end When I…

---

## [Accessing one class from another class](https://www.ruby-forum.com/t/accessing-one-class-from-another-class/167166)

<div class="topic-metadata">

**Author:** [@paerez](https://www.ruby-forum.com/u/paerez)\
**Replies:** 5\
**Last updated:** [May 5, 2009, 12:40am UTC](https://www.ruby-forum.com/t/accessing-one-class-from-another-class/167166 "2009-05-05T00:40:21Z")

</div>

Hello, All. I’m trying to consuming an xml file and map it to a Ruby object that would describe that xml file. What would be the best way to implement the following scenario. Let’s say I have several classes: Student…

---

## [RUBYOPT: Where is it (env) defined?](https://www.ruby-forum.com/t/rubyopt-where-is-it-env-defined/167000)

<div class="topic-metadata">

**Author:** [@ric](https://www.ruby-forum.com/u/ric)\
**Replies:** 5\
**Last updated:** [May 4, 2009, 10:23pm UTC](https://www.ruby-forum.com/t/rubyopt-where-is-it-env-defined/167000 "2009-05-04T22:23:04Z")

</div>

I need to remove the RUBYOPT variable from the environment so I can install MacRuby. I’ve checked all my (local) environment (dot) files. I can’t find any RUBYOPT env variable definition. In fact, it is global, sinc…

---

## [Glassfish Log turnover problem](https://www.ruby-forum.com/t/glassfish-log-turnover-problem/167052)

<div class="topic-metadata">

**Author:** [@Joseph\_A](https://www.ruby-forum.com/u/Joseph_A)\
**Replies:** 7\
**Last updated:** [May 4, 2009, 9:09pm UTC](https://www.ruby-forum.com/t/glassfish-log-turnover-problem/167052 "2009-05-04T21:09:40Z")

</div>

I’m working on getting an application working with the glassfish gem but I’m having an issue with how it handles log files. It looks like glassfish is rolling over my log files at the 2MB but it will not create a ne…

---

## [Time class instance](https://www.ruby-forum.com/t/time-class-instance/166415)

<div class="topic-metadata">

**Author:** [@jirapong](https://www.ruby-forum.com/u/jirapong)\
**Replies:** 6\
**Last updated:** [May 4, 2009, 9:03pm UTC](https://www.ruby-forum.com/t/time-class-instance/166415 "2009-05-04T21:03:48Z")

</div>

Hi Time class instance in IronRuby act as static. Given following code: t = Time.new t.utc t.utc? # should be true behave t.localtime t.utc? # should be false “t” should convert itself into UTC type after method “…

---

## [TypeError thrown in DynamicMetaObjectBinder.Bind](https://www.ruby-forum.com/t/typeerror-thrown-in-dynamicmetaobjectbinder-bind/167078)

<div class="topic-metadata">

**Author:** [@murena](https://www.ruby-forum.com/u/murena)\
**Replies:** 3\
**Last updated:** [May 4, 2009, 8:29pm UTC](https://www.ruby-forum.com/t/typeerror-thrown-in-dynamicmetaobjectbinder-bind/167078 "2009-05-04T20:29:44Z")

</div>

Hi, I’m reviewing ironruby-hpricot to clean up its code but I’ve just noticed that something has changed in IronRuby since I last tested my library. Please refer to the the following gist for a simplified test case t…

---

## [Setting up cygwin on windows or linux it?](https://www.ruby-forum.com/t/setting-up-cygwin-on-windows-or-linux-it/166882)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 18\
**Last updated:** [May 4, 2009, 7:46pm UTC](https://www.ruby-forum.com/t/setting-up-cygwin-on-windows-or-linux-it/166882 "2009-05-04T19:46:17Z")

</div>

Due to some gems not working for windows im considering either installing cygwin or even going as far as installing linux (linux isnt the evil here, its the partioning and a whole sunday spent figuring out stuff). Id…

---

## [ANN: Sequel 3.0.0 Released](https://www.ruby-forum.com/t/ann-sequel-3-0-0-released/167151)

<div class="topic-metadata">

**Author:** [@nerdmaster](https://www.ruby-forum.com/u/nerdmaster)\
**Replies:** 0\
**Last updated:** [May 4, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/ann-sequel-3-0-0-released/167151 "2009-05-04T19:36:45Z")

</div>

Sequel is a lightweight database access toolkit for Ruby. Sequel provides thread safety, connection pooling and a concise DSL for constructing database queries and table schemas. Sequel also includes a lightweight but…

---

## [String#hash changed in Ruby 1.9?](https://www.ruby-forum.com/t/string-hash-changed-in-ruby-1-9/167138)

<div class="topic-metadata">

**Author:** [@dpitman](https://www.ruby-forum.com/u/dpitman)\
**Replies:** 4\
**Last updated:** [May 4, 2009, 7:15pm UTC](https://www.ruby-forum.com/t/string-hash-changed-in-ruby-1-9/167138 "2009-05-04T19:15:46Z")

</div>

Hi all, in ruby 1.8.7: david@trince ~$ ruby -e ‘puts “abc”.hash’ 833038373 david@trince ~$ ruby -e ‘puts “abc”.hash’ 833038373 david@trince ~$ ruby -e ‘puts “abc”.hash’ 833038373 \[always the same number\] in ruby…

---

## [String problem](https://www.ruby-forum.com/t/string-problem/167071)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 13\
**Last updated:** [May 4, 2009, 6:02pm UTC](https://www.ruby-forum.com/t/string-problem/167071 "2009-05-04T18:02:42Z")

</div>

What wrong? irb irb(main):001:0\> xxx = “Ð»Ð¾ÑˆÐ°Ð´ÑŒ” =\> “\\320\\273\\320\\276\\321\\210\\320\\260\\320\\264\\321\\214” irb(main):002:0\> xxx.length =\> 12

---

## [Lazy lookup](https://www.ruby-forum.com/t/lazy-lookup/167036)

<div class="topic-metadata">

**Author:** [@samoht](https://www.ruby-forum.com/u/samoht)\
**Replies:** 4\
**Last updated:** [May 4, 2009, 5:04pm UTC](https://www.ruby-forum.com/t/lazy-lookup/167036 "2009-05-04T17:04:15Z")

</div>

Hello, how about the following implementation for lazy lookups? def define\_lookup h = lambda{ |k| h = {} # … fill h (expensive!) … h\[k\] } self.class.class\_eval{ define\_method(:lookup){ |k| h\[k\] } } end Once def…

---

## [Ruby.h (et al.) documentation for D bindings](https://www.ruby-forum.com/t/ruby-h-et-al-documentation-for-d-bindings/167139)

<div class="topic-metadata">

**Author:** [@Tomash](https://www.ruby-forum.com/u/Tomash)\
**Replies:** 1\
**Last updated:** [May 4, 2009, 4:35pm UTC](https://www.ruby-forum.com/t/ruby-h-et-al-documentation-for-d-bindings/167139 "2009-05-04T16:35:55Z")

</div>

Hi, I’m writing a library for developing Ruby native extensions in D language One of the most important parts of it is a set of bindings – ruby.d converted from ruby.h via a special program for that (D language can…

---

## [Ruby-odbc on shared linux host](https://www.ruby-forum.com/t/ruby-odbc-on-shared-linux-host/167137)

<div class="topic-metadata">

**Author:** [@redct](https://www.ruby-forum.com/u/redct)\
**Replies:** 0\
**Last updated:** [May 4, 2009, 4:24pm UTC](https://www.ruby-forum.com/t/ruby-odbc-on-shared-linux-host/167137 "2009-05-04T16:24:14Z")

</div>

Has anyone managed to install ruby-odbc on a shared linux host (non-root access)? Generally the standard is to configure using a --prefix option (–prefix=$HOME/local/project) to set the install/configuration location…

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

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