# Ruby

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

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

---

## [Escape character is strings](https://www.ruby-forum.com/t/escape-character-is-strings/121289)

<div class="topic-metadata">

**Author:** [@agnibhu](https://www.ruby-forum.com/u/agnibhu)\
**Replies:** 3\
**Last updated:** [November 26, 2007, 7:32pm UTC](https://www.ruby-forum.com/t/escape-character-is-strings/121289 "2007-11-26T19:32:23Z")

</div>

Hi all, I’m very new to Ruby. My problem is simply to search for ‘’ character from a string. The string is the windows file path. I have to either escape the ‘’ character or substitute it with ‘/’. But String::include…

---

## [European Ruby Conference 2008 in Prague, Czech Republic?](https://www.ruby-forum.com/t/european-ruby-conference-2008-in-prague-czech-republic/121240)

<div class="topic-metadata">

**Author:** [@kajism](https://www.ruby-forum.com/u/kajism)\
**Replies:** 12\
**Last updated:** [November 26, 2007, 7:13pm UTC](https://www.ruby-forum.com/t/european-ruby-conference-2008-in-prague-czech-republic/121240 "2007-11-26T19:13:18Z")

</div>

Hi all, the attendees of the European Ruby Conference 2007 have almost universally agreed, that the next year the conference should take place in Prague, Czech Republic (Google Maps +czech+republic&z=4). While no su…

---

## [Detecting active windows process](https://www.ruby-forum.com/t/detecting-active-windows-process/121285)

<div class="topic-metadata">

**Author:** [@dannyheathcote](https://www.ruby-forum.com/u/dannyheathcote)\
**Replies:** 3\
**Last updated:** [November 26, 2007, 6:30pm UTC](https://www.ruby-forum.com/t/detecting-active-windows-process/121285 "2007-11-26T18:30:52Z")

</div>

Hi, Is there a way to detect if a specified program e.g. firefox.exe is active / on top? Thanks in advance

---

## [Has the soap/soap4r module changed recently?](https://www.ruby-forum.com/t/has-the-soap-soap4r-module-changed-recently/121302)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 26, 2007, 5:45pm UTC](https://www.ruby-forum.com/t/has-the-soap-soap4r-module-changed-recently/121302 "2007-11-26T17:45:42Z")

</div>

I’m taking babysteps learning ruby. The following snippet of code worked until last week, when our sysadmin applied some patches/updates from Redhat. require “soap/wsdlDriver” wsdl = “HTTP://localhost:8181/customer” …

---

## [Problems with GServer not accepting connections (resolved)](https://www.ruby-forum.com/t/problems-with-gserver-not-accepting-connections-resolved/121299)

<div class="topic-metadata">

**Author:** [@Christian\_von\_Kleis](https://www.ruby-forum.com/u/Christian_von_Kleis)\
**Replies:** 0\
**Last updated:** [November 26, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/problems-with-gserver-not-accepting-connections-resolved/121299 "2007-11-26T17:23:30Z")

</div>

This weekend I had some trouble with a GServer-based server when my site definr.com got on the Digg front page. I found a solution, so here’s a record for anyone else with similar problems. After a seemingly random n…

---

## [CGIExt 0.0.2 released - a re-implementation of cgi.rb in C extension](https://www.ruby-forum.com/t/cgiext-0-0-2-released-a-re-implementation-of-cgi-rb-in-c-extension/121286)

<div class="topic-metadata">

**Author:** [@makoto\_kuwata](https://www.ruby-forum.com/u/makoto_kuwata)\
**Replies:** 0\
**Last updated:** [November 26, 2007, 3:05pm UTC](https://www.ruby-forum.com/t/cgiext-0-0-2-released-a-re-implementation-of-cgi-rb-in-c-extension/121286 "2007-11-26T15:05:36Z")

</div>

Hi, all. I have released CGIExt 0.0.2. http://rubyforge.org/projects/cgiext/ == About ‘CGIExt’ is a re-implementation of ‘cgi.rb’ in C extension. It makes your web application faster. Currently, not of all functio…

---

## [Easy way for a Nuub to get link-element from a html-source](https://www.ruby-forum.com/t/easy-way-for-a-nuub-to-get-link-element-from-a-html-source/121272)

<div class="topic-metadata">

**Author:** [@strube](https://www.ruby-forum.com/u/strube)\
**Replies:** 6\
**Last updated:** [November 26, 2007, 2:58pm UTC](https://www.ruby-forum.com/t/easy-way-for-a-nuub-to-get-link-element-from-a-html-source/121272 "2007-11-26T14:58:34Z")

</div>

hi all. im very new to ruby and im not sure how to do this the easiest way in ruby. i want to read the content from e.g. “www.spiegel.de” and just this line and from this line the “title” and the “href” since the o…

---

## [Core dump with undef/alias using dynamic symbols](https://www.ruby-forum.com/t/core-dump-with-undef-alias-using-dynamic-symbols/120570)

<div class="topic-metadata">

**Author:** [@sugie](https://www.ruby-forum.com/u/sugie)\
**Replies:** 8\
**Last updated:** [November 26, 2007, 2:55pm UTC](https://www.ruby-forum.com/t/core-dump-with-undef-alias-using-dynamic-symbols/120570 "2007-11-26T14:55:04Z")

</div>

e$B:XF#$H?=$7$^$9!#e(B undefe$B$K\<0E83+$rH\<$&%7%s%%k$rEO$9$H!"0J2\<$N$h$&$Ke(Bcoree$B$rEG$-$^$9!#e(B $ ruby-trunk -ve ‘undef :"#{foo}"’ ruby 1.9.0 (2007-11-18 patchlevel 0) \[i686-linux\] – control frame ---------- c:0…

---

## [Modifying A Remote Zip File](https://www.ruby-forum.com/t/modifying-a-remote-zip-file/120984)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 2\
**Last updated:** [November 26, 2007, 2:52pm UTC](https://www.ruby-forum.com/t/modifying-a-remote-zip-file/120984 "2007-11-26T14:52:08Z")

</div>

Hello, Is it possible to modify a zip file over HTTP? I have a zip file stored on Amazon S3. If I want to delete a file from it, or add a new file to it from my local disk, can I do that without having to download t…

---

## [Is this pattern current?](https://www.ruby-forum.com/t/is-this-pattern-current/121279)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 3\
**Last updated:** [November 26, 2007, 2:04pm UTC](https://www.ruby-forum.com/t/is-this-pattern-current/121279 "2007-11-26T14:04:35Z")

</div>

Hi list I just wrote o = super( \*args) my\_init.bind( o ).call( \*args ) o I write code of this patter way too often, I was just thinking that I really would like to have module Kernel def with\_value\_return\_value a…

---

## [Ruby on Vista problems](https://www.ruby-forum.com/t/ruby-on-vista-problems/121234)

<div class="topic-metadata">

**Author:** [@artoruby](https://www.ruby-forum.com/u/artoruby)\
**Replies:** 10\
**Last updated:** [November 26, 2007, 11:46am UTC](https://www.ruby-forum.com/t/ruby-on-vista-problems/121234 "2007-11-26T11:46:44Z")

</div>

I have problems running the latest Ruby 1.8.6 on Windows Vista, and this is (my guess) due to permission problems. first of all… after writing the code in SciTE and pressing GO (build) the command prompt will appear f…

---

## [Problem about read .txt file](https://www.ruby-forum.com/t/problem-about-read-txt-file/121271)

<div class="topic-metadata">

**Author:** [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Replies:** 5\
**Last updated:** [November 26, 2007, 11:44am UTC](https://www.ruby-forum.com/t/problem-about-read-txt-file/121271 "2007-11-26T11:44:23Z")

</div>

I have read text by this code message = "" file = File.new(fileDirectory , "r") while line = file.gets message = message+line end file.close puts message @textbox1.set\_value(message) fileDirect…

---

## [Opening filename with a space in it](https://www.ruby-forum.com/t/opening-filename-with-a-space-in-it/121261)

<div class="topic-metadata">

**Author:** [@flamingflamingo](https://www.ruby-forum.com/u/flamingflamingo)\
**Replies:** 6\
**Last updated:** [November 26, 2007, 11:11am UTC](https://www.ruby-forum.com/t/opening-filename-with-a-space-in-it/121261 "2007-11-26T11:11:45Z")

</div>

Hi all, Iâ€™m a Ruby newbie so this is probably not the most challenging question on the net, but, here it goes. How can I open a filename with a space in it? It concerns an Excel file. system('start excel c:\\temp\\o…

---

## [Sprintf("%b", -2147483649) produces "..1"](https://www.ruby-forum.com/t/sprintf-b-2147483649-produces-1/121270)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [November 26, 2007, 11:01am UTC](https://www.ruby-forum.com/t/sprintf-b-2147483649-produces-1/121270 "2007-11-26T11:01:36Z")

</div>

sprintf("%b", -2147483649) e$B$,e(B “…1” e$B$K$J$j$^$9!#e(B % ./ruby -v -e ‘p sprintf("%b", -2147483649)’ ruby 1.9.0 (2007-11-26 patchlevel 0) \[i686-linux\] “…1” -1 e$B$b0J2\<$N$h$&$Ke(B “…1” e$B$K$J$j$^$9$+$i!"6hJL$G$…

---

## [Developing Rails plugin: need some metaprog. help](https://www.ruby-forum.com/t/developing-rails-plugin-need-some-metaprog-help/120993)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 4\
**Last updated:** [November 26, 2007, 10:50am UTC](https://www.ruby-forum.com/t/developing-rails-plugin-need-some-metaprog-help/120993 "2007-11-26T10:50:13Z")

</div>

Hi all I’m developing an authorization plugin that looks like the following so far: module Incense module Authorization def self.included(base\_class) base\_class.extend(ClassMethods) end module ClassMethods def …

---

## [Specify start postion of Regexp matching](https://www.ruby-forum.com/t/specify-start-postion-of-regexp-matching/121221)

<div class="topic-metadata">

**Author:** [@makoto\_kuwata](https://www.ruby-forum.com/u/makoto_kuwata)\
**Replies:** 15\
**Last updated:** [November 26, 2007, 10:06am UTC](https://www.ruby-forum.com/t/specify-start-postion-of-regexp-matching/121221 "2007-11-26T10:06:00Z")

</div>

Hi, all. Is it possible to specify start position of Regexp matching? str = "foo bar baz" m = /ba/.match(str) p m.begin(0) #=\> 4 m = /ba/.match(str, 5) # is it possible? p m.begin(0) #=\> 8 (if…

---

## [Regexp#fixed\_encoding?](https://www.ruby-forum.com/t/regexp-fixed-encoding/121252)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [November 26, 2007, 9:26am UTC](https://www.ruby-forum.com/t/regexp-fixed-encoding/121252 "2007-11-26T09:26:50Z")

</div>

e$B@55,I=8=$K$O!"G$0U$Ne(B (ASCII e$B8\_49$Je(B) e$B%(%s%3!\<%G%#%s%0$NJ8;zNse(B e$B$H%^%C%A$5$;$i$l$k$+!“FCDj$N%(%s%3!\<%G%#%s%0$NJ8;zNs$K$7$+%^%Ce(B e$B%A$5$;$i$l$J$$$+$H$$$&\<oN\`$,$”$j$^$9!#e(B e$B$=$N\<oN\`$rH=JL$9$k$?…

---

## [Instant Rails replaced by the BitNami RubyStack](https://www.ruby-forum.com/t/instant-rails-replaced-by-the-bitnami-rubystack/121052)

<div class="topic-metadata">

**Author:** [@curthibbs](https://www.ruby-forum.com/u/curthibbs)\
**Replies:** 2\
**Last updated:** [November 26, 2007, 9:13am UTC](https://www.ruby-forum.com/t/instant-rails-replaced-by-the-bitnami-rubystack/121052 "2007-11-26T09:13:24Z")

</div>

I no longer have the time to maintain and support Instant Rails, and there will be no further releases. However, Instant Rails is being replaced by the BitNami RubyStack, which you can find here: Ruby Cloud Hosting…

---

## [Supplying multiple procs to initialization](https://www.ruby-forum.com/t/supplying-multiple-procs-to-initialization/121231)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 3\
**Last updated:** [November 26, 2007, 8:40am UTC](https://www.ruby-forum.com/t/supplying-multiple-procs-to-initialization/121231 "2007-11-26T08:40:03Z")

</div>

One of my libraries previously required code like this: Convert markup to HTML, doing something useless with links and commands owl = OWLScribble.new( markup ) owl.wiki\_links.each{ |link| # do something useful to the …

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/121258)

<div class="topic-metadata">

**Author:** [@tnntwister](https://www.ruby-forum.com/u/tnntwister)\
**Replies:** 0\
**Last updated:** [November 26, 2007, 8:00am UTC](https://www.ruby-forum.com/t/no-subject/121258 "2007-11-26T08:00:20Z")

</div>

unsubscribe removed\_email\_address@domain.invalid

---

## [First question in here](https://www.ruby-forum.com/t/first-question-in-here/121204)

<div class="topic-metadata">

**Author:** [@marcos\_rebelo](https://www.ruby-forum.com/u/marcos_rebelo)\
**Replies:** 4\
**Last updated:** [November 26, 2007, 6:01am UTC](https://www.ruby-forum.com/t/first-question-in-here/121204 "2007-11-26T06:01:08Z")

</div>

Hy all I’m new in here, so hi all for the first time. I’m a Perl and I’m trying to learn a second scripting language, and I liked Ruby. I’m getting crazy with one thing, documentation. Where did you set it? Do Ruby a…

---

## [Printing variable name and value](https://www.ruby-forum.com/t/printing-variable-name-and-value/121254)

<div class="topic-metadata">

**Author:** [@adambeazley](https://www.ruby-forum.com/u/adambeazley)\
**Replies:** 1\
**Last updated:** [November 26, 2007, 5:45am UTC](https://www.ruby-forum.com/t/printing-variable-name-and-value/121254 "2007-11-26T05:45:57Z")

</div>

Hi, I want a function that will pretty-print the name and value of a variable, so I can avoid writing things like: puts “x is #{x}” Ideally, I would just be able to pass the variable, or at most a label, to a functi…

---

## [Ruby cache](https://www.ruby-forum.com/t/ruby-cache/121250)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [November 26, 2007, 3:56am UTC](https://www.ruby-forum.com/t/ruby-cache/121250 "2007-11-26T03:56:42Z")

</div>

I am trying to improve the performance of a very simple web application. The web application let’s you choose a library from a drop down box. then it goes to the database and loads the name and birth places of all en…

---

## [Class variable as parameter](https://www.ruby-forum.com/t/class-variable-as-parameter/121109)

<div class="topic-metadata">

**Author:** [@Filipe](https://www.ruby-forum.com/u/Filipe)\
**Replies:** 8\
**Last updated:** [November 26, 2007, 2:51am UTC](https://www.ruby-forum.com/t/class-variable-as-parameter/121109 "2007-11-26T02:51:48Z")

</div>

I have the following situation: class MyClass def setVar(var,varValue) var=varValue end def initialize @myVar=0 setVar(@myVar,1) puts(@myVar.to\_s) end end test = MyClass.new Unfortunately, this piece of code …

---

## [Piping problem](https://www.ruby-forum.com/t/piping-problem/121156)

<div class="topic-metadata">

**Author:** [@Pawel\_R](https://www.ruby-forum.com/u/Pawel_R)\
**Replies:** 8\
**Last updated:** [November 26, 2007, 2:25am UTC](https://www.ruby-forum.com/t/piping-problem/121156 "2007-11-26T02:25:30Z")

</div>

Hello everybody! I’m trying to write a simple program that reads text from standard input and writes text to standard output. The source code is as follows: #!/usr/bin/env ruby text = “” while (line = gets) text+=l…

---

## [OWLScribble 0.9.0; TagTreeScanner 0.8.1](https://www.ruby-forum.com/t/owlscribble-0-9-0-tagtreescanner-0-8-1/121249)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [November 26, 2007, 1:51am UTC](https://www.ruby-forum.com/t/owlscribble-0-9-0-tagtreescanner-0-8-1/121249 "2007-11-26T01:51:02Z")

</div>

The TagTreeScanner class provides a generic framework for creating a nested hierarchy of tags and text (like XML or HTML) by parsing text. gem install tagtreescanner http://tagtreescanner.rubyforge.org/ OWLScribble i…

---

## [Rdebug / emacs / gud](https://www.ruby-forum.com/t/rdebug-emacs-gud/116122)

<div class="topic-metadata">

**Author:** [@jimweirich](https://www.ruby-forum.com/u/jimweirich)\
**Replies:** 6\
**Last updated:** [November 26, 2007, 1:24am UTC](https://www.ruby-forum.com/t/rdebug-emacs-gud/116122 "2007-11-26T01:24:29Z")

</div>

I’m trying to run rdebug from within emacs using gud (Grand Unified Debugger, or something like that). I see there is a rdebug.el package for this. And using it gives me the ability to set breakpoints by visiting the…

---

## [Can't install hpricot on cygwin](https://www.ruby-forum.com/t/cant-install-hpricot-on-cygwin/121202)

<div class="topic-metadata">

**Author:** [@pood](https://www.ruby-forum.com/u/pood)\
**Replies:** 6\
**Last updated:** [November 26, 2007, 1:01am UTC](https://www.ruby-forum.com/t/cant-install-hpricot-on-cygwin/121202 "2007-11-26T01:01:46Z")

</div>

I’m trying to run scRUBYt on winXp, but found out it just doesn’t work. So the work around is to use cygwin. I’m trying to install Hpricot I keep on getting this error: ============ ERROR: Error installing hpricot…

---

## [How to give depth to arrays?](https://www.ruby-forum.com/t/how-to-give-depth-to-arrays/120959)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 12\
**Last updated:** [November 26, 2007, 12:39am UTC](https://www.ruby-forum.com/t/how-to-give-depth-to-arrays/120959 "2007-11-26T00:39:15Z")

</div>

Hi, I’m trying to convert an array like \[2,3,3,5,4,4\] in \[2,\[3,3,\[\[5\],4,4\]\]\], but I really can’t figure how to this. Is there any way to achieve this in Ruby? Thanks in advance.

---

## [Has anyone used File.stat to check permissions](https://www.ruby-forum.com/t/has-anyone-used-file-stat-to-check-permissions/121238)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 3\
**Last updated:** [November 26, 2007, 12:27am UTC](https://www.ruby-forum.com/t/has-anyone-used-file-stat-to-check-permissions/121238 "2007-11-26T00:27:43Z")

</div>

In ruby API there is an example s = File.stat(“testfile”) sprintf("%o", s.mode) #=\> “100644” I need to check the last three numbers from the octal notation which is “644” which means: rw- for user r-- for…

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

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