# Ruby

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

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

---

## [RejectConf RubyOSA hack](https://www.ruby-forum.com/t/rejectconf-rubyosa-hack/83010)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 7\
**Last updated:** [January 24, 2007, 12:22am UTC](https://www.ruby-forum.com/t/rejectconf-rubyosa-hack/83010 "2007-01-24T00:22:53Z")

</div>

I remember vaguely from RejectConf someone hacked up something to position windows on OS X using Ruby OSA. Did this ever get released? Or at least, is that code available somewhere? If anyone remembers this and has …

---

## [Lite RESTful Webservlet](https://www.ruby-forum.com/t/lite-restful-webservlet/82993)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 6\
**Last updated:** [January 23, 2007, 10:25pm UTC](https://www.ruby-forum.com/t/lite-restful-webservlet/82993 "2007-01-23T22:25:32Z")

</div>

Can anyone give me a quick and dirty account of creating a light-weight RESTful web-servlet that can be used to pass data and a file or two to a server. (I’m thinking webrick and maybe JSON could be used?) Anything t…

---

## [Re: wrapping class method](https://www.ruby-forum.com/t/re-wrapping-class-method/83141)

<div class="topic-metadata">

**Author:** [@BallS\_Donald\_A\_Jr\_S](https://www.ruby-forum.com/u/BallS_Donald_A_Jr_S)\
**Replies:** 0\
**Last updated:** [January 23, 2007, 9:36pm UTC](https://www.ruby-forum.com/t/re-wrapping-class-method/83141 "2007-01-23T21:36:19Z")

</div>

def self.establish\_connection(arg) logger.debug("Establishing connection") self.old\_establish\_connection(arg) end end end Yes, that’s exactly it. And it even clarifies the class \<\< self idiom that I’ve been cur…

---

## [Help on pp / Wirble (irb)?](https://www.ruby-forum.com/t/help-on-pp-wirble-irb/82890)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 6\
**Last updated:** [January 23, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/help-on-pp-wirble-irb/82890 "2007-01-23T21:20:14Z")

</div>

Wirble is an enhancement to irb that gives you syntax coloring. http://pablotron.org/software/wirble/ It also loads a few gems automatically, such as pp and irb/completion; doing this also enhances irb, obviously. Ho…

---

## [Ruby Symbol](https://www.ruby-forum.com/t/ruby-symbol/83138)

<div class="topic-metadata">

**Author:** [@aliasxneo](https://www.ruby-forum.com/u/aliasxneo)\
**Replies:** 1\
**Last updated:** [January 23, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/ruby-symbol/83138 "2007-01-23T21:18:14Z")

</div>

I have been looking into what exactly a Ruby symbol is and have gotten some decent info on how they work. I have only one question, how are they used in functions like in Rails? I see Rails function like: func(“string…

---

## [Wrapping class method](https://www.ruby-forum.com/t/wrapping-class-method/83120)

<div class="topic-metadata">

**Author:** [@BallS\_Donald\_A\_Jr\_S](https://www.ruby-forum.com/u/BallS_Donald_A_Jr_S)\
**Replies:** 2\
**Last updated:** [January 23, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/wrapping-class-method/83120 "2007-01-23T21:13:12Z")

</div>

Hey guys, I’m having trouble figuring out how to wrap a class method. I want to add a logger.debug to ActiveRecord::Base.establish\_connection, just trying to figure out how the rails database connection lifecycle is s…

---

## [Deploying (and updating) a ruby client application on a Wind](https://www.ruby-forum.com/t/deploying-and-updating-a-ruby-client-application-on-a-wind/83093)

<div class="topic-metadata">

**Author:** [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Replies:** 1\
**Last updated:** [January 23, 2007, 9:05pm UTC](https://www.ruby-forum.com/t/deploying-and-updating-a-ruby-client-application-on-a-wind/83093 "2007-01-23T21:05:09Z")

</div>

Hi, I’m about to deploy a ruby client-server application on multiple computers on a LAN, and I was wondering if anyone had experience in this domain. Installation requires a few steps: Install Ruby Install FXRuby In…

---

## [Placing tabs in strings in irb](https://www.ruby-forum.com/t/placing-tabs-in-strings-in-irb/83016)

<div class="topic-metadata">

**Author:** [@Michael\_WSRyder](https://www.ruby-forum.com/u/Michael_WSRyder)\
**Replies:** 15\
**Last updated:** [January 23, 2007, 8:46pm UTC](https://www.ruby-forum.com/t/placing-tabs-in-strings-in-irb/83016 "2007-01-23T20:46:01Z")

</div>

Is there any reason I cannot embed tabs in a string while using irb? I am trying to create a string using tabs to separate the various values for testing – i.e. a = ‘1 2 3 4’. Using irb it either ignores the tab …

---

## [How do I tell extconf.rb/mkmf NOT to try and use cl.exe](https://www.ruby-forum.com/t/how-do-i-tell-extconf-rb-mkmf-not-to-try-and-use-cl-exe/83112)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 4\
**Last updated:** [January 23, 2007, 8:45pm UTC](https://www.ruby-forum.com/t/how-do-i-tell-extconf-rb-mkmf-not-to-try-and-use-cl-exe/83112 "2007-01-23T20:45:00Z")

</div>

I’m trying to compile an extension on Windows using ruby extconf.rb. However, if I try it in Cygwin or in a command window (with MinGW’s bin directory in the PATH), it fails and the mkmf.log file shows that the “cl” e…

---

## [Gem install - install directory not absolute](https://www.ruby-forum.com/t/gem-install-install-directory-not-absolute/82940)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 8\
**Last updated:** [January 23, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/gem-install-install-directory-not-absolute/82940 "2007-01-23T20:06:52Z")

</div>

When I run … sudo gem install rails -y I get … ERROR: While executing gem … (ArgumentError) install directory “/usr/local/lib/ruby/gems/./gems/ activesupport-1.4.0” not absolute The directory /usr/local/lib/ruby/g…

---

## [Using Regular Expressions in Arrays](https://www.ruby-forum.com/t/using-regular-expressions-in-arrays/83103)

<div class="topic-metadata">

**Author:** [@studbucket](https://www.ruby-forum.com/u/studbucket)\
**Replies:** 5\
**Last updated:** [January 23, 2007, 7:25pm UTC](https://www.ruby-forum.com/t/using-regular-expressions-in-arrays/83103 "2007-01-23T19:25:04Z")

</div>

Hey everyone, Right now I have an array of terms and I want to delete/find a term using pattern matching. For example, I have the following array (this is a very simple example). x = \[“dog”, “cat”, “moose”\] x.includ…

---

## [Tar2rubyscript: getting the path of the original executable](https://www.ruby-forum.com/t/tar2rubyscript-getting-the-path-of-the-original-executable/83068)

<div class="topic-metadata">

**Author:** [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Replies:** 4\
**Last updated:** [January 23, 2007, 6:55pm UTC](https://www.ruby-forum.com/t/tar2rubyscript-getting-the-path-of-the-original-executable/83068 "2007-01-23T18:55:34Z")

</div>

Hi, I try using tar2rubyscript and I need to get the path to the original executable. oldlocation doesn’t seem to help because it referes to the original working directory. Any idea? Patrick

---

## [Hash pairs at?](https://www.ruby-forum.com/t/hash-pairs-at/82792)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 31\
**Last updated:** [January 23, 2007, 6:36pm UTC](https://www.ruby-forum.com/t/hash-pairs-at/82792 "2007-01-23T18:36:31Z")

</div>

Seesm like there should be a mehtod for this: h = { :a=\>1, :b=\>2, :c=\>3 } h.what\_method(:a, :c) #=\> { :a=\>1, :c=\>3 } ^^^^^^^^^^^ Or is there some other simple way we’re supposed to do this? T.

---

## [Asoby: Aspect-Oriented Programming in Ruby](https://www.ruby-forum.com/t/asoby-aspect-oriented-programming-in-ruby/83106)

<div class="topic-metadata">

**Author:** [@Yoshinori\_Sano](https://www.ruby-forum.com/u/Yoshinori_Sano)\
**Replies:** 0\
**Last updated:** [January 23, 2007, 6:31pm UTC](https://www.ruby-forum.com/t/asoby-aspect-oriented-programming-in-ruby/83106 "2007-01-23T18:31:30Z")

</div>

e$B$5$N$h$7$N$je(B e$B$H?=$7$^$9!#e(B e$B$O$8$a$F$NEj9F$G$9!#e(B e$BEbFM$J$N$G$9$,!“e(BRubye$B$NCf$re(BHacke$B$7$F!”\<B83E\*$K%"%9%Z%/%H;X8~%W%m%0%i%%s%0e(B (AOP)e$B$r%M!\<%F%#%V$KBP1~$5$;$F$$^$7$?!#e(B e$B8@8l=hM}7O$N=…

---

## [Is mod\_fastcgi really required for Ruby/Apache 2?](https://www.ruby-forum.com/t/is-mod-fastcgi-really-required-for-ruby-apache-2/83002)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [January 23, 2007, 6:24pm UTC](https://www.ruby-forum.com/t/is-mod-fastcgi-really-required-for-ruby-apache-2/83002 "2007-01-23T18:24:29Z")

</div>

Hi, I’m trying to install the latest version of Ruby to work with a just-newly installed Apache 2.2 module on my x86 Fedora Core 5 Linux machine. I read (http://wiki.rubyonrails.com/rails/pages/RailsOnFedora) that …

---

## [Multiplying array](https://www.ruby-forum.com/t/multiplying-array/83079)

<div class="topic-metadata">

**Author:** [@wkc](https://www.ruby-forum.com/u/wkc)\
**Replies:** 10\
**Last updated:** [January 23, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/multiplying-array/83079 "2007-01-23T17:57:33Z")

</div>

HI, Does anyone know of a function that multiplies the contents of an array. For example: one = \[1,2,3\] two = \[\[2\],\[3\],\[4\]\] output = \[\[2\],\[6\],\[12\]\] I’ve written a simple function that does this, however I’m sure th…

---

## [Convert Python sample code to Ruby](https://www.ruby-forum.com/t/convert-python-sample-code-to-ruby/83097)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [January 23, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/convert-python-sample-code-to-ruby/83097 "2007-01-23T17:36:15Z")

</div>

Hi, Can some one conver the following sample code to RUBY please? Many Thanks. import urllib import urllib2 from xml.dom import minidom user=“YourUserName” password=“YourPassword” site=‘https://test.api.betfairga…

---

## [Matching arrays within arrays](https://www.ruby-forum.com/t/matching-arrays-within-arrays/83090)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 3\
**Last updated:** [January 23, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/matching-arrays-within-arrays/83090 "2007-01-23T16:40:53Z")

</div>

Hello, I have a number of arrays within arrays. Some of them are duplicatess like: \[\[foo, bar, ru, by\], \[ru\], \[bar, foo\], \[foo, bar, ru, by\]\] I would like to remove duplicates to end up with: \[\[foo, bar, ru, by\], \[…

---

## [Option parser: decrease distance between arg and explanation](https://www.ruby-forum.com/t/option-parser-decrease-distance-between-arg-and-explanation/83054)

<div class="topic-metadata">

**Author:** [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Replies:** 2\
**Last updated:** [January 23, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/option-parser-decrease-distance-between-arg-and-explanation/83054 "2007-01-23T16:06:14Z")

</div>

Hi all, I use option parser and I would like to decrease a distance in the output. Example: #!/usr/bin/env ruby require “optparse” a=ARGV.options { |opts| opts.on("-a","–all",“do everything”) opts.on("-h","–help")…

---

## [Module global variables](https://www.ruby-forum.com/t/module-global-variables/82839)

<div class="topic-metadata">

**Author:** [@Stefano\_Z](https://www.ruby-forum.com/u/Stefano_Z)\
**Replies:** 13\
**Last updated:** [January 23, 2007, 10:45am UTC](https://www.ruby-forum.com/t/module-global-variables/82839 "2007-01-23T10:45:30Z")

</div>

Is there a way to define per-module global variables? My best approximation is the following module Foo @@x = 0 def do\_something\_on\_x @@x = … end def x @@x end end The drawbacks are that I haven’t found anythi…

---

## [Silly Array Question](https://www.ruby-forum.com/t/silly-array-question/82964)

<div class="topic-metadata">

**Author:** [@thekog](https://www.ruby-forum.com/u/thekog)\
**Replies:** 11\
**Last updated:** [January 23, 2007, 10:19am UTC](https://www.ruby-forum.com/t/silly-array-question/82964 "2007-01-23T10:19:28Z")

</div>

This will probably be a silly question, but I’ve been searching for quite awhile now and have been unable to locate how to do this. I have two arrays which come from two different files. One is a CSV file and the oth…

---

## [Passing XML string in Hash](https://www.ruby-forum.com/t/passing-xml-string-in-hash/83045)

<div class="topic-metadata">

**Author:** [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Replies:** 0\
**Last updated:** [January 23, 2007, 9:41am UTC](https://www.ruby-forum.com/t/passing-xml-string-in-hash/83045 "2007-01-23T09:41:20Z")

</div>

Hi group. I use a hash to pass a group of arguments around. One of the args (the ‘query’ key in the sample below) is a string which holds XML… and when I try to read the value of the ‘query’ key in my function I get a…

---

## [Recursive send](https://www.ruby-forum.com/t/recursive-send/82610)

<div class="topic-metadata">

**Author:** [@cuspendlove](https://www.ruby-forum.com/u/cuspendlove)\
**Replies:** 3\
**Last updated:** [January 23, 2007, 9:06am UTC](https://www.ruby-forum.com/t/recursive-send/82610 "2007-01-23T09:06:15Z")

</div>

I posted this to the Dallas Ruby Brigade, but thought it might be interesting for the larger Ruby audience. Your comments, questions, and complete debunking of why something like this is even necessary are welcomed. …

---

## [If-Then and "End"](https://www.ruby-forum.com/t/if-then-and-end/83031)

<div class="topic-metadata">

**Author:** [@samckayak](https://www.ruby-forum.com/u/samckayak)\
**Replies:** 6\
**Last updated:** [January 23, 2007, 9:01am UTC](https://www.ruby-forum.com/t/if-then-and-end/83031 "2007-01-23T09:01:14Z")

</div>

I am making a program with various commands. One of them is “Exit” which is supposed to exit the program. Here is my code: if uinput = “EXIT” then end end The problem is that the ruby compiler thinks that the first …

---

## [WEBrick with SSL: undefined method \`create\_extension'](https://www.ruby-forum.com/t/webrick-with-ssl-undefined-method-create-extension/83043)

<div class="topic-metadata">

**Author:** [@S\_bbb\_S](https://www.ruby-forum.com/u/S_bbb_S)\
**Replies:** 0\
**Last updated:** [January 23, 2007, 8:57am UTC](https://www.ruby-forum.com/t/webrick-with-ssl-undefined-method-create-extension/83043 "2007-01-23T08:57:07Z")

</div>

Hi, I’m trying to get WEBrick to run a https site but I get the following error (it seems after keys have been generated for the cert). root@OpenWrt:/# ruby sslserver.rb \[2000-01-06 18:38:03\] INFO WEBrick 1.3.1 \[…

---

## [\[ANN\] Rassmalog 2.3.0](https://www.ruby-forum.com/t/ann-rassmalog-2-3-0/83037)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [January 23, 2007, 8:20am UTC](https://www.ruby-forum.com/t/ann-rassmalog-2-3-0/83037 "2007-01-23T08:20:49Z")

</div>

Rassmalog is a static blog engine based on RSS 2.0, YAML, and Textile. It features an extensible blog formatting mechanism, easy configuration, and automatic tagging, archiving, syntax coloring, and table of contents. …

---

## [Method notation question](https://www.ruby-forum.com/t/method-notation-question/82948)

<div class="topic-metadata">

**Author:** [@avdi](https://www.ruby-forum.com/u/avdi)\
**Replies:** 14\
**Last updated:** [January 23, 2007, 7:55am UTC](https://www.ruby-forum.com/t/method-notation-question/82948 "2007-01-23T07:55:05Z")

</div>

I’ve been using Ruby for years, and it just occurred to me to ask: where did the convention of referring to methods using a hash/pound/octothorpe symbol (#), as in “#foo” or “MyClass#bar”, come from? Is it a Smalltal…

---

## [Baseruby](https://www.ruby-forum.com/t/baseruby/81928)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 5\
**Last updated:** [January 23, 2007, 7:43am UTC](https://www.ruby-forum.com/t/baseruby/81928 "2007-01-23T07:43:01Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B trunke$B$G!"e(BBASERUBYe$B$,e(B"ruby"e$B7h$aBG$A$G2?$+$HITJX$J$N$G!"e(Bconfigure e$B$N%\*%W%7%g%s$H$7$F;XDj$G$-$k$h$&$K$9$k%Q%C%A$r:n$C$F$\_$^$7$?!#e(B configure.ine$B$N:…

---

## [Attr\_accessor weirdness, or something](https://www.ruby-forum.com/t/attr-accessor-weirdness-or-something/82748)

<div class="topic-metadata">

**Author:** [@CBlair1986](https://www.ruby-forum.com/u/CBlair1986)\
**Replies:** 5\
**Last updated:** [January 23, 2007, 6:50am UTC](https://www.ruby-forum.com/t/attr-accessor-weirdness-or-something/82748 "2007-01-23T06:50:56Z")

</div>

Hi all! I’ve got a question, and I hope it can be answered. I’m currently using attr\_accessor to set up a list of variables that are accessed throughout a class, and I’m running into trouble. See, I’ve got something l…

---

## [FreeRIDE - Way too many warnings](https://www.ruby-forum.com/t/freeride-way-too-many-warnings/82777)

<div class="topic-metadata">

**Author:** [@grauenwolf](https://www.ruby-forum.com/u/grauenwolf)\
**Replies:** 28\
**Last updated:** [January 23, 2007, 5:48am UTC](https://www.ruby-forum.com/t/freeride-way-too-many-warnings/82777 "2007-01-23T05:48:49Z")

</div>

Whenever I start FreeRIDE I get a ton of warnings. It takes a long time to start as well, probably because it is I/O bound to the console window. Suggestions? Jonathan 2.so: warning: already initialized constant FOL…

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

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