# Ruby

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

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

---

## [RTranslate Gem (Open-URI) and Encoding](https://www.ruby-forum.com/t/rtranslate-gem-open-uri-and-encoding/183698)

<div class="topic-metadata">

**Author:** [@chromag](https://www.ruby-forum.com/u/chromag)\
**Replies:** 11\
**Last updated:** [February 21, 2010, 2:31am UTC](https://www.ruby-forum.com/t/rtranslate-gem-open-uri-and-encoding/183698 "2010-02-21T02:31:48Z")

</div>

I’m using the rtranslate gem (sishen-rtranslate) to handle translating some text. It uses open-uri to scrape Google Translate. If I attempt to translate text from English to Spanish it outputs some garbage character…

---

## [Specifying Ruby Version from Command Line](https://www.ruby-forum.com/t/specifying-ruby-version-from-command-line/183804)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 6\
**Last updated:** [February 20, 2010, 8:58pm UTC](https://www.ruby-forum.com/t/specifying-ruby-version-from-command-line/183804 "2010-02-20T20:58:09Z")

</div>

I have two versions of Ruby installed (1.8 and 1.9). When starting a Ruby script from the command window, how do I specify which version of Ruby I want to use? I’m assuming there is some option for this that I can …

---

## [Ruby Bezel - Experiment in Dependency Heaven](https://www.ruby-forum.com/t/ruby-bezel-experiment-in-dependency-heaven/183802)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 0\
**Last updated:** [February 20, 2010, 2:18pm UTC](https://www.ruby-forum.com/t/ruby-bezel-experiment-in-dependency-heaven/183802 "2010-02-20T14:18:24Z")

</div>

Hi– I’ve been playing around with an alternative for loading dependent libraries in Ruby --something that’s been sitting in the back of my mind for some time, but I hadn’t taken the time to attempt a serious implemen…

---

## [System handling of undef\_method..Reason for Double Post](https://www.ruby-forum.com/t/system-handling-of-undef-method-reason-for-double-post/183754)

<div class="topic-metadata">

**Author:** [@Paul\_F\_Fraser](https://www.ruby-forum.com/u/Paul_F_Fraser)\
**Replies:** 1\
**Last updated:** [February 20, 2010, 12:36pm UTC](https://www.ruby-forum.com/t/system-handling-of-undef-method-reason-for-double-post/183754 "2010-02-20T12:36:02Z")

</div>

The IP address used by ruby-talk, ‘221.186.184.68’ is listed on APEWS.org (Case C-130) as blocked and has been since 2007. An upgrade to my spam filtering prevented ruby emails appearing in my inbox recently. I repeat…

---

## [\[Bug:1.9.1\] rubyspec: BigDecimal#div returns NaN if divided by zero and no precision given ERROR](https://www.ruby-forum.com/t/bug-1-9-1-rubyspec-bigdecimal-div-returns-nan-if-divided-by-zero-and-no-precision-given-error/182633)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [February 20, 2010, 12:23pm UTC](https://www.ruby-forum.com/t/bug-1-9-1-rubyspec-bigdecimal-div-returns-nan-if-divided-by-zero-and-no-precision-given-error/182633 "2010-02-20T12:23:41Z")

</div>

Yugui e$B$5$se(B e$B1sF#$G$9!#e(B trunk e$B$G$O!"e(BBigDecimal e$B$N=|;;$,e(B NaN e$B$G$J$/e(B ZeroDivisionError e$B$re(B e$BEj$2$k$h$&$K$J$C$F$$$^$9e(B (r20368 e$B!"e(Br20383) e$B!#e(B e$B$3$l$O!"e(B1.9.1 e$B$K%P%C…

---

## [Getting started with IronRuby and c# issues](https://www.ruby-forum.com/t/getting-started-with-ironruby-and-c-issues/183796)

<div class="topic-metadata">

**Author:** [@jngo](https://www.ruby-forum.com/u/jngo)\
**Replies:** 1\
**Last updated:** [February 20, 2010, 11:29am UTC](https://www.ruby-forum.com/t/getting-started-with-ironruby-and-c-issues/183796 "2010-02-20T11:29:51Z")

</div>

Hi IronRuby mailing list, Inspired by a talk by Ben H. on testing c# with Ruby I thought I’d give it a go but I’m frustratingly stuck at the first hurdle. I’ve emailed Ben but as I’ve not had an immediate response …

---

## [Get Goolge Result](https://www.ruby-forum.com/t/get-goolge-result/183753)

<div class="topic-metadata">

**Author:** [@sql\_injection](https://www.ruby-forum.com/u/sql_injection)\
**Replies:** 14\
**Last updated:** [February 20, 2010, 10:02am UTC](https://www.ruby-forum.com/t/get-goolge-result/183753 "2010-02-20T10:02:03Z")

</div>

Hi i wanna write simple code like this : puts “Please Enter you word for search in Google.com:” x=gets { } please help me what should i do ? any simple code anyone has please put here for me or any information ha…

---

## [Code Review: TypeInferenceBugs](https://www.ruby-forum.com/t/code-review-typeinferencebugs/183786)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [February 20, 2010, 2:29am UTC](https://www.ruby-forum.com/t/code-review-typeinferencebugs/183786 "2010-02-20T02:29:40Z")

</div>

tfpt review “/shelveset:TypeInferenceBugs;REDMOND\\tomat” Comment : Fixes bugs in type inference: By-ref generic parameter public void Foo(ref T x); Foo(1) Foo(StrongBox()) Multiple generic parameters public I…

---

## [Getting up and running with ActiveRecord + Sqlserver](https://www.ruby-forum.com/t/getting-up-and-running-with-activerecord-sqlserver/183773)

<div class="topic-metadata">

**Author:** [@Scott\_Holden](https://www.ruby-forum.com/u/Scott_Holden)\
**Replies:** 13\
**Last updated:** [February 20, 2010, 2:15am UTC](https://www.ruby-forum.com/t/getting-up-and-running-with-activerecord-sqlserver/183773 "2010-02-20T02:15:03Z")

</div>

I’m trying to follow the example given at http://ironruby.net/Documentation/Real\_Ruby\_Applications/Rails for getting ActiveRecord up and running. Whenever I try to run a migration, I’m getting this error. Could an…

---

## [Using secure memory](https://www.ruby-forum.com/t/using-secure-memory/183731)

<div class="topic-metadata">

**Author:** [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Replies:** 6\
**Last updated:** [February 20, 2010, 1:46am UTC](https://www.ruby-forum.com/t/using-secure-memory/183731 "2010-02-20T01:46:21Z")

</div>

I’m writing a utility that needs to use secure memory (that is, won’t swap to disk). Is there a “best practices” way to do this with Ruby, some common library that could be used for this purpose, et cetera? Thanks in…

---

## [Reuire 'socket' modules?](https://www.ruby-forum.com/t/reuire-socket-modules/183728)

<div class="topic-metadata">

**Author:** [@youthreewire](https://www.ruby-forum.com/u/youthreewire)\
**Replies:** 3\
**Last updated:** [February 19, 2010, 9:47pm UTC](https://www.ruby-forum.com/t/reuire-socket-modules/183728 "2010-02-19T21:47:26Z")

</div>

Hi, I have a sort of minimal ruby environment.I need to get socket programming running in it.So what are the associated files that I need to add form the full fledged ruby folders (in windows?) Please let me know.I d…

---

## [ANN: Ruby 1.8.6 pl399 released](https://www.ruby-forum.com/t/ann-ruby-1-8-6-pl399-released/182983)

<div class="topic-metadata">

**Author:** [@kirkhoward](https://www.ruby-forum.com/u/kirkhoward)\
**Replies:** 5\
**Last updated:** [February 19, 2010, 8:43pm UTC](https://www.ruby-forum.com/t/ann-ruby-1-8-6-pl399-released/182983 "2010-02-19T20:43:36Z")

</div>

Ruby 1.8.6 pl399 has been released. This release fixes a problem that was encountered yesterday with builds on some platforms. The only difference between pl399 and pl398 is that pl399 required a minor syntax change i…

---

## [Global variables usage](https://www.ruby-forum.com/t/global-variables-usage/183727)

<div class="topic-metadata">

**Author:** [@youthreewire](https://www.ruby-forum.com/u/youthreewire)\
**Replies:** 4\
**Last updated:** [February 19, 2010, 7:59pm UTC](https://www.ruby-forum.com/t/global-variables-usage/183727 "2010-02-19T19:59:50Z")

</div>

I declared two files.One to hold the value of a global variable.And the other to print it. 1)to hold variables (var.rb) Code: $foo = 500 to print the global variable (gprint.rb) Code: loop do puts $foo end But…

---

## [org.jruby.rack.RackInitializationException: while deploying JRoR-App](https://www.ruby-forum.com/t/org-jruby-rack-rackinitializationexception-while-deploying-jror-app/183745)

<div class="topic-metadata">

**Author:** [@dalton](https://www.ruby-forum.com/u/dalton)\
**Replies:** 1\
**Last updated:** [February 19, 2010, 7:58pm UTC](https://www.ruby-forum.com/t/org-jruby-rack-rackinitializationexception-while-deploying-jror-app/183745 "2010-02-19T19:58:40Z")

</div>

Hi there, I have a little rails-app which tries to load several Javaclasses to work with them. The Java classes are located in my lib/java directory in a Jar-File. Warbling runs without any problems. While deploying …

---

## [Re: COM Interop Problem](https://www.ruby-forum.com/t/re-com-interop-problem/183759)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [February 19, 2010, 7:14pm UTC](https://www.ruby-forum.com/t/re-com-interop-problem/183759 "2010-02-19T19:14:10Z")

</div>

Just so you know, the WIN32OLE library wraps the COM initialization and removes the need for to\_clr\_string. Require ‘win32ole’ WIN32OLE.new ‘Excel.Application’ This will also be cross compatible with MRI. Tomas: Can…

---

## [Ruby-prof on windows: strange measured time numbers](https://www.ruby-forum.com/t/ruby-prof-on-windows-strange-measured-time-numbers/183669)

<div class="topic-metadata">

**Author:** [@zloy](https://www.ruby-forum.com/u/zloy)\
**Replies:** 7\
**Last updated:** [February 19, 2010, 5:31pm UTC](https://www.ruby-forum.com/t/ruby-prof-on-windows-strange-measured-time-numbers/183669 "2010-02-19T17:31:41Z")

</div>

Hi there, I play with ruby-prof. Profiling those simple-few-dozens-line scripts seems clear, but when I try to profile rake --tasks, as follows C:\\InstantRails\\rails\_apps\\projectN\>“ruby-prof” “–printer=graph\_html” “–…

---

## [COM Interop Problem](https://www.ruby-forum.com/t/com-interop-problem/183703)

<div class="topic-metadata">

**Author:** [@semmons99](https://www.ruby-forum.com/u/semmons99)\
**Replies:** 1\
**Last updated:** [February 19, 2010, 4:01pm UTC](https://www.ruby-forum.com/t/com-interop-problem/183703 "2010-02-19T16:01:31Z")

</div>

Anytime I invoke a method on a COM object with one or more arguments, I get the following error: Could not convert argument 0 for call to Open. (ArgumentError) What’s preplexing is the argument number is always the la…

---

## [Libraries for JPEG resizing in Windows Environment](https://www.ruby-forum.com/t/libraries-for-jpeg-resizing-in-windows-environment/183756)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 2\
**Last updated:** [February 19, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/libraries-for-jpeg-resizing-in-windows-environment/183756 "2010-02-19T15:32:43Z")

</div>

I’d like an idea as to what other image processing libraries are available besides RMagick and MiniMagick. I’m currently successfully using RMagick with Ruby 1.8, and I’ve also been able to get MiniMagick working wit…

---

## [DNote 1.2](https://www.ruby-forum.com/t/dnote-1-2/183757)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 0\
**Last updated:** [February 19, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/dnote-1-2/183757 "2010-02-19T14:49:31Z")

</div>

Released DNote 1.2 yesterday. DNote collects developer’s notes from source code (TODO, FIXME, etc) and spits them out in a format of your choosing. Check it out at: http://proutils.github.com/dnote/ Hope it proves us…

---

## [\[Bug #2747\] io.dup doesn't handle pos properly](https://www.ruby-forum.com/t/bug-2747-io-dup-doesnt-handle-pos-properly/183490)

<div class="topic-metadata">

**Author:** [@Motohiro\_KOSAKI](https://www.ruby-forum.com/u/Motohiro_KOSAKI)\
**Replies:** 5\
**Last updated:** [February 19, 2010, 11:37am UTC](https://www.ruby-forum.com/t/bug-2747-io-dup-doesnt-handle-pos-properly/183490 "2010-02-19T11:37:28Z")

</div>

Bug #2747: io.dup doesn’t handle pos properly http://redmine.ruby-lang.org/issues/show/2747 e$B5/I\<\<Te(B: Motohiro KOSAKI e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: core, Target version: 1.9.x ruby…

---

## [System handling of undef\_method](https://www.ruby-forum.com/t/system-handling-of-undef-method/183740)

<div class="topic-metadata">

**Author:** [@Paul\_F\_Fraser](https://www.ruby-forum.com/u/Paul_F_Fraser)\
**Replies:** 0\
**Last updated:** [February 19, 2010, 10:23am UTC](https://www.ruby-forum.com/t/system-handling-of-undef-method/183740 "2010-02-19T10:23:07Z")

</div>

When a method is undefined, does the code hang around as orphaned code, or is it garbage collected and totally removed, or some other action performed? I am interested in the case of many methods being added for lim…

---

## [Adding self to Enumerable](https://www.ruby-forum.com/t/adding-self-to-enumerable/183701)

<div class="topic-metadata">

**Author:** [@glenn\_nz](https://www.ruby-forum.com/u/glenn_nz)\
**Replies:** 10\
**Last updated:** [February 19, 2010, 8:15am UTC](https://www.ruby-forum.com/t/adding-self-to-enumerable/183701 "2010-02-19T08:15:29Z")

</div>

Hi, I would like to add self to an Enumerable object in Ruby 1.9, like in this (admittedly) contrived example: %w(cat dog mouse).each.with\_self { |e, s| puts “self: #{s.inspect}, e: #{e}” } The results of the above …

---

## [How watir reads the page source](https://www.ruby-forum.com/t/how-watir-reads-the-page-source/183724)

<div class="topic-metadata">

**Author:** [@bhavesh1\_sharma](https://www.ruby-forum.com/u/bhavesh1_sharma)\
**Replies:** 0\
**Last updated:** [February 19, 2010, 6:43am UTC](https://www.ruby-forum.com/t/how-watir-reads-the-page-source/183724 "2010-02-19T06:43:35Z")

</div>

Hi, Currently i am using ie.html and ie.text to get the page source and then using this i can actaully clicking on the objects etc. JHowvere there are some changes done recently and now im not able to see page source…

---

## [MiniMagick Problems on 64-bit OS](https://www.ruby-forum.com/t/minimagick-problems-on-64-bit-os/183720)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 0\
**Last updated:** [February 19, 2010, 2:53am UTC](https://www.ruby-forum.com/t/minimagick-problems-on-64-bit-os/183720 "2010-02-19T02:53:01Z")

</div>

I’m running the following 5 lines of ruby code. require ‘mini\_magick’ include MiniMagick dir = “C:\\users\\alex\\pictures\\” pic = “#{dir}\\Flowers006.jpg” image = Image.from\_file(pic) I get a host of errors, which are…

---

## [System handling of undef\_method](https://www.ruby-forum.com/t/system-handling-of-undef-method/183718)

<div class="topic-metadata">

**Author:** [@Paul\_F\_Fraser](https://www.ruby-forum.com/u/Paul_F_Fraser)\
**Replies:** 1\
**Last updated:** [February 19, 2010, 1:40am UTC](https://www.ruby-forum.com/t/system-handling-of-undef-method/183718 "2010-02-19T01:40:28Z")

</div>

When a method is undefined, does the code hang around as orphaned code, or is it garbage collected and totally removed, or some other action performed? I am interested in the case of many methods being added for lim…

---

## [DXF Writer?](https://www.ruby-forum.com/t/dxf-writer/125267)

<div class="topic-metadata">

**Author:** [@Jari\_W](https://www.ruby-forum.com/u/Jari_W)\
**Replies:** 1\
**Last updated:** [February 18, 2010, 8:44pm UTC](https://www.ruby-forum.com/t/dxf-writer/125267 "2010-02-18T20:44:44Z")

</div>

I’ve searched the rubygems and googled, but failed: Does anyone know of a DXF (Autocad text files) writer library for Ruby? Best regards, Jari W.

---

## [Method prototypes like C++? // Compiling executables](https://www.ruby-forum.com/t/method-prototypes-like-c-compiling-executables/183668)

<div class="topic-metadata">

**Author:** [@ferdil](https://www.ruby-forum.com/u/ferdil)\
**Replies:** 6\
**Last updated:** [February 18, 2010, 6:28pm UTC](https://www.ruby-forum.com/t/method-prototypes-like-c-compiling-executables/183668 "2010-02-18T18:28:47Z")

</div>

Hi, I’m switching from C++ to Ruby, I have a few questions. How come there isn’t any “method prototype” feature like the function prototypes in C++? Like, in c++ I declared just the name of a funcion at the beginnin…

---

## [Exception change with net/http in Ruby 187 PL 248/9](https://www.ruby-forum.com/t/exception-change-with-net-http-in-ruby-187-pl-248-9/183645)

<div class="topic-metadata">

**Author:** [@Mitch\_W](https://www.ruby-forum.com/u/Mitch_W)\
**Replies:** 2\
**Last updated:** [February 18, 2010, 6:26pm UTC](https://www.ruby-forum.com/t/exception-change-with-net-http-in-ruby-187-pl-248-9/183645 "2010-02-18T18:26:41Z")

</div>

Ran into the following problem with net http in Ruby 187 pl248 require net/http.rb n = Net::HTTP.new(‘server-that-is-not-listening-on-port-eighty’) n.request\_head(‘/’) Prior to this change: http://svn.ruby-lang.org/…

---

## [Repeat of DRb.start\_service and DRb.stop\_service may result in EADDRINUSE](https://www.ruby-forum.com/t/repeat-of-drb-start-service-and-drb-stop-service-may-result-in-eaddrinuse/183621)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [February 18, 2010, 4:13pm UTC](https://www.ruby-forum.com/t/repeat-of-drb-start-service-and-drb-stop-service-may-result-in-eaddrinuse/183621 "2010-02-18T16:13:12Z")

</div>

e$B31$5$se(B e$B1sF#$G$9!#e(B 1.9 e$B$G!"e(BDRb.start\_service e$B$He(B stop\_service e$B$r7+$jJV$9$H!“e(BEADDRINUSE e$B$,e(B e$BH/@8$9$k$3$H$,$”$j$^$9!#e(B $ ./ruby -Ilib -rdrb -e ’ loop do p :start DRb.start\_serv…

---

## [Help : Error in scrubyt](https://www.ruby-forum.com/t/help-error-in-scrubyt/183672)

<div class="topic-metadata">

**Author:** [@sql\_injection](https://www.ruby-forum.com/u/sql_injection)\
**Replies:** 0\
**Last updated:** [February 18, 2010, 3:56pm UTC](https://www.ruby-forum.com/t/help-error-in-scrubyt/183672 "2010-02-18T15:56:16Z")

</div>

hi i have one problem when i runing the my code will come this erros : ================================ C:/Ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in gem\_original\_re quire': no such file to load -…

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

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