# Ruby

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

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

---

## [Load "/proc/self/fd/#{$stdin.fileno}"](https://www.ruby-forum.com/t/load-proc-self-fd-stdin-fileno/165886)

<div class="topic-metadata">

**Author:** [@samoht](https://www.ruby-forum.com/u/samoht)\
**Replies:** 3\
**Last updated:** [April 23, 2009, 12:11am UTC](https://www.ruby-forum.com/t/load-proc-self-fd-stdin-fileno/165886 "2009-04-23T00:11:00Z")

</div>

Hello, the Ruby code in this article’s subject works for my machine running Ubuntu Linux, but I don’t expect it to work for different operating systems (NetBSD, FreeBSD a.s.o.). How can alternative OS independent Rub…

---

## [Gnuplot timeseries](https://www.ruby-forum.com/t/gnuplot-timeseries/166221)

<div class="topic-metadata">

**Author:** [@robredford](https://www.ruby-forum.com/u/robredford)\
**Replies:** 2\
**Last updated:** [April 23, 2009, 12:02am UTC](https://www.ruby-forum.com/t/gnuplot-timeseries/166221 "2009-04-23T00:02:50Z")

</div>

Does anyone have an example of plotting a timeseries with gnuplot and setting the xrange? Why doesn’t the following snippet work as expected? It produces the attached. require ‘rubygems’ require ‘gnuplot’ require ‘…

---

## [Error when reading file from command prompt](https://www.ruby-forum.com/t/error-when-reading-file-from-command-prompt/166196)

<div class="topic-metadata">

**Author:** [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Replies:** 5\
**Last updated:** [April 22, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/error-when-reading-file-from-command-prompt/166196 "2009-04-22T23:02:41Z")

</div>

Hi. I have a program that is supposed to get a filename at the command prompt. It reads in the input ok but doesn’t initialize to the file. I have more code that takes the file and parses it but I did not paste that b…

---

## [Interop with Excel](https://www.ruby-forum.com/t/interop-with-excel/165041)

<div class="topic-metadata">

**Author:** [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Replies:** 5\
**Last updated:** [April 22, 2009, 10:28pm UTC](https://www.ruby-forum.com/t/interop-with-excel/165041 "2009-04-22T22:28:22Z")

</div>

The following code runs fine: require ‘Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ Excel = Microsoft::office::Interop::Excel but when I try to get the Applicati…

---

## [Debugging in ruby](https://www.ruby-forum.com/t/debugging-in-ruby/165987)

<div class="topic-metadata">

**Author:** [@anilg](https://www.ruby-forum.com/u/anilg)\
**Replies:** 4\
**Last updated:** [April 22, 2009, 10:07pm UTC](https://www.ruby-forum.com/t/debugging-in-ruby/165987 "2009-04-22T22:07:51Z")

</div>

Hi, when I run unittest class, with debugger the flow goes into testcase case class as below. how can i debug only the testscript instead of going into libraries of extended clases Testscript require “test/unit” c…

---

## [Code Review: core/module/autoload](https://www.ruby-forum.com/t/code-review-core-module-autoload/166040)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 4\
**Last updated:** [April 22, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/code-review-core-module-autoload/166040 "2009-04-22T21:18:55Z")

</div>

http://github.com/jschementi/ironruby/commit/bbfa3c4a35cc331e58fb9da9a4097de86ed0dbff autoload uses ‘/’ to join load-path and autoload-path. Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=674 This ma…

---

## [Using JRuby on Rails with GF V2 on Windows... sharing some of my experiences](https://www.ruby-forum.com/t/using-jruby-on-rails-with-gf-v2-on-windows-sharing-some-of-my-experiences/166185)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 3\
**Last updated:** [April 22, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/using-jruby-on-rails-with-gf-v2-on-windows-sharing-some-of-my-experiences/166185 "2009-04-22T21:18:55Z")

</div>

Hi all, I just wanted to share some things we found over the last few months working with JRuby on Rails on Glassfish V2 UR 2 on a Windows 2k3 platform. In fact I added this information to the JRuby wiki so instead o…

---

## [Code Review: Update RubySpec](https://www.ruby-forum.com/t/code-review-update-rubyspec/166129)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 4\
**Last updated:** [April 22, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/code-review-update-rubyspec/166129 "2009-04-22T21:10:06Z")

</div>

I’m updating RubySpec to the newest revision from Git. Most of this is boring stuff; just updating files and rebuilding tags. However, a couple of these commits are code changes to help the specs run smoother. JD …

---

## [Rubygem installation problem](https://www.ruby-forum.com/t/rubygem-installation-problem/166131)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 1\
**Last updated:** [April 22, 2009, 8:37pm UTC](https://www.ruby-forum.com/t/rubygem-installation-problem/166131 "2009-04-22T20:37:02Z")

</div>

I installed ruby 1.8.7 and now I am trying to install rubygem 1.3.2. (red hat linux) Please help me what I am doing wrong. It seems like I didn’t set the path right somewhere. cd rubygem-1.3.2/ ruby setup.rb --prefi…

---

## [Requiring standard libraries within hosted DLR Runtime](https://www.ruby-forum.com/t/requiring-standard-libraries-within-hosted-dlr-runtime/166195)

<div class="topic-metadata">

**Author:** [@dotty](https://www.ruby-forum.com/u/dotty)\
**Replies:** 3\
**Last updated:** [April 22, 2009, 8:27pm UTC](https://www.ruby-forum.com/t/requiring-standard-libraries-within-hosted-dlr-runtime/166195 "2009-04-22T20:27:25Z")

</div>

Hello, I previously tried sending this to the mailing list (on 04/17), but it doesn’t appear to have arrived there. I did a git pull today (04/22/09), and rake compile, so I am using the very latest sources… I’m try…

---

## [Problem with Nokogiri::HTML::Element#line](https://www.ruby-forum.com/t/problem-with-nokogiri-element-line/166168)

<div class="topic-metadata">

**Author:** [@malikb](https://www.ruby-forum.com/u/malikb)\
**Replies:** 2\
**Last updated:** [April 22, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/problem-with-nokogiri-element-line/166168 "2009-04-22T19:57:38Z")

</div>

Hello, I have a problem with Nokogiri::HTML::Element#line, it always returns zero(0): html = Nokogiri::HTML(\<\<eohtml) test test Hello, world! eohtml html.xpath("/html/head/title")\[0\].line # 0 h…

---

## [Create a text file with data custom positioned?](https://www.ruby-forum.com/t/create-a-text-file-with-data-custom-positioned/165994)

<div class="topic-metadata">

**Author:** [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Replies:** 6\
**Last updated:** [April 22, 2009, 7:56pm UTC](https://www.ruby-forum.com/t/create-a-text-file-with-data-custom-positioned/165994 "2009-04-22T19:56:27Z")

</div>

Do you know how to create a text file with data custom positioned? Thanks MC Each column starts on a different position column1 position(0) column2 position(13) column3 position(20) column4 position(28) This is an…

---

## [JRuby problem](https://www.ruby-forum.com/t/jruby-problem/166197)

<div class="topic-metadata">

**Author:** [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Replies:** 3\
**Last updated:** [April 22, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/jruby-problem/166197 "2009-04-22T18:35:02Z")

</div>

Hi,… I’m trying to execute the following lines: ScriptContext sct = jruby.getContext(); jruby.eval(“sheet = Spreadsheet.new”, sct); jruby.eval(“sheet.cells.a1 = ‘Welcome’”, sct); The first two lines are executed cor…

---

## [How to use -X:SaveAssemblies, etc.?](https://www.ruby-forum.com/t/how-to-use-x-saveassemblies-etc/166135)

<div class="topic-metadata">

**Author:** [@vtphysguy](https://www.ruby-forum.com/u/vtphysguy)\
**Replies:** 3\
**Last updated:** [April 22, 2009, 5:47pm UTC](https://www.ruby-forum.com/t/how-to-use-x-saveassemblies-etc/166135 "2009-04-22T17:47:01Z")

</div>

Greetings! Getting into using IronRuby for some command line stuff, and the startup time on ir.exe is killing me. The command line options hint that I can save/reuse assemblies - is that true? Specifically: What doe…

---

## [Any url with documents, articles about how to study Rhtml?](https://www.ruby-forum.com/t/any-url-with-documents-articles-about-how-to-study-rhtml/166125)

<div class="topic-metadata">

**Author:** [@chenpassion](https://www.ruby-forum.com/u/chenpassion)\
**Replies:** 5\
**Last updated:** [April 22, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/any-url-with-documents-articles-about-how-to-study-rhtml/166125 "2009-04-22T17:35:45Z")

</div>

I am new to Rails and I would like to study the Rhtml grammar and practice the basic elements in Rhtml. But I can’t find enough resource for my study. Would any guys show some great blog or documents or articles to m…

---

## [How to test for existence of a method](https://www.ruby-forum.com/t/how-to-test-for-existence-of-a-method/166140)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 7\
**Last updated:** [April 22, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/how-to-test-for-existence-of-a-method/166140 "2009-04-22T17:25:45Z")

</div>

I’m a little stumped on this one. I looked at several ideas, and none panned out. I have a string, which may name a method in a module required by my program. How can I test programmatically to see if the method actu…

---

## [RUBYLIB environment variable?](https://www.ruby-forum.com/t/rubylib-environment-variable/166161)

<div class="topic-metadata">

**Author:** [@Andrew\_SSTownley](https://www.ruby-forum.com/u/Andrew_SSTownley)\
**Replies:** 2\
**Last updated:** [April 22, 2009, 4:59pm UTC](https://www.ruby-forum.com/t/rubylib-environment-variable/166161 "2009-04-22T16:59:52Z")

</div>

Hi, I did some Googling, but I didn’t see anything about this particular issue. It seems that IronRuby (the latest release from rubyforge) ignores the RUBYLIB environment variable, leaving $: set to the default. The…

---

## [Best/better way of md5suming of really large file in ruby?](https://www.ruby-forum.com/t/best-better-way-of-md5suming-of-really-large-file-in-ruby/166178)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 4\
**Last updated:** [April 22, 2009, 4:52pm UTC](https://www.ruby-forum.com/t/best-better-way-of-md5suming-of-really-large-file-in-ruby/166178 "2009-04-22T16:52:45Z")

</div>

I’ve got a script that is going through data, and in some cases, generating md5s of the files. Normally this isn’t a problem, but I’ve got a few largish (~2G) files in there, and my script is dying on it. I ran it in…

---

## [Trouble with module/class inheritance](https://www.ruby-forum.com/t/trouble-with-module-class-inheritance/166181)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [April 22, 2009, 4:41pm UTC](https://www.ruby-forum.com/t/trouble-with-module-class-inheritance/166181 "2009-04-22T16:41:06Z")

</div>

I have a class “ForexCASource” that does this: class ForexCASource include Nokogiri::XML def initializer(… … return xchg\_source end Takes an xml source, default set to FOREX\_SITE Returns a nokogiri xml document ob…

---

## [Symlink to Ruby gems?](https://www.ruby-forum.com/t/symlink-to-ruby-gems/166171)

<div class="topic-metadata">

**Author:** [@bazzel](https://www.ruby-forum.com/u/bazzel)\
**Replies:** 0\
**Last updated:** [April 22, 2009, 3:01pm UTC](https://www.ruby-forum.com/t/symlink-to-ruby-gems/166171 "2009-04-22T15:01:32Z")

</div>

Hi all, On Mac OS X I’m running both (MRI) Ruby and JRuby. Instead of having a lot of duplicate gems on my system by installing them for Ruby and JRuby, I was wondering if it’s ok to install them once (sudo gem insta…

---

## [Ruby 1.9 Envycasts: "What You Need To Know", parts 1 and 2](https://www.ruby-forum.com/t/ruby-1-9-envycasts-what-you-need-to-know-parts-1-and-2/166169)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [April 22, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/ruby-1-9-envycasts-what-you-need-to-know-parts-1-and-2/166169 "2009-04-22T14:52:29Z")

</div>

Hi – Rails Envy (the “I’m xxx”, “And I’m Ruby on Rails” people) has produced two Envycasts on Ruby 1.9, featuring me presenting new 1.9 features, some tips, a few pitfalls to watch for if you’re migrating code, and g…

---

## [My book, "The Well-Grounded Rubyist" (PDF)](https://www.ruby-forum.com/t/my-book-the-well-grounded-rubyist-pdf/166111)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 4\
**Last updated:** [April 22, 2009, 2:45pm UTC](https://www.ruby-forum.com/t/my-book-the-well-grounded-rubyist-pdf/166111 "2009-04-22T14:45:26Z")

</div>

Hi all – I’m very happy to announce that my book “The Well-Grounded Rubyist” is now available in PDF. The paper version will follow in a couple of weeks or so. TWGR is an expanded, updated, Ruby-only reworking of my …

---

## [\[noob question\] convert 7 in 07](https://www.ruby-forum.com/t/noob-question-convert-7-in-07/166157)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 6\
**Last updated:** [April 22, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/noob-question-convert-7-in-07/166157 "2009-04-22T14:33:41Z")

</div>

Hi, I would like to display numbers with a 0 before when there is only one char. For exemple if I gets the number 4, I would like to return 04. After looking methods on http://www.ruby-doc.org/core/classes/Fixnum.ht…

---

## [Spreadsheet development](https://www.ruby-forum.com/t/spreadsheet-development/166113)

<div class="topic-metadata">

**Author:** [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Replies:** 3\
**Last updated:** [April 22, 2009, 1:36pm UTC](https://www.ruby-forum.com/t/spreadsheet-development/166113 "2009-04-22T13:36:34Z")

</div>

Hi,… I’d like to create a Spreadsheet model, where I can access cells like the following: sheet = Spreadsheet.new sheet.cells.a1 = ‘Hello’ sheet.cells.b3 = ‘World’ The problem is in how to define cell names to be a…

---

## [Is there a better way to do this?](https://www.ruby-forum.com/t/is-there-a-better-way-to-do-this/166097)

<div class="topic-metadata">

**Author:** [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Replies:** 10\
**Last updated:** [April 22, 2009, 11:09am UTC](https://www.ruby-forum.com/t/is-there-a-better-way-to-do-this/166097 "2009-04-22T11:09:50Z")

</div>

I recently had code which needed to work with the same structure twice, once using the . nomenclature and once with an index into a hash. i.e. in one case I had entries=@log.entry which I would interrogate with: ent…

---

## [Wilson 1.0.1 Released](https://www.ruby-forum.com/t/wilson-1-0-1-released/166152)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [April 22, 2009, 10:29am UTC](https://www.ruby-forum.com/t/wilson-1-0-1-released/166152 "2009-04-22T10:29:55Z")

</div>

wilson version 1.0.1 has been released! http://rubyforge.org/projects/seattlerb Wilson is a pure ruby x86 assembler. No, really. Worst Idea Evar. Why “wilson”? I wanted to name it “metal”, but there is an existing p…

---

## [Sinatra : examples and FRAME](https://www.ruby-forum.com/t/sinatra-examples-and-frame/165983)

<div class="topic-metadata">

**Author:** [@randy](https://www.ruby-forum.com/u/randy)\
**Replies:** 2\
**Last updated:** [April 22, 2009, 10:11am UTC](https://www.ruby-forum.com/t/sinatra-examples-and-frame/165983 "2009-04-22T10:11:47Z")

</div>

Hi, I’m working on Sinatra for days. The ‘book’ and the ‘FAQ’ are clear but haven’t real examples. I use only “dbi” for database, I’m using Oracle with real tables. On a page, I have a FORM and below I would see the …

---

## [Python on LLVM](https://www.ruby-forum.com/t/python-on-llvm/165231)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 16\
**Last updated:** [April 22, 2009, 9:28am UTC](https://www.ruby-forum.com/t/python-on-llvm/165231 "2009-04-22T09:28:22Z")

</div>

Python on LLVM. Thought it might be interesting to some folks here: On a related note, regarding Perl, LLVM and performance: http://use.perl.org/~Matts/journal/38786 Regards, Dan

---

## [Create custom jruby-complete.jar](https://www.ruby-forum.com/t/create-custom-jruby-complete-jar/166116)

<div class="topic-metadata">

**Author:** [@roytruelove](https://www.ruby-forum.com/u/roytruelove)\
**Replies:** 3\
**Last updated:** [April 22, 2009, 8:36am UTC](https://www.ruby-forum.com/t/create-custom-jruby-complete-jar/166116 "2009-04-22T08:36:50Z")

</div>

Hello all, I’ve read rumors that this is possible, but I haven’t been able to find instructions: how do I build a custom jruby-complete.jar (i.e. including gems that are not part of the standard jruby-complete.jar). T…

---

## [Gtk container add/remove malfunction](https://www.ruby-forum.com/t/gtk-container-add-remove-malfunction/166106)

<div class="topic-metadata">

**Author:** [@dotty](https://www.ruby-forum.com/u/dotty)\
**Replies:** 3\
**Last updated:** [April 22, 2009, 8:02am UTC](https://www.ruby-forum.com/t/gtk-container-add-remove-malfunction/166106 "2009-04-22T08:02:26Z")

</div>

i’m trying to remove and add a widget to a container when an event occur. removing and adding works outside the event, but only removing works within list = Gtk::ComboBox.new list.signal\_connect(“changed”) do @optio…

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

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