# Ruby

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

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

---

## [Isitjruby.com is live!](https://www.ruby-forum.com/t/isitjruby-com-is-live/169045)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/isitjruby-com-is-live/169045 "2009-05-28T19:37:12Z")

</div>

Hey, a number of you asked about getting a site up like isitruby19.com, and Carl Mercier has done just that! The site basically allows you to look up your favorite gems, see if they work on JRuby, and if they’re not l…

---

## [How do Class definitions in Ruby differ from other OO languages?](https://www.ruby-forum.com/t/how-do-class-definitions-in-ruby-differ-from-other-oo-languages/168790)

<div class="topic-metadata">

**Author:** [@kunjaan](https://www.ruby-forum.com/u/kunjaan)\
**Replies:** 8\
**Last updated:** [May 28, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/how-do-class-definitions-in-ruby-differ-from-other-oo-languages/168790 "2009-05-28T19:36:01Z")

</div>

What do you mean when you say"Class definitions are executable code". How do classes differ from other OO languages?

---

## [Jruby precision issue with reading float values in mysql db](https://www.ruby-forum.com/t/jruby-precision-issue-with-reading-float-values-in-mysql-db/168919)

<div class="topic-metadata">

**Author:** [@pradeepgatram](https://www.ruby-forum.com/u/pradeepgatram)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 7:21pm UTC](https://www.ruby-forum.com/t/jruby-precision-issue-with-reading-float-values-in-mysql-db/168919 "2009-05-28T19:21:16Z")

</div>

Hi, I was trying to upgrade from 1.1.6 to 1.2.0 and noticed a strange issue with floats. In Jruby 1.2.0, a float like 2.52342 is read as 2.52342009544373 from the DB. A few steps to reproduce this. Migration: t…

---

## [OptionParser: unexpected behaviour with -help](https://www.ruby-forum.com/t/optionparser-unexpected-behaviour-with-help/168679)

<div class="topic-metadata">

**Author:** [@stephanwehner](https://www.ruby-forum.com/u/stephanwehner)\
**Replies:** 6\
**Last updated:** [May 28, 2009, 6:38pm UTC](https://www.ruby-forum.com/t/optionparser-unexpected-behaviour-with-help/168679 "2009-05-28T18:38:27Z")

</div>

I ran into some unexpected behaviour with the Ruby OptionParser class. When running this script (without any command line arguments) the output is as in the last, commented, line. require ‘optparse’ options = {} Op…

---

## [SV: \[ANN\] JRuby 1.3.0RC2 Released](https://www.ruby-forum.com/t/sv-ann-jruby-1-3-0rc2-released/169039)

<div class="topic-metadata">

**Author:** [@morten](https://www.ruby-forum.com/u/morten)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/sv-ann-jruby-1-3-0rc2-released/169039 "2009-05-28T18:28:32Z")

</div>

I noticed a lot of important changes to openssl for jruby lately. They are not mentioned in the announcement. Are they a part of the JRuby 1.3 RC2 release or released separately. If separately, how will they be releas…

---

## [Expand\_path on windows for home dir](https://www.ruby-forum.com/t/expand-path-on-windows-for-home-dir/169026)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 4\
**Last updated:** [May 28, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/expand-path-on-windows-for-home-dir/169026 "2009-05-28T18:13:14Z")

</div>

currently on windows we’ve got: File.expand\_path ‘~’ =\> “/Documents and Settings/Melissa.BLACKY” shouldn’t it be File.expand\_path ‘~’ =\> “c:/Documents and Settings/Melissa.BLACKY” ? -=r

---

## [Making a name like "Copy of...", "Copy 2 of..."](https://www.ruby-forum.com/t/making-a-name-like-copy-of-copy-2-of/169016)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 5\
**Last updated:** [May 28, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/making-a-name-like-copy-of-copy-2-of/169016 "2009-05-28T18:05:43Z")

</div>

Here’s a little ruby exercise - i’m a bit brain damaged today and can’t think of a nice way to do this. I want a method where you pass a name as a string and it returns ‘copy of x’ or ‘copy 2 of x’ eg new\_name(“My Le…

---

## [Multiple matches](https://www.ruby-forum.com/t/multiple-matches/169025)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 3\
**Last updated:** [May 28, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/multiple-matches/169025 "2009-05-28T17:49:06Z")

</div>

Hi all, How to find out pattern’cat’ in this string=‘ccccatgggctacatgggtcat’ ? There are three ‘cat’ within the string and I want to return the position of each match. Although # match return the match , #pre\_matc…

---

## [Ruby version of PHP](https://www.ruby-forum.com/t/ruby-version-of-php/169019)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [May 28, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/ruby-version-of-php/169019 "2009-05-28T17:31:16Z")

</div>

I am relatively new to Ruby and Rails, but have a lot of experience with Perl and PHP. After looking at Rails, I really like Ruby, but find Rails to be to restrictive in the way you have to do things. This article: …

---

## [On Hashes - How the hashes printing works?](https://www.ruby-forum.com/t/on-hashes-how-the-hashes-printing-works/168910)

<div class="topic-metadata">

**Author:** [@Neela\_megha\_shyam\_C](https://www.ruby-forum.com/u/Neela_megha_shyam_C)\
**Replies:** 4\
**Last updated:** [May 28, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/on-hashes-how-the-hashes-printing-works/168910 "2009-05-28T12:57:25Z")

</div>

Hi All, I have my code as follows:- people = { “torvalds”=\>{“lname”=\>“Torvalds”, “fname”=\>“Linus”, “job”=\>“maintainer”}, “matsumoto”=\>{“lname”=\>“Matsumoto”, “fname”=\>“Yukihiro”, “job”=\>“Ruby originator”}, “litt”=\>{…

---

## [Problem with path](https://www.ruby-forum.com/t/problem-with-path/168960)

<div class="topic-metadata">

**Author:** [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Replies:** 3\
**Last updated:** [May 28, 2009, 12:23pm UTC](https://www.ruby-forum.com/t/problem-with-path/168960 "2009-05-28T12:23:04Z")

</div>

Hey there, i tried to include libs in my ruby file, just as ruby cookbook shows, require ‘rubygems’ request ‘win32/service’ include Win32 after run, it shows error msg, ‘require’ no such file to load - win32/servic…

---

## [Scrubyt related query](https://www.ruby-forum.com/t/scrubyt-related-query/169010)

<div class="topic-metadata">

**Author:** [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 12:03pm UTC](https://www.ruby-forum.com/t/scrubyt-related-query/169010 "2009-05-28T12:03:52Z")

</div>

Hello everyone, I m newbie for scrubyt . I want to know that how to read the data(text fields’ id) of a web page through scrubyt without using fetch(url) method??? Please reply as soon as possible. Thanks in advance…

---

## [Newbie on Threads](https://www.ruby-forum.com/t/newbie-on-threads/168811)

<div class="topic-metadata">

**Author:** [@nabusman](https://www.ruby-forum.com/u/nabusman)\
**Replies:** 12\
**Last updated:** [May 28, 2009, 10:41am UTC](https://www.ruby-forum.com/t/newbie-on-threads/168811 "2009-05-28T10:41:51Z")

</div>

I’m creating a screen scraping software and I want to have X (let’s say 10 for example) threads running simultaneously doing the scraping. The program will access a text file containing an unknown number of URLs and t…

---

## [Mechanize and charset issues](https://www.ruby-forum.com/t/mechanize-and-charset-issues/168881)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 5\
**Last updated:** [May 28, 2009, 10:41am UTC](https://www.ruby-forum.com/t/mechanize-and-charset-issues/168881 "2009-05-28T10:41:51Z")

</div>

I’m not sure what is causing this error as I can successfully login, I just can’t submit this form without the script bombing out. formatstring = “testing submission” agent = WWW::Mechanize.new page = agent.get ‘hidd…

---

## [Ruby 1.8 vs. Ruby 1.9](https://www.ruby-forum.com/t/ruby-1-8-vs-ruby-1-9/168422)

<div class="topic-metadata">

**Author:** [@calvin](https://www.ruby-forum.com/u/calvin)\
**Replies:** 16\
**Last updated:** [May 28, 2009, 10:31am UTC](https://www.ruby-forum.com/t/ruby-1-8-vs-ruby-1-9/168422 "2009-05-28T10:31:02Z")

</div>

Hi, Does anyone here think it’s a good idea for a beginner to learn Ruby 1.8 and then learn Ruby 1.9? If it’s better to just learn 1.9 and not worry about what 1.8 was like, I would appreciate any and all responses t…

---

## [How to access variables from within class definition](https://www.ruby-forum.com/t/how-to-access-variables-from-within-class-definition/168891)

<div class="topic-metadata">

**Author:** [@eggman2001](https://www.ruby-forum.com/u/eggman2001)\
**Replies:** 5\
**Last updated:** [May 28, 2009, 3:18am UTC](https://www.ruby-forum.com/t/how-to-access-variables-from-within-class-definition/168891 "2009-05-28T03:18:17Z")

</div>

I’ve got something like: @var = ‘brown’ class Foo \< ActiveRecord::Base set\_table\_name @var end However, as the code is right now, I’m not able to access @var from within the class definition. Can someone tell me ho…

---

## [Copy data from many CDs using ruby](https://www.ruby-forum.com/t/copy-data-from-many-cds-using-ruby/168971)

<div class="topic-metadata">

**Author:** [@bobbysantiago](https://www.ruby-forum.com/u/bobbysantiago)\
**Replies:** 6\
**Last updated:** [May 28, 2009, 2:04am UTC](https://www.ruby-forum.com/t/copy-data-from-many-cds-using-ruby/168971 "2009-05-28T02:04:34Z")

</div>

Hi, I am a beginner with very basic knowledge of ruby, but I would like to create a script that would do the following: Prompt to input disc Create a new sequential folder within a specified directory Copy all files …

---

## [JRuby 1.3.0RC2 Released](https://www.ruby-forum.com/t/jruby-1-3-0rc2-released/168967)

<div class="topic-metadata">

**Author:** [@Thomas\_E](https://www.ruby-forum.com/u/Thomas_E)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 1:09am UTC](https://www.ruby-forum.com/t/jruby-1-3-0rc2-released/168967 "2009-05-28T01:09:35Z")

</div>

The JRuby community is pleased to announce the release of JRuby 1.3.0RC2 Homepage: http://www.jruby.org/ Download: http://dist.codehaus.org/jruby/ JRuby 1.3.0RC2 is a release to fix some issues which prevented JRuby …

---

## [Mysql loding error](https://www.ruby-forum.com/t/mysql-loding-error/168913)

<div class="topic-metadata">

**Author:** [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 12:48am UTC](https://www.ruby-forum.com/t/mysql-loding-error/168913 "2009-05-28T00:48:51Z")

</div>

C:\\Program Files\\NetBeans 6.5.1\\gca\>gem install mysql Successfully installed mysql-2.7.3-x86-mswin32 1 gem installed Installing ri documentation for mysql-2.7.3-x86-mswin32… Installing RDoc documentation for mysql-2.…

---

## [Can't install ruby-opengl](https://www.ruby-forum.com/t/cant-install-ruby-opengl/168958)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 4\
**Last updated:** [May 28, 2009, 12:16am UTC](https://www.ruby-forum.com/t/cant-install-ruby-opengl/168958 "2009-05-28T00:16:57Z")

</div>

I receive the following error when trying to install it. C:/Ruby/bin/ruby.exe -rubygems C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake RUBYARCHDIR=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib RUBYLIBDIR=…

---

## [Initialize not being called on objects created from literals](https://www.ruby-forum.com/t/initialize-not-being-called-on-objects-created-from-literals/168886)

<div class="topic-metadata">

**Author:** [@ole](https://www.ruby-forum.com/u/ole)\
**Replies:** 5\
**Last updated:** [May 28, 2009, 12:04am UTC](https://www.ruby-forum.com/t/initialize-not-being-called-on-objects-created-from-literals/168886 "2009-05-28T00:04:05Z")

</div>

Initialize doesn’t appear to get called. class Object def initialize @foo = ‘bar’ end attr\_reader :foo end a = Object.new # =\> #\<Object:0x54c964 @foo=“bar”\> a.foo # =\> “bar” ‘string’.foo # =\> nil //.foo # =\> ni…

---

## [\[ANN\] JRuby 1.3.0RC2 Released](https://www.ruby-forum.com/t/ann-jruby-1-3-0rc2-released/168968)

<div class="topic-metadata">

**Author:** [@Thomas\_E\_Enebo](https://www.ruby-forum.com/u/Thomas_E_Enebo)\
**Replies:** 0\
**Last updated:** [May 27, 2009, 9:54pm UTC](https://www.ruby-forum.com/t/ann-jruby-1-3-0rc2-released/168968 "2009-05-27T21:54:31Z")

</div>

The JRuby community is pleased to announce the release of JRuby 1.3.0RC2 Homepage: http://www.jruby.org/ Download: http://dist.codehaus.org/jruby/ JRuby 1.3.0RC2 is a release to fix some issues which prevented JRuby …

---

## [\[Bug #1523\] typo in sample/optparse/opttest.rb](https://www.ruby-forum.com/t/bug-1523-typo-in-sample-optparse-opttest-rb/168825)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [May 27, 2009, 8:58pm UTC](https://www.ruby-forum.com/t/bug-1523-typo-in-sample-optparse-opttest-rb/168825 "2009-05-27T20:58:46Z")

</div>

Bug #1523: typo in sample/optparse/opttest.rb http://redmine.ruby-lang.org/issues/show/1523 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Nobuyoshi N. ruby -v: r23541 s…

---

## [Change service property](https://www.ruby-forum.com/t/change-service-property/167797)

<div class="topic-metadata">

**Author:** [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Replies:** 1\
**Last updated:** [May 27, 2009, 8:02pm UTC](https://www.ruby-forum.com/t/change-service-property/167797 "2009-05-27T20:02:22Z")

</div>

Hi everyone, I need to change a service login property in a script. For example, I installed a service on windows, and its logon default setting is logon as local system. I wonder if there anyway to change it into log…

---

## [ShinyCocos pre-release](https://www.ruby-forum.com/t/shinycocos-pre-release/168962)

<div class="topic-metadata">

**Author:** [@Rolando\_A](https://www.ruby-forum.com/u/Rolando_A)\
**Replies:** 0\
**Last updated:** [May 27, 2009, 7:14pm UTC](https://www.ruby-forum.com/t/shinycocos-pre-release/168962 "2009-05-27T19:14:15Z")

</div>

Hi all, For the past few month, I’ve been working on a fun project: ruby bindings for Cocos2D-iphone game framework. So, I think I’ve reached a point where it’s worth mentioning it here: http://github.com/funkaster/s…

---

## [Can't start webrick as the root user](https://www.ruby-forum.com/t/cant-start-webrick-as-the-root-user/168655)

<div class="topic-metadata">

**Author:** [@pbhandar](https://www.ruby-forum.com/u/pbhandar)\
**Replies:** 5\
**Last updated:** [May 27, 2009, 6:44pm UTC](https://www.ruby-forum.com/t/cant-start-webrick-as-the-root-user/168655 "2009-05-27T18:44:48Z")

</div>

Hi, I am trying to start Webrick as root user and get TCP Bind error even though the port appears to be not taken. Running the same script as a non-root user that owns the ruby installs works just fine. Running dvd…

---

## [Help me out!](https://www.ruby-forum.com/t/help-me-out/168916)

<div class="topic-metadata">

**Author:** [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Replies:** 1\
**Last updated:** [May 27, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/help-me-out/168916 "2009-05-27T18:21:30Z")

</div>

am posting the error i get from Ruby here…am i missing a particular gem ? START =\> Booting Mongrel (use ‘script/server webrick’ to force WEBrick) =\> Rails 2.1.0 application starting on http://0.0.0.0:3000 =\> Call wi…

---

## [Selenium with ruby rails and webrat](https://www.ruby-forum.com/t/selenium-with-ruby-rails-and-webrat/168947)

<div class="topic-metadata">

**Author:** [@linewriter](https://www.ruby-forum.com/u/linewriter)\
**Replies:** 1\
**Last updated:** [May 27, 2009, 5:51pm UTC](https://www.ruby-forum.com/t/selenium-with-ruby-rails-and-webrat/168947 "2009-05-27T17:51:15Z")

</div>

Hi, I have set up selenium and webrat with cucumber and ruby rails in Cygwin on Windows DOS machine. I have everything working expect that when I ‘rake’ features, selenium is not starting up any firefox browser. I ha…

---

## [String concatenation in Ruby](https://www.ruby-forum.com/t/string-concatenation-in-ruby/168733)

<div class="topic-metadata">

**Author:** [@jagadeesh](https://www.ruby-forum.com/u/jagadeesh)\
**Replies:** 17\
**Last updated:** [May 27, 2009, 5:46pm UTC](https://www.ruby-forum.com/t/string-concatenation-in-ruby/168733 "2009-05-27T17:46:12Z")

</div>

Hi, I am looking for something similar to join in perl. I am doing \[sample perl code\] $CMD = join(’ ', $cmd, $arg1, $arg2, $arg3); Is there anything similar to this available in Ruby? Thanks in advance. Jagadeesh …

---

## [Frozen string](https://www.ruby-forum.com/t/frozen-string/168928)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 2\
**Last updated:** [May 27, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/frozen-string/168928 "2009-05-27T17:20:37Z")

</div>

Hi, Am trying to get rubyscript2exe to work and get the error shown below. I’ve read the posts about this before (changing a line rubyscript2exe etc) but none of the answers work for me. Can someone suggest what I’m …

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

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