# Ruby

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

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

---

## [The symbol dilemma](https://www.ruby-forum.com/t/the-symbol-dilemma/146137)

<div class="topic-metadata">

**Author:** [@Mayuresh\_K](https://www.ruby-forum.com/u/Mayuresh_K)\
**Replies:** 3\
**Last updated:** [August 18, 2008, 12:47pm UTC](https://www.ruby-forum.com/t/the-symbol-dilemma/146137 "2008-08-18T12:47:05Z")

</div>

Hi, There’s one more thing, I also read the following statements; Ruby’s hashes can use any object as a key, but Symbol objects are the most commonly used. Symbols are immutable, interned strings. They can be compared…

---

## [I wish to learn Ruby ,can anyone teach me?](https://www.ruby-forum.com/t/i-wish-to-learn-ruby-can-anyone-teach-me/146058)

<div class="topic-metadata">

**Author:** [@amitanshugour](https://www.ruby-forum.com/u/amitanshugour)\
**Replies:** 9\
**Last updated:** [August 18, 2008, 12:34pm UTC](https://www.ruby-forum.com/t/i-wish-to-learn-ruby-can-anyone-teach-me/146058 "2008-08-18T12:34:10Z")

</div>

I am a beginner in Programming and don’t have much idea about any Programming Language out there,I wish to start with learning Ruby from it’s basics upto the entire language,please if you can help/teach me ruby and ar…

---

## [Not So Random (#173)](https://www.ruby-forum.com/t/not-so-random-173/145973)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 19\
**Last updated:** [August 18, 2008, 12:15pm UTC](https://www.ruby-forum.com/t/not-so-random-173/145973 "2008-08-18T12:15:58Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q. 2: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on th…

---

## [Merb-gen 0.9.4 (Templater?) blowing up on Jruby 1.1.3 (Java6/OSX)](https://www.ruby-forum.com/t/merb-gen-0-9-4-templater-blowing-up-on-jruby-1-1-3-java6-osx/146077)

<div class="topic-metadata">

**Author:** [@dishkuvek](https://www.ruby-forum.com/u/dishkuvek)\
**Replies:** 4\
**Last updated:** [August 18, 2008, 11:09am UTC](https://www.ruby-forum.com/t/merb-gen-0-9-4-templater-blowing-up-on-jruby-1-1-3-java6-osx/146077 "2008-08-18T11:09:39Z")

</div>

Anyone else seen this (and have a fix)? I’m going to give merb-trunk from git a go and see if it’s any better. $ jruby --version jruby 1.1.3 (ruby 1.8.$ java -version java version “1.6.0\_05” Java™ SE Runtime Environ…

---

## [What's difference?](https://www.ruby-forum.com/t/whats-difference/146121)

<div class="topic-metadata">

**Author:** [@Kyung\_won\_C](https://www.ruby-forum.com/u/Kyung_won_C)\
**Replies:** 2\
**Last updated:** [August 18, 2008, 10:31am UTC](https://www.ruby-forum.com/t/whats-difference/146121 "2008-08-18T10:31:32Z")

</div>

— test1.rb — b = 1 puts a if a = b NameError: undefined local variable or method \`a’ for main:Object — test2.rb — a = 1 if false puts defined?(a) local-variable ############### Help Me^^ ###############

---

## [Rails application on tomcat](https://www.ruby-forum.com/t/rails-application-on-tomcat/146128)

<div class="topic-metadata">

**Author:** [@sgovind83](https://www.ruby-forum.com/u/sgovind83)\
**Replies:** 0\
**Last updated:** [August 18, 2008, 10:24am UTC](https://www.ruby-forum.com/t/rails-application-on-tomcat/146128 "2008-08-18T10:24:36Z")

</div>

I have created rails application in jruby(LINUX). I have used following version 1.Jruby 1.0.3 (in /usr/local/) 2.Rails 2.0.2 3.Tomcat 6 4.JDK 1.6 5.MYSQL connector 5.0.6.jar in $JRUBY\_HOME/lib 6.Activerecord-jdbc-…

---

## [Def .. end is ok and class .. end is not ok .. Why?](https://www.ruby-forum.com/t/def-end-is-ok-and-class-end-is-not-ok-why/146122)

<div class="topic-metadata">

**Author:** [@Kyung\_won\_C](https://www.ruby-forum.com/u/Kyung_won_C)\
**Replies:** 1\
**Last updated:** [August 18, 2008, 9:29am UTC](https://www.ruby-forum.com/t/def-end-is-ok-and-class-end-is-not-ok-why/146122 "2008-08-18T09:29:23Z")

</div>

module M end M.module\_eval { def self.a; puts ‘ok’ end } M.a =\> ‘ok’ M.module\_eval { class A; end } M::A =\> uninitialized constant M::A (NameError)

---

## [CLASSPATH problem?](https://www.ruby-forum.com/t/classpath-problem/144747)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 2\
**Last updated:** [August 18, 2008, 8:10am UTC](https://www.ruby-forum.com/t/classpath-problem/144747 "2008-08-18T08:10:58Z")

</div>

today I’ve switch from jruby-1.1.RC3 to jruby-1.1.3 I’m using to jdbc connectors, installed by gem : jdbc-mysql-5.0.4 jdbc-sqlite3-3.5.8 I’ve set my CLASSPATH to : export CLASSPATH=".:/opt/jruby-1.1.3/lib/ruby/gem…

---

## [End of Yaml](https://www.ruby-forum.com/t/end-of-yaml/146036)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 7\
**Last updated:** [August 18, 2008, 7:46am UTC](https://www.ruby-forum.com/t/end-of-yaml/146036 "2008-08-18T07:46:59Z")

</div>

Is there a way to have something like this in a yaml file: foo: bar \_\_ STOP TREATING IT AS YAML FILE FROM HERE \_\_ \\Â²\\Â²\\24Â²Â¼ljk asdjladskasd some noise is here and there asdiasdiodas KJLljkq @@@@jâ‚¬ pqwjpqowj …

---

## [Ruby and Databases](https://www.ruby-forum.com/t/ruby-and-databases/146111)

<div class="topic-metadata">

**Author:** [@circlefusion](https://www.ruby-forum.com/u/circlefusion)\
**Replies:** 1\
**Last updated:** [August 18, 2008, 5:41am UTC](https://www.ruby-forum.com/t/ruby-and-databases/146111 "2008-08-18T05:41:51Z")

</div>

Is there a book or another collection of suggested readings for learning how to manipulate a database with ruby? I’ve gotten to the point where I can take a CSV file, store it as an associative array, but now I’d like…

---

## [\[Ruby 1.9 - Bug #416\] (Open) core\_set\_method\_alias](https://www.ruby-forum.com/t/ruby-1-9-bug-416-open-core-set-method-alias/145528)

<div class="topic-metadata">

**Author:** [@Shyouhei\_U](https://www.ruby-forum.com/u/Shyouhei_U)\
**Replies:** 1\
**Last updated:** [August 18, 2008, 4:04am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-416-open-core-set-method-alias/145528 "2008-08-18T04:04:15Z")

</div>

e$B%A%1%C%He(B #416 e$B$,Js9p$5$l$^$7$?!#e(B (by Shyouhei U.) Bug #416: core\_set\_method\_alias http://redmine.ruby-lang.org/issues/show/416 e$B5/I\<\<Te(B: Shyouhei U. e$B%9%F!\<%?%9e(B: Open e$BM%@hEYe(B: Normal e$BC…

---

## [Vector graphics library with pan and zoom](https://www.ruby-forum.com/t/vector-graphics-library-with-pan-and-zoom/145917)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 9\
**Last updated:** [August 18, 2008, 3:51am UTC](https://www.ruby-forum.com/t/vector-graphics-library-with-pan-and-zoom/145917 "2008-08-18T03:51:57Z")

</div>

Hello, I’m not trying to open a debate about which GUI library is the best. I would just like a pointer to a graphics library I can use to draw some vector graphics (lines, arcs, circles, polygons, possibly filled po…

---

## [IO redirecting; waitpid](https://www.ruby-forum.com/t/io-redirecting-waitpid/146034)

<div class="topic-metadata">

**Author:** [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Replies:** 5\
**Last updated:** [August 18, 2008, 3:32am UTC](https://www.ruby-forum.com/t/io-redirecting-waitpid/146034 "2008-08-18T03:32:33Z")

</div>

Hello. I have two problems. First: is there an easy way to redirect data from an incoming IO stream to an outgoing IO stream, in a nonblocking way? For example, can you run a console program from Ruby program and red…

---

## [Creating an array with incrementing values up to a certain number](https://www.ruby-forum.com/t/creating-an-array-with-incrementing-values-up-to-a-certain-number/146106)

<div class="topic-metadata">

**Author:** [@circlefusion](https://www.ruby-forum.com/u/circlefusion)\
**Replies:** 3\
**Last updated:** [August 18, 2008, 12:29am UTC](https://www.ruby-forum.com/t/creating-an-array-with-incrementing-values-up-to-a-certain-number/146106 "2008-08-18T00:29:25Z")

</div>

Hello, Another basic question, thanks for the help on the last one. I wanted to come up with the above described program and came up with this: array.rb start a = \[1\] x = 0 while x \< 99 a\[(x+1)\] = (a\[x\] + 1) x = x…

---

## [Generating Normally Distributed Random Numbers?](https://www.ruby-forum.com/t/generating-normally-distributed-random-numbers/146064)

<div class="topic-metadata">

**Author:** [@Michael\_Craig](https://www.ruby-forum.com/u/Michael_Craig)\
**Replies:** 8\
**Last updated:** [August 18, 2008, 12:11am UTC](https://www.ruby-forum.com/t/generating-normally-distributed-random-numbers/146064 "2008-08-18T00:11:51Z")

</div>

Does anybody know of a good method in Ruby to generate normally distributed random numbers? The application I have in mind at the moment is trivial, but I can think of a number of statistics-oriented applications. T…

---

## [Unable to load mysql driver (Ubuntu 8.04)](https://www.ruby-forum.com/t/unable-to-load-mysql-driver-ubuntu-8-04/146069)

<div class="topic-metadata">

**Author:** [@supasta](https://www.ruby-forum.com/u/supasta)\
**Replies:** 5\
**Last updated:** [August 17, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/unable-to-load-mysql-driver-ubuntu-8-04/146069 "2008-08-17T21:43:56Z")

</div>

Hi, When I try to run a script that requires “dbi” I get the following error: /usr/local/lib/ruby/site\_ruby/1.8/dbi.rb:352:in load\_driver': Unable to load driver 'Mysql' (DBI::InterfaceError) from /usr/local/lib/ruby/…

---

## [Ncurses: problem with Colors & removing existent windows](https://www.ruby-forum.com/t/ncurses-problem-with-colors-removing-existent-windows/146099)

<div class="topic-metadata">

**Author:** [@Fabian\_Holler](https://www.ruby-forum.com/u/Fabian_Holler)\
**Replies:** 0\
**Last updated:** [August 17, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/ncurses-problem-with-colors-removing-existent-windows/146099 "2008-08-17T21:25:33Z")

</div>

Hello, I’m trying to write a little Linux Console application with Ncurses. To have an easier Window interface for my purposes I created an Window class. How i can delete an existing windows + its content from the …

---

## [Thread Safety in Rails 2.2](https://www.ruby-forum.com/t/thread-safety-in-rails-2-2/146083)

<div class="topic-metadata">

**Author:** [@Darcy\_S](https://www.ruby-forum.com/u/Darcy_S)\
**Replies:** 2\
**Last updated:** [August 17, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/thread-safety-in-rails-2-2/146083 "2008-08-17T19:54:41Z")

</div>

How will this impact running Rails in JRuby in a JEE Container? Will we be able to ditch the multiple runtimes? That’d be simply fantastic. I’d love to see memory consumption drop. To unsubscribe from this list,…

---

## [Rmagick 2.5.2 install in ubuntu](https://www.ruby-forum.com/t/rmagick-2-5-2-install-in-ubuntu/146070)

<div class="topic-metadata">

**Author:** [@walter\_j](https://www.ruby-forum.com/u/walter_j)\
**Replies:** 3\
**Last updated:** [August 17, 2008, 6:07pm UTC](https://www.ruby-forum.com/t/rmagick-2-5-2-install-in-ubuntu/146070 "2008-08-17T18:07:47Z")

</div>

when i try to install via “gem install rmagick” i get the error checking for Magick-config… no Can’t install RMagick 2.5.2. Can’t find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr…

---

## [Writing if statement in one line with elsif condition](https://www.ruby-forum.com/t/writing-if-statement-in-one-line-with-elsif-condition/146066)

<div class="topic-metadata">

**Author:** [@lz-coelho](https://www.ruby-forum.com/u/lz-coelho)\
**Replies:** 9\
**Last updated:** [August 17, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/writing-if-statement-in-one-line-with-elsif-condition/146066 "2008-08-17T16:16:42Z")

</div>

I’m trying to convert it: \<% if @recipes.length == (i+1) %\> \<% @id = 0 %\> \<% elsif i.remainder(2) == 1 %\> \<% @id = 1 %\> \<% else %\> \<% @id = 2 %\> \<% end…

---

## [String manipulation: cut, insert, column editing](https://www.ruby-forum.com/t/string-manipulation-cut-insert-column-editing/145677)

<div class="topic-metadata">

**Author:** [@toki](https://www.ruby-forum.com/u/toki)\
**Replies:** 5\
**Last updated:** [August 17, 2008, 2:04pm UTC](https://www.ruby-forum.com/t/string-manipulation-cut-insert-column-editing/145677 "2008-08-17T14:04:58Z")

</div>

Hi all, Is it possible to use ruby like awk, sed or cut in unix to editing strings? Let say I have to write INSERT query like this: This is the first (1Â°) item. This is the second (2Â°) item. This is the third (3Â…

---

## [\[ANN\] JtestR 0.3.1 Released](https://www.ruby-forum.com/t/ann-jtestr-0-3-1-released/146075)

<div class="topic-metadata">

**Author:** [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Replies:** 0\
**Last updated:** [August 17, 2008, 1:40pm UTC](https://www.ruby-forum.com/t/ann-jtestr-0-3-1-released/146075 "2008-08-17T13:40:21Z")

</div>

JtestR allows you to test your Java code with Ruby frameworks. Homepage: http://jtestr.codehaus.org Download: http://dist.codehaus.org/jtestr JtestR 0.3.1 is the current release of the JtestR testing tool. JtestR int…

---

## [On ubuntu, ruby can't find the gems](https://www.ruby-forum.com/t/on-ubuntu-ruby-cant-find-the-gems/146042)

<div class="topic-metadata">

**Author:** [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Replies:** 4\
**Last updated:** [August 17, 2008, 5:21am UTC](https://www.ruby-forum.com/t/on-ubuntu-ruby-cant-find-the-gems/146042 "2008-08-17T05:21:37Z")

</div>

I’m working on Ubuntu 7.10, which presumably does things the Debian way. I have loaded several gems without apparent problem, and I see them sitting there in /var/lib/gems/1.8, which I understand is the Debian place f…

---

## [Re: r132 - can you check if it builds correctly	on	mono?](https://www.ruby-forum.com/t/re-r132-can-you-check-if-it-builds-correctly-on-mono/146022)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 5\
**Last updated:** [August 17, 2008, 2:41am UTC](https://www.ruby-forum.com/t/re-r132-can-you-check-if-it-builds-correctly-on-mono/146022 "2008-08-17T02:41:18Z")

</div>

Or we could do parsing on C# and recurse on Mono.

---

## [Interacting with a WPF/Winforms application](https://www.ruby-forum.com/t/interacting-with-a-wpf-winforms-application/145937)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 2\
**Last updated:** [August 16, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/interacting-with-a-wpf-winforms-application/145937 "2008-08-16T21:38:51Z")

</div>

Hi Is there a simple way to interact with the GUI of a WPF/Winforms application? I’ll clarify a little what I would like to achieve: when you start a console session with an environment loaded you could potentially …

---

## [Re: r132 - can you check if it builds correctly on	mono?](https://www.ruby-forum.com/t/re-r132-can-you-check-if-it-builds-correctly-on-mono/146051)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [August 16, 2008, 8:57pm UTC](https://www.ruby-forum.com/t/re-r132-can-you-check-if-it-builds-correctly-on-mono/146051 "2008-08-16T20:57:51Z")

</div>

I’d be interested in seeing it. It could be really useful.

---

## [RedCloth Mini-Cookbook: How Tos, Recipes, F. A.Qs â€“ Using the Ruby Plain Text to Web Markup Gem](https://www.ruby-forum.com/t/redcloth-mini-cookbook-how-tos-recipes-f-a-qs-a-using-the-ruby-plain-text-to-web-markup-gem/146026)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 1\
**Last updated:** [August 16, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/redcloth-mini-cookbook-how-tos-recipes-f-a-qs-a-using-the-ruby-plain-text-to-web-markup-gem/146026 "2008-08-16T20:14:45Z")

</div>

Hello, I’ve started a RedCloth mini cookbook collecting how-tos, recipes and F.A.Qs. What’s RedCloth? What’s Textile? Textile is a wiki-style markup language that’s easy-to-write and easy-to-read and that lets you a…

---

## [Glassfish Gem: domain directory not writable](https://www.ruby-forum.com/t/glassfish-gem-domain-directory-not-writable/146049)

<div class="topic-metadata">

**Author:** [@sharkie](https://www.ruby-forum.com/u/sharkie)\
**Replies:** 0\
**Last updated:** [August 16, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/glassfish-gem-domain-directory-not-writable/146049 "2008-08-16T20:05:55Z")

</div>

I am running the latest Glassfish Gem on the latest JRuby on both FreeBSD and Mac, and I get this error java.lang.RuntimeException: the domain directory is not writable. if I run as a regular user. However if I run a…

---

## [Firefox html, my downloaded html and firebug html different?](https://www.ruby-forum.com/t/firefox-html-my-downloaded-html-and-firebug-html-different/146029)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 9\
**Last updated:** [August 16, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/firefox-html-my-downloaded-html-and-firebug-html-different/146029 "2008-08-16T19:22:26Z")

</div>

Hi Im a relatively new rubyist and programmer in general and currently reading Everyday scripting and trying out webscraping using amazon as a target. To determine suitable regular expressions i first just viewed the …

---

## [\[Regex\] Alternative for look behind](https://www.ruby-forum.com/t/regex-alternative-for-look-behind/146019)

<div class="topic-metadata">

**Author:** [@janus](https://www.ruby-forum.com/u/janus)\
**Replies:** 4\
**Last updated:** [August 16, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/regex-alternative-for-look-behind/146019 "2008-08-16T18:48:42Z")

</div>

Hi all, I need to replace all ‘-’ characters at the beginning of a sequence (string) with 'X’s (until a character appears that is not ‘-’). E.g. -------abcde-gh---- should be changed into XXXXXXXabcde-gh---- If Ru…

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

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