# Ruby

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

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

---

## [YAML to anchor same strings in dumps](https://www.ruby-forum.com/t/yaml-to-anchor-same-strings-in-dumps/158997)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/yaml-to-anchor-same-strings-in-dumps/158997 "2009-01-30T23:49:39Z")

</div>

Hi, there Is there any way to make YAML alias same strings in dumps? The following code fragment: require ‘yaml’ s = ‘a’ \* 10 puts \[ s, s \].to\_yaml Produces this: aaaaaaaaaa aaaaaaaaaa While I need: &id001 aaaaa…

---

## [Ruby mysql error](https://www.ruby-forum.com/t/ruby-mysql-error/157129)

<div class="topic-metadata">

**Author:** [@maged](https://www.ruby-forum.com/u/maged)\
**Replies:** 5\
**Last updated:** [January 30, 2009, 11:41pm UTC](https://www.ruby-forum.com/t/ruby-mysql-error/157129 "2009-01-30T23:41:25Z")

</div>

Hi All, I’m trying to run mysql DB with ROR app. I’m using Netbeans 6.5 and whenever I run the server and it tried to hit the DB, I get the error: C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.…

---

## [Cannot reference Rectangle2D.Double class jruby seem to search for a method](https://www.ruby-forum.com/t/cannot-reference-rectangle2d-double-class-jruby-seem-to-search-for-a-method/159056)

<div class="topic-metadata">

**Author:** [@remgo](https://www.ruby-forum.com/u/remgo)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/cannot-reference-rectangle2d-double-class-jruby-seem-to-search-for-a-method/159056 "2009-01-30T23:16:10Z")

</div>

The following very simple case I cannot get to work. require ‘java’ class Test java.awt.geom.Rectangle2D.Double.new(20,40,40,20) end =\> undefined method \`Double’ for Java::JavaAwtGeom::Rectangle2D:Class (NoMethodEr…

---

## [Measuring Network Latency](https://www.ruby-forum.com/t/measuring-network-latency/159057)

<div class="topic-metadata">

**Author:** [@Brian\_Mac](https://www.ruby-forum.com/u/Brian_Mac)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 10:41pm UTC](https://www.ruby-forum.com/t/measuring-network-latency/159057 "2009-01-30T22:41:00Z")

</div>

i’m looking for ideas of measuring network latency with ruby. i can’t reliably use net::ping because rdp (remote desktop protocol) traffic is being prioritized. i thought i could use Net::PingTCP and get the duratio…

---

## [Binding in ruby1.9](https://www.ruby-forum.com/t/binding-in-ruby1-9/159043)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 3\
**Last updated:** [January 30, 2009, 10:16pm UTC](https://www.ruby-forum.com/t/binding-in-ruby1-9/159043 "2009-01-30T22:16:21Z")

</div>

Could someone explain why this code does not work in ruby1.9 and possibly provide a workaround. The end goal is to be able to pass a binding to an ERb result method that provides a limited set of variables to the ERb …

---

## [If you use PDF::Writer, read this post!](https://www.ruby-forum.com/t/if-you-use-pdf-writer-read-this-post/158024)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 20\
**Last updated:** [January 30, 2009, 8:51pm UTC](https://www.ruby-forum.com/t/if-you-use-pdf-writer-read-this-post/158024 "2009-01-30T20:51:46Z")

</div>

I’m getting very few requests for features to add to Prawn that exist in PDF::Writer but not in Prawn. Because it directly effects each and every user, I need to know what this means. Please remember that I intend to…

---

## [MiniTest: a curious case of include (1.8 vs 1.9)](https://www.ruby-forum.com/t/minitest-a-curious-case-of-include-1-8-vs-1-9/158937)

<div class="topic-metadata">

**Author:** [@simon780](https://www.ruby-forum.com/u/simon780)\
**Replies:** 6\
**Last updated:** [January 30, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/minitest-a-curious-case-of-include-1-8-vs-1-9/158937 "2009-01-30T18:54:57Z")

</div>

I’ve been messing around with minitest and came across something very strange. Does anyone have an explanation for what is going on here? I think it must indicate subtle differences in blocks between 1.8 and 1.9. re…

---

## [How to do a for loop...and iterate a set number of times?](https://www.ruby-forum.com/t/how-to-do-a-for-loop-and-iterate-a-set-number-of-times/158978)

<div class="topic-metadata">

**Author:** [@dann](https://www.ruby-forum.com/u/dann)\
**Replies:** 8\
**Last updated:** [January 30, 2009, 6:09pm UTC](https://www.ruby-forum.com/t/how-to-do-a-for-loop-and-iterate-a-set-number-of-times/158978 "2009-01-30T18:09:10Z")

</div>

So painfully basic, but I’m just starting Ruby and am coming to it from C/C++/Java, etc. and some of the syntax is unnatural to me, and yes, I’ve tried Google. I have an array of things and I want to access the first …

---

## [RDoc plain text docs with command to create an HTML table?](https://www.ruby-forum.com/t/rdoc-plain-text-docs-with-command-to-create-an-html-table/158943)

<div class="topic-metadata">

**Author:** [@msojka](https://www.ruby-forum.com/u/msojka)\
**Replies:** 3\
**Last updated:** [January 30, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/rdoc-plain-text-docs-with-command-to-create-an-html-table/158943 "2009-01-30T17:49:46Z")

</div>

Hi all, for quite some time I’m trying to get RDoc to display an HTML table populated with data provided by a ruby method without success. I have been upgrading RDoc to 2.3.0. The doc file is a plain text file (.rb),…

---

## [Building on mono](https://www.ruby-forum.com/t/building-on-mono/159032)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 4:52pm UTC](https://www.ruby-forum.com/t/building-on-mono/159032 "2009-01-30T16:52:15Z")

</div>

I updated my mono branch with the sources from ironruby git. I disabled the build of dlr\_com and testhost. I wanted to verify… COM programming AFAIK is windows specific or am I wrong. I don’t quite remember the issue…

---

## [Bug appears](https://www.ruby-forum.com/t/bug-appears/158999)

<div class="topic-metadata">

**Author:** [@missrain](https://www.ruby-forum.com/u/missrain)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 4:22pm UTC](https://www.ruby-forum.com/t/bug-appears/158999 "2009-01-30T16:22:42Z")

</div>

Hey, im currently working on Ruby with Qt for almost 6 months now but never come across any bug. Just now i have something appears on my terminal and here it is: /usr/local/lib/ruby/site\_ruby/1.8/Qt/qtruby.rb:1367: \[…

---

## [Erb](https://www.ruby-forum.com/t/erb/158977)

<div class="topic-metadata">

**Author:** [@pozza](https://www.ruby-forum.com/u/pozza)\
**Replies:** 5\
**Last updated:** [January 30, 2009, 2:51pm UTC](https://www.ruby-forum.com/t/erb/158977 "2009-01-30T14:51:05Z")

</div>

I playing with using ERB in IronRuby and having a little problem. The code below works fine with Ruby: require ‘erb’ puts ERB.new(‘hello world’).result but in IronRuby I get this error: IronRuby.Libraries:0:in \`requ…

---

## [DLR hosting](https://www.ruby-forum.com/t/dlr-hosting/159020)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/dlr-hosting/159020 "2009-01-30T14:48:19Z")

</div>

it will show that so far I’ve been working with instead of on IronRuby :slight\_smile: And then I’ve been focussed on using the Ruby language and .NET from Ruby instead of using C# to host Ironruby. I’m using a debug…

---

## [Creating a ruby class with mass assignment](https://www.ruby-forum.com/t/creating-a-ruby-class-with-mass-assignment/159016)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 2:36pm UTC](https://www.ruby-forum.com/t/creating-a-ruby-class-with-mass-assignment/159016 "2009-01-30T14:36:34Z")

</div>

Hi, How do I create a ruby class that has mass assignment functionality? I want it to work in a similar way to the way in which ActiveRecord does, ie. MyClass.new =\> #MyClass: MyClass.new(:name =\> “Cool class”) =\>…

---

## [HABTM insertion deletes old entries](https://www.ruby-forum.com/t/habtm-insertion-deletes-old-entries/158998)

<div class="topic-metadata">

**Author:** [@preethi](https://www.ruby-forum.com/u/preethi)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 2:24pm UTC](https://www.ruby-forum.com/t/habtm-insertion-deletes-old-entries/158998 "2009-01-30T14:24:33Z")

</div>

Hi, I’ve 2 models Profile & User and they have HABTM relationship. class Vcprofile \< ActiveRecord::Base has\_and\_belongs\_to\_many :users end class Vcgbluser \< ActiveRecord::Base has\_and\_belongs\_to\_many :vcprofiles e…

---

## [Can't create a new file](https://www.ruby-forum.com/t/cant-create-a-new-file/158990)

<div class="topic-metadata">

**Author:** [@bloodsample](https://www.ruby-forum.com/u/bloodsample)\
**Replies:** 3\
**Last updated:** [January 30, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/cant-create-a-new-file/158990 "2009-01-30T13:39:29Z")

</div>

I have no idea what’s going on. I’ve read about a dozen forums about creating a file but I still can’t seem to do it. I’m running in Windows Vista. In a folder called “RUBY” I have a ruby file called “filetest.rb”. …

---

## [Sendmsg/recvmsg](https://www.ruby-forum.com/t/sendmsg-recvmsg/246521)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 9:37am UTC](https://www.ruby-forum.com/t/sendmsg-recvmsg/246521 "2009-01-30T09:37:30Z")

</div>

socket e$B$G!"e(Bsendmsg, recvmsg e$B%7%9%F%\`%3!\<%k$r;H$($k$h$&$K$9$ke(B e$B$N$O$I$&$G$7$g$&$+!#e(B sendmsg, recvmsg e$B$Oe(B POSIX e$B$GDj5A$5$l$F$$$^$9!#$=$7$F!“e(BIPv6 e$B$G$Oe(B sendmsg, recvmsg e$B$NJd=u%G!\<%?$r;…

---

## [Compiling .rb files vs. embedding and hosting?](https://www.ruby-forum.com/t/compiling-rb-files-vs-embedding-and-hosting/157323)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 4\
**Last updated:** [January 30, 2009, 9:14am UTC](https://www.ruby-forum.com/t/compiling-rb-files-vs-embedding-and-hosting/157323 "2009-01-30T09:14:05Z")

</div>

Hello, I’m starting to integrate IronRuby files into a VisualStudio C# project, mainly to write easy-to-maintain GUI builders. As I don’t want to have .rb files lying around this deployment, I had that idea about em…

---

## [1.9.1-rc2$B$N(BNEWS$B$NFbMF(B](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904)

<div class="topic-metadata">

**Author:** [@akira\_yamada\_S\_SSB](https://www.ruby-forum.com/u/akira_yamada_S_SSB)\
**Replies:** 5\
**Last updated:** [January 30, 2009, 8:40am UTC](https://www.ruby-forum.com/t/1-9-1-rc2-b-n-bnews-b-nfbmf-b/158904 "2009-01-30T08:40:07Z")

</div>

1.9.1-rc2e$B$Ne(BNEWSe$B$NFbMF$K$D$$$F$N%3%a%s%H$H\>/$7\<ALd$G$9!#e(B === Compatibility issues language core New syntax and semantics o Method used for splat arguments: #to\_splat instead of #to\_ary to\_splate…

---

## [New window screwing up my Ncurses script!](https://www.ruby-forum.com/t/new-window-screwing-up-my-ncurses-script/158945)

<div class="topic-metadata">

**Author:** [@enchanter](https://www.ruby-forum.com/u/enchanter)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 7:02am UTC](https://www.ruby-forum.com/t/new-window-screwing-up-my-ncurses-script/158945 "2009-01-30T07:02:46Z")

</div>

require ‘rubygems’ require ‘ncurses’ Ncurses.initscr height = Ncurses.LINES() - 3 width = Ncurses.COLS() outputwin = Ncurses.WINDOW.new(height, width, 0, 0) failure = “-” \* Ncurses.COLS() Ncurses.mvprintw(22, 0, f…

---

## [Saving the web, charset problems and symbols problems](https://www.ruby-forum.com/t/saving-the-web-charset-problems-and-symbols-problems/158996)

<div class="topic-metadata">

**Author:** [@saknarede](https://www.ruby-forum.com/u/saknarede)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 6:08am UTC](https://www.ruby-forum.com/t/saving-the-web-charset-problems-and-symbols-problems/158996 "2009-01-30T06:08:20Z")

</div>

Hi all! I think that a lot of ruby scripts are for web crawling, web scrapping and many more applications with the web. I’m working with the web too, I try to save text of many different webs. In this moment I’m tryin…

---

## [Win32ole method missing](https://www.ruby-forum.com/t/win32ole-method-missing/158994)

<div class="topic-metadata">

**Author:** [@jamie\_f](https://www.ruby-forum.com/u/jamie_f)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 5:50am UTC](https://www.ruby-forum.com/t/win32ole-method-missing/158994 "2009-01-30T05:50:28Z")

</div>

There seems to be a method missing in the TimeScaleValue object of WIN32OLE. See: irb(main):126:0\> tsval.Value WIN32OLERuntimeError: unknown property or method Value' HRESULT error code:0x80020006 Unknown name. from (…

---

## [Camellia\_rb 1.2](https://www.ruby-forum.com/t/camellia-rb-1-2/158995)

<div class="topic-metadata">

**Author:** [@ARTESSBSSLnSSB](https://www.ruby-forum.com/u/ARTESSBSSLnSSB)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 5:35am UTC](https://www.ruby-forum.com/t/camellia-rb-1-2/158995 "2009-01-30T05:35:51Z")

</div>

Hi, camellia\_rb version 1.2 released. It supported ruby 1.9.1 rc1. camellia\_rb is a Camellia package for Ruby. Camellia is a symmetric key block cipher developed jointly in 2000e$B!!e(Bby world top class encryption …

---

## [Help translating C# socket code equivalent Ruby socket code](https://www.ruby-forum.com/t/help-translating-c-socket-code-equivalent-ruby-socket-code/158971)

<div class="topic-metadata">

**Author:** [@kamaljeetsinghsaini](https://www.ruby-forum.com/u/kamaljeetsinghsaini)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 5:04am UTC](https://www.ruby-forum.com/t/help-translating-c-socket-code-equivalent-ruby-socket-code/158971 "2009-01-30T05:04:44Z")

</div>

Possible to help in translating the following C# socket code to Ruby socket code please. What specific socket code lines needs to do following task. using System.Net.Sockets; Socket clientSock; clientSock = new Sock…

---

## [Active\_scaffold](https://www.ruby-forum.com/t/active-scaffold/158992)

<div class="topic-metadata">

**Author:** [@drub](https://www.ruby-forum.com/u/drub)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 4:05am UTC](https://www.ruby-forum.com/t/active-scaffold/158992 "2009-01-30T04:05:46Z")

</div>

Trying to use active\_scaffold. When starting WEBrick this error message is displayed , “This version of ActiveScaffold requires Rails 2.2 or higher.” “gem list” displays “rails (2.2.2)”, so it looks like it should wor…

---

## [Reading a file in chunks, to a byte array](https://www.ruby-forum.com/t/reading-a-file-in-chunks-to-a-byte-array/158970)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 2:26am UTC](https://www.ruby-forum.com/t/reading-a-file-in-chunks-to-a-byte-array/158970 "2009-01-30T02:26:38Z")

</div>

Hi everyone, I’m pretty new to Ruby, I’m taking courses and reading as much info as I can, but I’m stuck on this one problem that may/may not have a simple answer. A quick summary of what I’m trying to accomplish: I…

---

## [Question on some code from ironrubymvc](https://www.ruby-forum.com/t/question-on-some-code-from-ironrubymvc/158976)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 12:33am UTC](https://www.ruby-forum.com/t/question-on-some-code-from-ironrubymvc/158976 "2009-01-30T00:33:07Z")

</div>

Hi While working on the code for a ironrubymvc i came across the following code controllerRubyClass.EnumerateMethods((\_, symbolId, \_\_) =\> { if (String.Equals(symbolId, actionName, StringComparison.OrdinalIgnoreCas…

---

## [Problem with accessors and dsl's](https://www.ruby-forum.com/t/problem-with-accessors-and-dsls/158980)

<div class="topic-metadata">

**Author:** [@tsunami](https://www.ruby-forum.com/u/tsunami)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 12:03am UTC](https://www.ruby-forum.com/t/problem-with-accessors-and-dsls/158980 "2009-01-30T00:03:34Z")

</div>

I’ve created a class using the following code : class CommandHandler attr\_accessor :command,:arguments def initialize(command=nil,arguments=nil,what=nil) @command = command @arguments = arguments @what = w…

---

## [Glassfish gem - shared singleton](https://www.ruby-forum.com/t/glassfish-gem-shared-singleton/158949)

<div class="topic-metadata">

**Author:** [@uberkorp](https://www.ruby-forum.com/u/uberkorp)\
**Replies:** 5\
**Last updated:** [January 29, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/glassfish-gem-shared-singleton/158949 "2009-01-29T22:37:40Z")

</div>

Hi Everyone, I’m currently using the glassfish gem (0.9.1) with jruby (1.1.6) to host a rails application. I’m wondering if there is a recommended/supported way of having a singleton shared among multiple jruby run…

---

## [Best approach for multiple rails applications inside Tomcat?](https://www.ruby-forum.com/t/best-approach-for-multiple-rails-applications-inside-tomcat/158687)

<div class="topic-metadata">

**Author:** [@typej](https://www.ruby-forum.com/u/typej)\
**Replies:** 5\
**Last updated:** [January 29, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/best-approach-for-multiple-rails-applications-inside-tomcat/158687 "2009-01-29T20:25:49Z")

</div>

HI all - Today I am bringing up my second rails application inside the same Tomcat installation. What is the best approach for this task? Since I am using warbler, should I remove jruby-complete in each local war and …

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

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