# Ruby

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

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

---

## [Installed gems yet "no such file to load"](https://www.ruby-forum.com/t/installed-gems-yet-no-such-file-to-load/177823)

<div class="topic-metadata">

**Author:** [@fozbaca](https://www.ruby-forum.com/u/fozbaca)\
**Replies:** 0\
**Last updated:** [October 24, 2009, 5:19pm UTC](https://www.ruby-forum.com/t/installed-gems-yet-no-such-file-to-load/177823 "2009-10-24T17:19:53Z")

</div>

Some gems load, some don’t, whether using irb or rake migrate. The example below is using irb. Please take a glance at the following, I’ve been reading all over the net for two days and nothing seems to jive. I’ve h…

---

## [Can you implement a better IO#each\_lines?](https://www.ruby-forum.com/t/can-you-implement-a-better-io-each-lines/177814)

<div class="topic-metadata">

**Author:** [@haoqi](https://www.ruby-forum.com/u/haoqi)\
**Replies:** 4\
**Last updated:** [October 24, 2009, 2:19pm UTC](https://www.ruby-forum.com/t/can-you-implement-a-better-io-each-lines/177814 "2009-10-24T14:19:24Z")

</div>

like this,thanks #!/usr/bin/env ruby class IO def each\_lines(n) run=true while run lines=\[\] n.times{ ln = self.gets unless ln run=false break else lines\<\<ln.chomp end } yield lines unless lines.empty? en…

---

## [Setting attribute via send in Ruby 1.8.6](https://www.ruby-forum.com/t/setting-attribute-via-send-in-ruby-1-8-6/177782)

<div class="topic-metadata">

**Author:** [@cmcfab](https://www.ruby-forum.com/u/cmcfab)\
**Replies:** 6\
**Last updated:** [October 24, 2009, 10:33am UTC](https://www.ruby-forum.com/t/setting-attribute-via-send-in-ruby-1-8-6/177782 "2009-10-24T10:33:59Z")

</div>

Using Ruby 1.8.6. I’ve run into an instance in which I’d like to set attributes of an instance using the send method. I’ve looked around, but found nothing, most likely because I’m using the wrong search terms. Exam…

---

## [Code Review: PrePostMatchFix](https://www.ruby-forum.com/t/code-review-prepostmatchfix/177808)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [October 24, 2009, 2:45am UTC](https://www.ruby-forum.com/t/code-review-prepostmatchfix/177808 "2009-10-24T02:45:53Z")

</div>

tfpt review “/shelveset:PrePostMatchFix;REDMOND\\tomat” Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1483. Tomas

---

## [Ruby-oci8 2.0.3 and 1.0.7](https://www.ruby-forum.com/t/ruby-oci8-2-0-3-and-1-0-7/177660)

<div class="topic-metadata">

**Author:** [@kubo](https://www.ruby-forum.com/u/kubo)\
**Replies:** 1\
**Last updated:** [October 24, 2009, 1:47am UTC](https://www.ruby-forum.com/t/ruby-oci8-2-0-3-and-1-0-7/177660 "2009-10-24T01:47:57Z")

</div>

Ruby-oci8 2.0.3 and 1.0.7 are released. These are Oracle modules using OCI8 API. http://rubyforge.org/projects/ruby-oci8/ Ruby-oci8 2.0.3 is stable from this release. Imcompatible changes will be done from now. An ex…

---

## [\[Code Review\] Silverlight fixes](https://www.ruby-forum.com/t/code-review-silverlight-fixes/177805)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 0\
**Last updated:** [October 24, 2009, 1:13am UTC](https://www.ruby-forum.com/t/code-review-silverlight-fixes/177805 "2009-10-24T01:13:25Z")

</div>

Here’s a bunch of Silverlight fixes, mainly related to porting gestalt to Microsoft.Scripting.Silverlight. Here are some live demos: http://ironruby.com/gestalt. I also fixed a pretty annoying tutorial scrolling bug, …

---

## [Net:HTTP Timeout Bug](https://www.ruby-forum.com/t/net-http-timeout-bug/177729)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 1\
**Last updated:** [October 24, 2009, 1:08am UTC](https://www.ruby-forum.com/t/net-http-timeout-bug/177729 "2009-10-24T01:08:12Z")

</div>

When I do an HTTP get on a URL that doesn’t exist using NET:HTTP, the read\_timeout value is ignored and the connection stays open forever. I read somewhere that this is a known bug (Bug #949) but I was trying to do a …

---

## [Rdoc](https://www.ruby-forum.com/t/rdoc/174795)

<div class="topic-metadata">

**Author:** [@Oleg\_P](https://www.ruby-forum.com/u/Oleg_P)\
**Replies:** 16\
**Last updated:** [October 24, 2009, 1:03am UTC](https://www.ruby-forum.com/t/rdoc/174795 "2009-10-24T01:03:54Z")

</div>

Hello ! I want have HTML’d documentation for ruby 1.9.x, but rdoc go awhile. What is wrong ? $ rm -fr ./doc $ /opt/rubysvn/bin/rdoc Oleg.

---

## [Code Review: Interop specs](https://www.ruby-forum.com/t/code-review-interop-specs/177785)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 2\
**Last updated:** [October 24, 2009, 12:13am UTC](https://www.ruby-forum.com/t/code-review-interop-specs/177785 "2009-10-24T00:13:06Z")

</div>

Looking for code review on the following commits. These are net-interop binding specs and bug regression specs. Thanks, JD remove extraneous 1 filehttp://github.com/jredville/ironruby/commit/98aaf7353c6d380…

---

## [Setting RAILS\_ENV from a jvm option?](https://www.ruby-forum.com/t/setting-rails-env-from-a-jvm-option/177792)

<div class="topic-metadata">

**Author:** [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/setting-rails-env-from-a-jvm-option/177792 "2009-10-23T23:32:08Z")

</div>

I realize this is a Rails specific question - but it’s also specific to jRuby, so I’m hoping someone can help me out as I haven’t found an answer via google yet. We run development, staging, preview and production se…

---

## [Anyone use LineCache::remap\_file or LineCache::unmap\_file?](https://www.ruby-forum.com/t/anyone-use-linecache-remap-file-or-linecache-unmap-file/177802)

<div class="topic-metadata">

**Author:** [@rocky](https://www.ruby-forum.com/u/rocky)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/anyone-use-linecache-remap-file-or-linecache-unmap-file/177802 "2009-10-23T23:13:24Z")

</div>

I’ve just started using these methods in Ruby 1.9 and believe I got the API wrong previously. Instead of remap\_file(old\_name, new\_name) I have remap\_file(new\_name, old\_name). And what I had previously called “unmap”,…

---

## [Code Review: Types2](https://www.ruby-forum.com/t/code-review-types2/177800)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 9:57pm UTC](https://www.ruby-forum.com/t/code-review-types2/177800 "2009-10-23T21:57:17Z")

</div>

tfpt review “/shelveset:Types2;REDMOND\\tomat” DLR: The overload resolver should handle a candidate set with no callable method (e.g. have unbound generic parameter). Adds a BindingResult value that indicates such cas…

---

## [Using Java-inherited JRuby classes from Java](https://www.ruby-forum.com/t/using-java-inherited-jruby-classes-from-java/177797)

<div class="topic-metadata">

**Author:** [@mark42](https://www.ruby-forum.com/u/mark42)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 9:41pm UTC](https://www.ruby-forum.com/t/using-java-inherited-jruby-classes-from-java/177797 "2009-10-23T21:41:29Z")

</div>

Hi, I want to write a plug-in for a Java framework using JRuby. The plug-in mechanism works by extending a Java class. Is there a way to accomplish that without using ugly glue code (a.l.a. http://kenai.com/projects…

---

## [JRuby and Java serialization](https://www.ruby-forum.com/t/jruby-and-java-serialization/161789)

<div class="topic-metadata">

**Author:** [@marabout](https://www.ruby-forum.com/u/marabout)\
**Replies:** 4\
**Last updated:** [October 23, 2009, 9:02pm UTC](https://www.ruby-forum.com/t/jruby-and-java-serialization/161789 "2009-10-23T21:02:16Z")

</div>

Hi, I am trying to produce a small Ruby DSL above a Java library that requires some objects to be Serializable. However, I am facing problems when a JRuby class extends a Java Serializable class. For example: #---- …

---

## [Statically link a rubygem? (Rubygame)](https://www.ruby-forum.com/t/statically-link-a-rubygem-rubygame/177787)

<div class="topic-metadata">

**Author:** [@ravishi](https://www.ruby-forum.com/u/ravishi)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 8:58pm UTC](https://www.ruby-forum.com/t/statically-link-a-rubygem-rubygame/177787 "2009-10-23T20:58:45Z")

</div>

Is there a way to statically link a rubygem? I want to play with Rubygame in my handheld. I can build ruby to it, but how will I use Rubygame? I think that I can embedd a ruby interpreter in a program and use Rubygam…

---

## [Jruby on windows bug](https://www.ruby-forum.com/t/jruby-on-windows-bug/177726)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 5\
**Last updated:** [October 23, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/jruby-on-windows-bug/177726 "2009-10-23T20:24:47Z")

</div>

C:\\installs\\jruby-1.4.0RC1\\bin\>jruby -v --server -e ‘1000000.times {}’ jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java HotSpot™ Server VM 1.6.0\_13) \[x86-java\] :1: -e:2: unterminated string meets …

---

## [Byte\[\] to ruby string](https://www.ruby-forum.com/t/byte-to-ruby-string/177748)

<div class="topic-metadata">

**Author:** [@HSSSSkon\_Clausen](https://www.ruby-forum.com/u/HSSSSkon_Clausen)\
**Replies:** 8\
**Last updated:** [October 23, 2009, 5:26pm UTC](https://www.ruby-forum.com/t/byte-to-ruby-string/177748 "2009-10-23T17:26:13Z")

</div>

Hello, I’m struggling with converting a byte array into a ruby binary string. Does anybody know how to make something like this pass? require ‘test/unit’ include System::IO class Binstring \< Test::Unit::TestCase de…

---

## [Re: class model question](https://www.ruby-forum.com/t/re-class-model-question/177780)

<div class="topic-metadata">

**Author:** [@Dosanjh\_Gurdipe](https://www.ruby-forum.com/u/Dosanjh_Gurdipe)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 5:00pm UTC](https://www.ruby-forum.com/t/re-class-model-question/177780 "2009-10-23T17:00:14Z")

</div>

Hi All, I’m new to ruby and trying to build a quick application using instant rails I want to create an application that lets you add a persons details, addresses and contacts such as mobile number, email address etc …

---

## [Boson 0.1 - Initial Release](https://www.ruby-forum.com/t/boson-0-1-initial-release/177671)

<div class="topic-metadata">

**Author:** [@ghorner](https://www.ruby-forum.com/u/ghorner)\
**Replies:** 5\
**Last updated:** [October 23, 2009, 10:43am UTC](https://www.ruby-forum.com/t/boson-0-1-initial-release/177671 "2009-10-23T10:43:34Z")

</div>

Hi, I’m introducing Boson, a command/task framework similar to rake and thor which executes commands from the commandline and irb. To install: gem install boson Features: Commands are just methods on main which mea…

---

## [\[ANN\] Pure: Language-level support for automatic parallelism](https://www.ruby-forum.com/t/ann-pure-language-level-support-for-automatic-parallelism/177755)

<div class="topic-metadata">

**Author:** [@noagenda](https://www.ruby-forum.com/u/noagenda)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 5:41am UTC](https://www.ruby-forum.com/t/ann-pure-language-level-support-for-automatic-parallelism/177755 "2009-10-23T05:41:22Z")

</div>

= Pure == Summary Language-level support for automatic parallelism and lazy evaluation. == Synopsis require ‘pure’ geometry = Pure.define do def area(width, height) width\*height end def width(border) 7 + borde…

---

## [Convert/replace a value of nil with 0?](https://www.ruby-forum.com/t/convert-replace-a-value-of-nil-with-0/177721)

<div class="topic-metadata">

**Author:** [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Replies:** 11\
**Last updated:** [October 23, 2009, 2:15am UTC](https://www.ruby-forum.com/t/convert-replace-a-value-of-nil-with-0/177721 "2009-10-23T02:15:58Z")

</div>

Do you know how I can convert or replace any value that gets back a ‘nil’ to 0? For instance, the myArrayVal\[0\] may or may not contain a number and I want the code to default to 0 if a nil is returned. I have not foun…

---

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

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 1:46am UTC](https://www.ruby-forum.com/t/code-review-installer/177746 "2009-10-23T01:46:08Z")

</div>

tfpt review “/shelveset:installer;REDMOND\\jdeville” Comment : Installer for IronRuby. After running rake package, if you run build c:\\ironruby from this directory, you will get a IronRuby.msi file in the current dir…

---

## [Sanitizing html tags (content)](https://www.ruby-forum.com/t/sanitizing-html-tags-content/177739)

<div class="topic-metadata">

**Author:** [@introvert](https://www.ruby-forum.com/u/introvert)\
**Replies:** 2\
**Last updated:** [October 23, 2009, 1:26am UTC](https://www.ruby-forum.com/t/sanitizing-html-tags-content/177739 "2009-10-23T01:26:48Z")

</div>

Hello, I have a variable which holds the following html code: some textlink … Now I’d like to process it so that everything would be stripped except object/param/embed tags (span tag and its content should be remo…

---

## [Merging partial, incomplete data files](https://www.ruby-forum.com/t/merging-partial-incomplete-data-files/177683)

<div class="topic-metadata">

**Author:** [@bterkuile](https://www.ruby-forum.com/u/bterkuile)\
**Replies:** 4\
**Last updated:** [October 23, 2009, 12:42am UTC](https://www.ruby-forum.com/t/merging-partial-incomplete-data-files/177683 "2009-10-23T00:42:37Z")

</div>

Hello all, I write scripts for fun and am still a noob. I’d like to use ruby to solve a problem for me but find it difficult this time so I thought I’d ask for help. It’s very basic in fact. I have 2 csv files I’d l…

---

## [Wrong statement in Ruby 1.9 keyword doc on ruby-doc.org](https://www.ruby-forum.com/t/wrong-statement-in-ruby-1-9-keyword-doc-on-ruby-doc-org/177749)

<div class="topic-metadata">

**Author:** [@quintus](https://www.ruby-forum.com/u/quintus)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 12:09am UTC](https://www.ruby-forum.com/t/wrong-statement-in-ruby-1-9-keyword-doc-on-ruby-doc-org/177749 "2009-10-23T00:09:32Z")

</div>

Hello, I’ve found there’s a mistake in the keyword documentation for Ruby 1.9 on ruby-doc.org. For “return” one code example is: def three return 3 ensure puts “Enjoy the 3!” end a = 3 # Enjoy the 3! #\<=====WR…

---

## [Code Review: Instructions3](https://www.ruby-forum.com/t/code-review-instructions3/177744)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [October 22, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/code-review-instructions3/177744 "2009-10-22T22:15:55Z")

</div>

tfpt review “/shelveset:Instructions3;REDMOND\\tomat” Comment : Refactors interpreter instructions. Adds instruction static factories to Instruction class (similarly to Expression Tree factories). These factories tak…

---

## [Tip du jour: no need to chomp before to\_i](https://www.ruby-forum.com/t/tip-du-jour-no-need-to-chomp-before-to-i/177090)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 5\
**Last updated:** [October 22, 2009, 8:35pm UTC](https://www.ruby-forum.com/t/tip-du-jour-no-need-to-chomp-before-to-i/177090 "2009-10-22T20:35:48Z")

</div>

Hi – Very minor point, but in case it’s useful: n = gets.chomp.to\_i does the same thing as: n = gets.to\_i because to\_i doesn’t do anything with the trailing newline anyway. This is even the case if you use the fuss…

---

## [Database and xml parsers](https://www.ruby-forum.com/t/database-and-xml-parsers/177719)

<div class="topic-metadata">

**Author:** [@kturner](https://www.ruby-forum.com/u/kturner)\
**Replies:** 2\
**Last updated:** [October 22, 2009, 7:22pm UTC](https://www.ruby-forum.com/t/database-and-xml-parsers/177719 "2009-10-22T19:22:29Z")

</div>

Hi, I’m converting a RoR app to run under JRuby. Things are going well so far. There are some data-intensive portions to this intranet site, parsing large XML files and populating database (MySQL) tables with the co…

---

## [Windows oddities](https://www.ruby-forum.com/t/windows-oddities/177727)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [October 22, 2009, 7:16pm UTC](https://www.ruby-forum.com/t/windows-oddities/177727 "2009-10-22T19:16:08Z")

</div>

Appears that on doze both jruby.bat and jruby.exe are provided–is that expected? (in the end, only jruby.exe ever gets run, I believe). Also, I did note that the installer installs to an old version number. C:\\install…

---

## [Jruby windows 1.4RC1 users, can you test something for me? I feel like I'm going crazy](https://www.ruby-forum.com/t/jruby-windows-1-4rc1-users-can-you-test-something-for-me-i-feel-like-im-going-crazy/177173)

<div class="topic-metadata">

**Author:** [@typej](https://www.ruby-forum.com/u/typej)\
**Replies:** 3\
**Last updated:** [October 22, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/jruby-windows-1-4rc1-users-can-you-test-something-for-me-i-feel-like-im-going-crazy/177173 "2009-10-22T18:18:11Z")

</div>

Hey guys - If you are using 1.4RC1 on windows, can you test this for me? (If it matters I’m using JDK 6 U 13) just do gem install json\_pure . Here is my output: C:\>jruby -S gem install json\_pure ‘ure’ is not recogn…

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

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