# Ruby

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

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

---

## [Name of method?](https://www.ruby-forum.com/t/name-of-method/181755)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 8\
**Last updated:** [January 18, 2010, 3:43pm UTC](https://www.ruby-forum.com/t/name-of-method/181755 "2010-01-18T15:43:09Z")

</div>

How do I get the name of a method? def xxx @WhatsMyName = ??? end What should ??? be? I want it to return “xxx”.

---

## [Gem does not find gems](https://www.ruby-forum.com/t/gem-does-not-find-gems/181781)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 2:41pm UTC](https://www.ruby-forum.com/t/gem-does-not-find-gems/181781 "2010-01-18T14:41:32Z")

</div>

gem install SOMETHING always produces “Could not find SOMETHING (\> 0) in any repository”. This is what gem environment says: RubyGems Environment: VERSION: 0.9.4 (0.9.4) INSTALLATION DIRECTORY: /usr/local/lib/ruby/g…

---

## [Ruby for TT](https://www.ruby-forum.com/t/ruby-for-tt/181797)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 0\
**Last updated:** [January 18, 2010, 2:23pm UTC](https://www.ruby-forum.com/t/ruby-for-tt/181797 "2010-01-18T14:23:23Z")

</div>

Hello, Is there any ruby wrapper which can make ruby scripts access Perl’s TT (Template::Toolkit) files? Coz we have many old template files which were made by TT. Thanks.

---

## [Recommended Reading (also: Arrays/Hashes)](https://www.ruby-forum.com/t/recommended-reading-also-arrays-hashes/181569)

<div class="topic-metadata">

**Author:** [@zbrod](https://www.ruby-forum.com/u/zbrod)\
**Replies:** 19\
**Last updated:** [January 18, 2010, 2:13pm UTC](https://www.ruby-forum.com/t/recommended-reading-also-arrays-hashes/181569 "2010-01-18T14:13:53Z")

</div>

Hi all, Apologies for the long post, but just want to introduce myself and also make sure everyone understands where I am coming from, and that I’m not some n00b on a fools errand. I fully appreciate the complexitie…

---

## [Manipulating big hunks of data](https://www.ruby-forum.com/t/manipulating-big-hunks-of-data/181762)

<div class="topic-metadata">

**Author:** [@Seebs](https://www.ruby-forum.com/u/Seebs)\
**Replies:** 5\
**Last updated:** [January 18, 2010, 10:40am UTC](https://www.ruby-forum.com/t/manipulating-big-hunks-of-data/181762 "2010-01-18T10:40:59Z")

</div>

Is there any kind of container-like-thing in Ruby for the special case of a large number of fixed-type-datums? (As opposed to objects.) Basically, imagine that I have, for instance, a huge matrix of data. So far as I…

---

## [Code Review: ActiveSupport fixes](https://www.ruby-forum.com/t/code-review-activesupport-fixes/181790)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 0\
**Last updated:** [January 18, 2010, 10:37am UTC](https://www.ruby-forum.com/t/code-review-activesupport-fixes/181790 "2010-01-18T10:37:28Z")

</div>

tfpt review “/shelveset:rails2;REDMOND\\sborde” Comment : Implements RubyLambdaMethodInfo.GetArity ("%+d" % 0) should equal “+0”, not “0”. Fixes some of the other String#% specs as well

---

## [Ruby Array to Java Script Array](https://www.ruby-forum.com/t/ruby-array-to-java-script-array/181782)

<div class="topic-metadata">

**Author:** [@THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/u/THAKUR_PRASHANT_SIN)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 10:14am UTC](https://www.ruby-forum.com/t/ruby-array-to-java-script-array/181782 "2010-01-18T10:14:39Z")

</div>

Hi, How can we use an array created in Ruby in Java script ? Regards, Prashant

---

## [Re: Bug?: Ruby2Ruby and ParseTree on IronRuby](https://www.ruby-forum.com/t/re-bug-ruby2ruby-and-parsetree-on-ironruby/181780)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [January 18, 2010, 7:09am UTC](https://www.ruby-forum.com/t/re-bug-ruby2ruby-and-parsetree-on-ironruby/181780 "2010-01-18T07:09:07Z")

</div>

ParseTree is actually already implemented for IronRuby. Tomas did that to get merb running last year. Ruby2Ruby will probably need some work though. From: Michael L. removed\_email\_address@domain.invalid Sent: Sunday…

---

## [Jruby On Rails with Tomcat - request blocks application](https://www.ruby-forum.com/t/jruby-on-rails-with-tomcat-request-blocks-application/181432)

<div class="topic-metadata">

**Author:** [@nuscas](https://www.ruby-forum.com/u/nuscas)\
**Replies:** 6\
**Last updated:** [January 18, 2010, 6:09am UTC](https://www.ruby-forum.com/t/jruby-on-rails-with-tomcat-request-blocks-application/181432 "2010-01-18T06:09:26Z")

</div>

Hi, I have application deployed on Tomcat and I need to process long running request. When I start processing my application becomes blocked. Is there any way to workaround this situation? I am taking into considerat…

---

## [Strange Encoding Behavior](https://www.ruby-forum.com/t/strange-encoding-behavior/181729)

<div class="topic-metadata">

**Author:** [@night\_stalker](https://www.ruby-forum.com/u/night_stalker)\
**Replies:** 5\
**Last updated:** [January 18, 2010, 5:23am UTC](https://www.ruby-forum.com/t/strange-encoding-behavior/181729 "2010-01-18T05:23:12Z")

</div>

The encoding of FILE is always the same as Encoding.default\_external even if there is a magic column. Sometimes it is necessary to convert the string into another encoding. Here is some code to demonstrate the issue: …

---

## [RCR: fork(n) {|n| }](https://www.ruby-forum.com/t/rcr-fork-n-n/181115)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 12\
**Last updated:** [January 18, 2010, 5:06am UTC](https://www.ruby-forum.com/t/rcr-fork-n-n/181115 "2010-01-18T05:06:08Z")

</div>

Currently, it’s surprising to me to have the semantics of fork differ from thread. Currently with thread we allow (optionally) for Thread.new(n) {|n| } however fork is always fork { } Which makes it hard-ish-er …

---

## [LA Ruby Conf 2010 - Workshop training posted for 2/19](https://www.ruby-forum.com/t/la-ruby-conf-2010-workshop-training-posted-for-2-19/181776)

<div class="topic-metadata">

**Author:** [@Coby\_Randquist](https://www.ruby-forum.com/u/Coby_Randquist)\
**Replies:** 0\
**Last updated:** [January 18, 2010, 4:48am UTC](https://www.ruby-forum.com/t/la-ruby-conf-2010-workshop-training-posted-for-2-19/181776 "2010-01-18T04:48:40Z")

</div>

The workshop schedule for Friday February 19th is posted. Registration is limited to 25 people per workshop. The four workshops are: Ruby Koans (Introduction to Ruby) - Jim W. and Joe O’Brien from EdgeCase Introduct…

---

## [Bug?: Ruby2Ruby and ParseTree on IronRuby](https://www.ruby-forum.com/t/bug-ruby2ruby-and-parsetree-on-ironruby/181767)

<div class="topic-metadata">

**Author:** [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 4:00am UTC](https://www.ruby-forum.com/t/bug-ruby2ruby-and-parsetree-on-ironruby/181767 "2010-01-18T04:00:39Z")

</div>

Hi guys, For a project I want to be able to get access to the block definition as a string. After some help I came up with this: Parse\_Ruby.rb · GitHub This solves the problem. When I run the same code on top of Iron…

---

## [Rc2](https://www.ruby-forum.com/t/rc2/181765)

<div class="topic-metadata">

**Author:** [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Replies:** 1\
**Last updated:** [January 18, 2010, 3:49am UTC](https://www.ruby-forum.com/t/rc2/181765 "2010-01-18T03:49:32Z")

</div>

Hi guys, With the latest performance improvements and -S feature, any ideas on when RC2 will be pushed out? Thanks Ben

---

## [What is the equivalent of C++ "this"?](https://www.ruby-forum.com/t/what-is-the-equivalent-of-c-this/181770)

<div class="topic-metadata">

**Author:** [@lalawawa](https://www.ruby-forum.com/u/lalawawa)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 3:17am UTC](https://www.ruby-forum.com/t/what-is-the-equivalent-of-c-this/181770 "2010-01-18T03:17:20Z")

</div>

I want to write a method within class Array that will put single quotes around every element of the array. “this” doesn’t work in Ruby. If it did I would write class Array def quote length.times {|i| this\[i\] = “’” …

---

## [Deploying rails app on Glassfish v3 gives LinkageError on jdk6 u18, jruby 1.4.0](https://www.ruby-forum.com/t/deploying-rails-app-on-glassfish-v3-gives-linkageerror-on-jdk6-u18-jruby-1-4-0/181719)

<div class="topic-metadata">

**Author:** [@Vivek\_P](https://www.ruby-forum.com/u/Vivek_P)\
**Replies:** 3\
**Last updated:** [January 18, 2010, 3:03am UTC](https://www.ruby-forum.com/t/deploying-rails-app-on-glassfish-v3-gives-linkageerror-on-jdk6-u18-jruby-1-4-0/181719 "2010-01-18T03:03:51Z")

</div>

I am trying to deploy a simple rails app on glassfish v3 using jdk6 u18, jruby 1.4.0 and it gives /tools/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:271:in require\_frameworks': library socket’ co…

---

## [ActionView::TemplateError (stack level too deep) on line #17](https://www.ruby-forum.com/t/actionview-templateerror-stack-level-too-deep-on-line-17/181667)

<div class="topic-metadata">

**Author:** [@satynos](https://www.ruby-forum.com/u/satynos)\
**Replies:** 3\
**Last updated:** [January 18, 2010, 12:32am UTC](https://www.ruby-forum.com/t/actionview-templateerror-stack-level-too-deep-on-line-17/181667 "2010-01-18T00:32:49Z")

</div>

I have developed my application using Rails 2.3.5, ActiveScaffold and deployed on Weblogic 10.2 (JDK-1.5.0\_17) without any problem on my local machine (Windows XP). The same app when deployed on the production server …

---

## [Image processing in ruby](https://www.ruby-forum.com/t/image-processing-in-ruby/181753)

<div class="topic-metadata">

**Author:** [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Replies:** 3\
**Last updated:** [January 18, 2010, 12:25am UTC](https://www.ruby-forum.com/t/image-processing-in-ruby/181753 "2010-01-18T00:25:13Z")

</div>

Hello I was wondering if I could do image processing in Ruby or would have to resort to something else for that. Looking at available bindings I find ImageScience - thumbnailer only, useless RMagick - no useful func…

---

## [Creating Java array of Classes](https://www.ruby-forum.com/t/creating-java-array-of-classes/181718)

<div class="topic-metadata">

**Author:** [@philostler](https://www.ruby-forum.com/u/philostler)\
**Replies:** 1\
**Last updated:** [January 17, 2010, 11:57pm UTC](https://www.ruby-forum.com/t/creating-java-array-of-classes/181718 "2010-01-17T23:57:08Z")

</div>

Hi, I’m trying to use Java’s (1.6) URLConnection with JRuby and all has gone well except when I’m trying use the getContent method. The method signature is “getContent(Class\[\] classes)” as it needs to know the class …

---

## [Socket writing limit](https://www.ruby-forum.com/t/socket-writing-limit/181735)

<div class="topic-metadata">

**Author:** [@Philliam\_A](https://www.ruby-forum.com/u/Philliam_A)\
**Replies:** 2\
**Last updated:** [January 17, 2010, 11:50pm UTC](https://www.ruby-forum.com/t/socket-writing-limit/181735 "2010-01-17T23:50:41Z")

</div>

Hey guys, I am doing some socket programming in ruby and I was wondering if there was a limit to the amount of data you should write to a socket at one time. For example, if I do a = File.new(“blah”) #file blah is 20…

---

## [Net/smtp authorization exception](https://www.ruby-forum.com/t/net-smtp-authorization-exception/181747)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 1\
**Last updated:** [January 17, 2010, 10:34pm UTC](https://www.ruby-forum.com/t/net-smtp-authorization-exception/181747 "2010-01-17T22:34:00Z")

</div>

I can’t send email using net/smtp from my mac running OSX 10.4. The SMTP server is run by my Internet Service Provider. Any idea what I’m doing wrong? This is my code: Net::SMTP.start(‘mail.mnet-online.de’,25,‘localh…

---

## [Capistrano: saving a result on var](https://www.ruby-forum.com/t/capistrano-saving-a-result-on-var/181743)

<div class="topic-metadata">

**Author:** [@botp](https://www.ruby-forum.com/u/botp)\
**Replies:** 3\
**Last updated:** [January 17, 2010, 6:19pm UTC](https://www.ruby-forum.com/t/capistrano-saving-a-result-on-var/181743 "2010-01-17T18:19:59Z")

</div>

Hi All, sorry if this dumb and not pure ruby q, but i just hit a bump on capistrano. how does one get a result of a run or sudo? eg, task :testing do x = run “date” p x end it runs without error but i get nothin…

---

## [Which source file?](https://www.ruby-forum.com/t/which-source-file/181741)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 8\
**Last updated:** [January 17, 2010, 5:11pm UTC](https://www.ruby-forum.com/t/which-source-file/181741 "2010-01-17T17:11:45Z")

</div>

Windows development environment. After starting webrick using ruby script/server webrick --debugger I started poking around and found … (rdb:2) @devise\_mapping #\<Devise::Mapping:0x7182728 @for=\[:authenticatable, :a…

---

## [When to use \* arguments?](https://www.ruby-forum.com/t/when-to-use-arguments/181257)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 3\
**Last updated:** [January 17, 2010, 3:39pm UTC](https://www.ruby-forum.com/t/when-to-use-arguments/181257 "2010-01-17T15:39:38Z")

</div>

version one: def say(\*a) a.each {|r| puts r } end say(1,2,3) version two: def say(a) a.each {|r| puts r } end say(\[1,2,3\]) So, any different here? when should we \* arguments like version one?

---

## [Debugger not available](https://www.ruby-forum.com/t/debugger-not-available/181742)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 0\
**Last updated:** [January 17, 2010, 3:31pm UTC](https://www.ruby-forum.com/t/debugger-not-available/181742 "2010-01-17T15:31:24Z")

</div>

f:\\Ralph-Rails-Apps\\WebOfTrust\>ruby script/server webrick --debugger =\> Booting WEBrick =\> Rails 2.3.5 application starting on http://0.0.0.0:3000 f:/Ralph-Rails-Apps/WebOfTrust/config/initializers/at\_file\_line\_msg.rb…

---

## [How can I modify the xml file directly?](https://www.ruby-forum.com/t/how-can-i-modify-the-xml-file-directly/181698)

<div class="topic-metadata">

**Author:** [@milo\_luo](https://www.ruby-forum.com/u/milo_luo)\
**Replies:** 10\
**Last updated:** [January 17, 2010, 9:40am UTC](https://www.ruby-forum.com/t/how-can-i-modify-the-xml-file-directly/181698 "2010-01-17T09:40:21Z")

</div>

Hi, folks Here I have a piece of xml file example: Programming Ruby Dave T. $54.96 If I want to modify the price of the book directly to the xml file, can I do that and how can I do that? Thanks very much. BR…

---

## [How to judge the command result of batch by Net::telnet](https://www.ruby-forum.com/t/how-to-judge-the-command-result-of-batch-by-net-telnet/181524)

<div class="topic-metadata">

**Author:** [@bagadoughnuts](https://www.ruby-forum.com/u/bagadoughnuts)\
**Replies:** 3\
**Last updated:** [January 17, 2010, 2:41am UTC](https://www.ruby-forum.com/t/how-to-judge-the-command-result-of-batch-by-net-telnet/181524 "2010-01-17T02:41:54Z")

</div>

telnet = Net::Telnet::new(“Host” =\> “192.168.0.16”, “Timeout” =\> 10, “Prompt” =\> /\[$%#\>\] \\z/n) telnet.login(“username”, “password”) { |c| print c } result = telnet.cmd(“c:\\test.bat”) telnet.close how to judge the r…

---

## [Re: rexml/document with IronRuby](https://www.ruby-forum.com/t/re-rexml-document-with-ironruby/181702)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 3\
**Last updated:** [January 16, 2010, 6:45pm UTC](https://www.ruby-forum.com/t/re-rexml-document-with-ironruby/181702 "2010-01-16T18:45:32Z")

</div>

I don’t remember the exact command, but there is a method… SetupSearchPath or something like that (it’s on my computer which needs to charge). JD From: Orion E. removed\_email\_address@domain.invalid Sent: Friday, Ja…

---

## [How to know if $stderr is reopened to /dev/null](https://www.ruby-forum.com/t/how-to-know-if-stderr-is-reopened-to-dev-null/181683)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 7\
**Last updated:** [January 16, 2010, 5:50pm UTC](https://www.ruby-forum.com/t/how-to-know-if-stderr-is-reopened-to-dev-null/181683 "2010-01-16T17:50:35Z")

</div>

Hi, how could I know if $stderr has been redirected to /dev/null? This is, imagine a program does: $stderr.reopen “/dev/null” And later I want to check if it’s redirected to /dev/null or not. I’ve found a method whic…

---

## [Building mysql extension/gem with MinGW (was Re: Gem build issues Ubuntu 9.10 64 bit)](https://www.ruby-forum.com/t/building-mysql-extension-gem-with-mingw-was-re-gem-build-issues-ubuntu-9-10-64-bit/181636)

<div class="topic-metadata">

**Author:** [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Replies:** 3\
**Last updated:** [January 16, 2010, 5:16pm UTC](https://www.ruby-forum.com/t/building-mysql-extension-gem-with-mingw-was-re-gem-build-issues-ubuntu-9-10-64-bit/181636 "2010-01-16T17:16:39Z")

</div>

On Thu, Jan 14, 2010 at 5:26 PM, Eric C. removed\_email\_address@domain.invalid wrote: On Jan 13, 10:36 pm, Dale A. removed\_email\_address@domain.invalid wrote: No definition for field\_name Luis L. Ugh, I top-pos…

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

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