# Ruby

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

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

---

## [Problem with gem install, rubygems 0.9.0](https://www.ruby-forum.com/t/problem-with-gem-install-rubygems-0-9-0/96468)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [June 29, 2006, 5:08pm UTC](https://www.ruby-forum.com/t/problem-with-gem-install-rubygems-0-9-0/96468 "2006-06-29T17:08:21Z")

</div>

Hi all, Solaris 10 Ruby 1.8.4 gems 0.9.0 I did a fresh install of Ruby, installed gems via “ruby setup.rb”, and tried by my first ‘gem install’. This is what I got: djberge@~/local/src/ruby-516\>sudo gem install p…

---

## [Rb\_define\_methods](https://www.ruby-forum.com/t/rb-define-methods/96327)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 11\
**Last updated:** [June 29, 2006, 3:24pm UTC](https://www.ruby-forum.com/t/rb-define-methods/96327 "2006-06-29T15:24:38Z")

</div>

e$B!!$5$5$@$G$9!#e(B e$B!!e(BCe$B$G5-=R$7$?%a%=%C%I$NEPO?$r$^$H$a$F9T$($J$$$G$7$g$&$+!#e(B e$B!!6qBNE\*$K$O!":#e(B void Init\_foo(void) { VALUE klass = …; rb\_define\_method(klass, “foo”, foo\_func, 0); rb\_define\_meth…

---

## [GC.stress = true; lambda(&lambda{})](https://www.ruby-forum.com/t/gc-stress-true-lambda-lambda/96530)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [June 29, 2006, 3:18pm UTC](https://www.ruby-forum.com/t/gc-stress-true-lambda-lambda/96530 "2006-06-29T15:18:38Z")

</div>

e$B0J2\<$N$h$&$KMn$A$^$9!#e(B % ./ruby -ve ‘GC.stress = true; lambda(&lambda{})’ ruby 1.9.0 (2006-06-29) \[i686-linux\] zsh: segmentation fault (core dumped) ./ruby -ve ‘GC.stress = true; lambda(&lambda{})’ % gdb ruby…

---

## [Error with openssl in 1.8.4 on XP?](https://www.ruby-forum.com/t/error-with-openssl-in-1-8-4-on-xp/96486)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 1\
**Last updated:** [June 29, 2006, 2:38pm UTC](https://www.ruby-forum.com/t/error-with-openssl-in-1-8-4-on-xp/96486 "2006-06-29T14:38:44Z")

</div>

I’ve been trying to consume a SOAP service using ruby, which should be simple enough, but I need to work across Https and there seems to be no way to do this currently. The only message I get is OpenSSL::SSL::SSLError…

---

## [Pp Pascal (#84)](https://www.ruby-forum.com/t/pp-pascal-84/64249)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 122\
**Last updated:** [June 29, 2006, 1:10pm UTC](https://www.ruby-forum.com/t/pp-pascal-84/64249 "2006-06-29T13:10:23Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Re: Sorting arrays](https://www.ruby-forum.com/t/re-sorting-arrays/96496)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [June 29, 2006, 10:06am UTC](https://www.ruby-forum.com/t/re-sorting-arrays/96496 "2006-06-29T10:06:24Z")

</div>

You can use the sort method on the entire Array: sorted=\[1, 2, “three”\] unsorted=\[6,5,‘four’\] a = sorted+unsorted b = a.sort { |x,y| x.to\_s \<=\> y.to\_s} =\>b is then \[1, 2, 5, 6, “four”, “three”\] (that’s because ‘1’ w…

---

## [Changes to x within x.each()](https://www.ruby-forum.com/t/changes-to-x-within-x-each/96513)

<div class="topic-metadata">

**Author:** [@elyod\_72](https://www.ruby-forum.com/u/elyod_72)\
**Replies:** 4\
**Last updated:** [June 29, 2006, 9:16am UTC](https://www.ruby-forum.com/t/changes-to-x-within-x-each/96513 "2006-06-29T09:16:32Z")

</div>

Does Ruby have defined behavior for ‘each’ in the following: x.each do |obj| ... x.change() # This may add or remove objects from x end Cases: Adding or removing objects ‘before’ obj. Adding or removing ob…

---

## [Module: Defining, Installing, and Using](https://www.ruby-forum.com/t/module-defining-installing-and-using/96514)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 0\
**Last updated:** [June 29, 2006, 5:29am UTC](https://www.ruby-forum.com/t/module-defining-installing-and-using/96514 "2006-06-29T05:29:51Z")

</div>

Current version of my cheat sheet. Will post at my web site shortly, with any feedback that comes my way. Module File filename: .rb example: functions.rb Contents module FUNCTIONS def some\_function(argument, …) … …

---

## [Rational 1.08](https://www.ruby-forum.com/t/rational-1-08/95891)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 26\
**Last updated:** [June 29, 2006, 5:23am UTC](https://www.ruby-forum.com/t/rational-1-08/95891 "2006-06-29T05:23:51Z")

</div>

e$B$U$J$P$G$9!#e(B Rational(2399550481, 480000000).to\_f e$B$H$9$k$H%(%i!\<$K$J$j$^$9!#e(B RangeError: bignum too big to convert into \`long’

---

## [\[QUIZ\] Second answer for quiz 84](https://www.ruby-forum.com/t/quiz-second-answer-for-quiz-84/96515)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 0\
**Last updated:** [June 29, 2006, 5:14am UTC](https://www.ruby-forum.com/t/quiz-second-answer-for-quiz-84/96515 "2006-06-29T05:14:16Z")

</div>

After looking over my earlier answer, I realized that I had re-invented String.center and had a number of excesses. This one is a lot smaller but I still feel I’m not using the language to its fullest. JB pp\_pasca…

---

## [Re: pp Pascal (#84)](https://www.ruby-forum.com/t/re-pp-pascal-84/96510)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 0\
**Last updated:** [June 29, 2006, 4:58am UTC](https://www.ruby-forum.com/t/re-pp-pascal-84/96510 "2006-06-29T04:58:04Z")

</div>

Kelly wrote: puts (0…ARGV.first.to\_i).inject(\[\[1\]\]) { |a,x| puts (0…(ARGV.first||“6”).to\_i).inject(\[\[1\]\]) { |a,x| just a minor pick for easy cutnpaste then run. defualt of 6 rows. cool hack, btw. kind regards -botp …

---

## [\[ANN\] Mongrel 0.3.13.3 Needs Debuggers](https://www.ruby-forum.com/t/ann-mongrel-0-3-13-3-needs-debuggers/96504)

<div class="topic-metadata">

**Author:** [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Replies:** 1\
**Last updated:** [June 29, 2006, 4:28am UTC](https://www.ruby-forum.com/t/ann-mongrel-0-3-13-3-needs-debuggers/96504 "2006-06-29T04:28:50Z")

</div>

Hi Everyone, I have a small pre-release for Mongrel that will eventually be the 0.3.13.3 release, but it needs some quick testing before I make it official. There’s a bug for only some folks and I need to find out w…

---

## [One of the gem mirrors seemed to be out of work?](https://www.ruby-forum.com/t/one-of-the-gem-mirrors-seemed-to-be-out-of-work/96505)

<div class="topic-metadata">

**Author:** [@Gyoung-Yoon\_N](https://www.ruby-forum.com/u/Gyoung-Yoon_N)\
**Replies:** 0\
**Last updated:** [June 29, 2006, 3:12am UTC](https://www.ruby-forum.com/t/one-of-the-gem-mirrors-seemed-to-be-out-of-work/96505 "2006-06-29T03:12:14Z")

</div>

Hi, I got this when updating gems. $ sudo gem up Upgrading installed gems… Attempting remote upgrade of rmagick Attempting remote installation of ‘rmagick’ ERROR: While executing gem … (OpenURI::HTTPError) 300 Mu…

---

## [Ruby won't update](https://www.ruby-forum.com/t/ruby-wont-update/96498)

<div class="topic-metadata">

**Author:** [@idlefingers](https://www.ruby-forum.com/u/idlefingers)\
**Replies:** 6\
**Last updated:** [June 29, 2006, 2:57am UTC](https://www.ruby-forum.com/t/ruby-wont-update/96498 "2006-06-29T02:57:56Z")

</div>

I’m trying to update ruby from 1.8.2 to 1.8.4 on mac os x, but it just refuses to work. each time after I try, i run “ruby -v” and it’s still 1.8.2. Has anyone else had difficulties? How can I get this to update?? Th…

---

## [RMagick 1.13.0](https://www.ruby-forum.com/t/rmagick-1-13-0/96497)

<div class="topic-metadata">

**Author:** [@tim-hunter](https://www.ruby-forum.com/u/tim-hunter)\
**Replies:** 0\
**Last updated:** [June 29, 2006, 1:42am UTC](https://www.ruby-forum.com/t/rmagick-1-13-0/96497 "2006-06-29T01:42:27Z")

</div>

I’ve just uploaded RMagick 1.13.0 to RubyForge. Here’s a summary of the changes: o Installable with RubyGems 0.9.0 o Added Image#auto\_orient and Image#auto\_orient!. This method uses the EXIF orientation tag to autom…

---

## [\[QUIZ\] pp Pascal (#84)](https://www.ruby-forum.com/t/quiz-pp-pascal-84/96495)

<div class="topic-metadata">

**Author:** [@Devin\_Chalmers](https://www.ruby-forum.com/u/Devin_Chalmers)\
**Replies:** 0\
**Last updated:** [June 29, 2006, 1:20am UTC](https://www.ruby-forum.com/t/quiz-pp-pascal-84/96495 "2006-06-29T01:20:53Z")

</div>

Hello everyone! This is my first quiz submission. I suppose it’s a little verbose, but I feel it’s clever enough. I do the straightforward, plain-vanilla recursive building of the triangle right from the Array constru…

---

## [Re: flexible graph library - sans hash](https://www.ruby-forum.com/t/re-flexible-graph-library-sans-hash/96491)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 29, 2006, 1:08am UTC](https://www.ruby-forum.com/t/re-flexible-graph-library-sans-hash/96491 "2006-06-29T01:08:04Z")

</div>

Dear Ara, the first thing that comes to mind would be to represent a graph using an incidence matrix - where the entry (a\_ik) represents the strength with which node i is connected to node k (non-symmetrically, in…

---

## [Error running simple Markaby example](https://www.ruby-forum.com/t/error-running-simple-markaby-example/96473)

<div class="topic-metadata">

**Author:** [@Tony\_K](https://www.ruby-forum.com/u/Tony_K)\
**Replies:** 1\
**Last updated:** [June 29, 2006, 12:30am UTC](https://www.ruby-forum.com/t/error-running-simple-markaby-example/96473 "2006-06-29T00:30:30Z")

</div>

I have installed Markaby using gem, when I try running the example code for Markaby… $ ruby markaby.rb ./markaby.rb:5: uninitialized constant Markaby (NameError) from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_req…

---

## [How to model Hibernate multi-table inheritance with ActiveRe](https://www.ruby-forum.com/t/how-to-model-hibernate-multi-table-inheritance-with-activere/96371)

<div class="topic-metadata">

**Author:** [@marcan](https://www.ruby-forum.com/u/marcan)\
**Replies:** 15\
**Last updated:** [June 28, 2006, 11:21pm UTC](https://www.ruby-forum.com/t/how-to-model-hibernate-multi-table-inheritance-with-activere/96371 "2006-06-28T23:21:49Z")

</div>

Hi I have this “old” database mainly modeled for Hibernate. The java model has something called Asset. Asset is inherited by SomeAsset and AnotherAsset and the similar stuff is in the asset table and the specific dat…

---

## [Re: Problem with gem install, rubygems 0.9.0](https://www.ruby-forum.com/t/re-problem-with-gem-install-rubygems-0-9-0/96471)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [June 28, 2006, 11:11pm UTC](https://www.ruby-forum.com/t/re-problem-with-gem-install-rubygems-0-9-0/96471 "2006-06-28T23:11:53Z")

</div>

Solaris 10 undefined local variable or method \`other’ for 1:Fixnum I got the same result regardless of whether or not RUBYOPT was set. Any ideas? Just curious, it looks like you installed Ruby into your home dire…

---

## [Envelope Paradox](https://www.ruby-forum.com/t/envelope-paradox/96470)

<div class="topic-metadata">

**Author:** [@curi](https://www.ruby-forum.com/u/curi)\
**Replies:** 0\
**Last updated:** [June 28, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/envelope-paradox/96470 "2006-06-28T22:58:26Z")

</div>

I wrote a detailed blog entry about an interesting math problem and a Ruby program to work out the right strategy. code: http://curi.us/code/envelopes.html blog entry: http://www.curi.us/blog/2006/06/envelope-parado…

---

## [Looping through 2 arrays](https://www.ruby-forum.com/t/looping-through-2-arrays/96465)

<div class="topic-metadata">

**Author:** [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Replies:** 2\
**Last updated:** [June 28, 2006, 10:48pm UTC](https://www.ruby-forum.com/t/looping-through-2-arrays/96465 "2006-06-28T22:48:08Z")

</div>

I’m trying to loop through 2 arrays, and notice some odd behaviour, probably because the syntax is not correct unsorted.each do |x| sorted.each do |y| puts 'this is que\_words ’ + x + ‘.’ puts 'this is s\_words ’ + y…

---

## [Re: General API design question: FooError vs Foo::Error](https://www.ruby-forum.com/t/re-general-api-design-question-fooerror-vs-foo-error/96429)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [June 28, 2006, 10:11pm UTC](https://www.ruby-forum.com/t/re-general-api-design-question-fooerror-vs-foo-error/96429 "2006-06-28T22:11:37Z")

</div>

FooError to Foo::Error. Take a look at TimeoutError vs Timeout::Error, for example. Is there a reason the latter is preferred these days? Just curious. Any thoughts? Anyone? Dan This communication is the proper…

---

## [RubyScript2Exe 0.4.3](https://www.ruby-forum.com/t/rubyscript2exe-0-4-3/96288)

<div class="topic-metadata">

**Author:** [@erikveen](https://www.ruby-forum.com/u/erikveen)\
**Replies:** 1\
**Last updated:** [June 28, 2006, 10:01pm UTC](https://www.ruby-forum.com/t/rubyscript2exe-0-4-3/96288 "2006-06-28T22:01:49Z")

</div>

I just released RubyScript2Exe 0.4.3. RubyScript2Exe transforms your Ruby script into a standalone, compressed Windows, Linux or Mac OS X (Darwin) executable. You can look at it as a “compiler”. Not in the sense of a …

---

## [Display a string in a given X,Y position](https://www.ruby-forum.com/t/display-a-string-in-a-given-x-y-position/96461)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 28, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/display-a-string-in-a-given-x-y-position/96461 "2006-06-28T21:58:38Z")

</div>

Hi everybody! Sorry if this question has already been treated, I didn’t succeed in finding anything suitable for my needs. I was trying to display the process of filling a board with given patterns on a console. ###…

---

## [Grep-ing an array](https://www.ruby-forum.com/t/grep-ing-an-array/96439)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 2\
**Last updated:** [June 28, 2006, 9:51pm UTC](https://www.ruby-forum.com/t/grep-ing-an-array/96439 "2006-06-28T21:51:46Z")

</div>

Hi, I am trying to find whether specific strings are contained within a array table\_array contains these elements \[\["", “95424”, “Joe Stalin”, “Field Sales”, “80%”, “27/06/06”, “”, “Amend”\]\] I am grep-ing whether th…

---

## [Beginners question: branching and ends](https://www.ruby-forum.com/t/beginners-question-branching-and-ends/96374)

<div class="topic-metadata">

**Author:** [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Replies:** 10\
**Last updated:** [June 28, 2006, 9:22pm UTC](https://www.ruby-forum.com/t/beginners-question-branching-and-ends/96374 "2006-06-28T21:22:46Z")

</div>

trying to figure out exactly where ‘end’ needs to be in my code. I’m using Scite and find that often time it will report ‘expecting kEND’ at the last line of the code and not where the kEND should actually be. It wo…

---

## [String manipulation](https://www.ruby-forum.com/t/string-manipulation/96204)

<div class="topic-metadata">

**Author:** [@sivakumar](https://www.ruby-forum.com/u/sivakumar)\
**Replies:** 13\
**Last updated:** [June 28, 2006, 8:30pm UTC](https://www.ruby-forum.com/t/string-manipulation/96204 "2006-06-28T20:30:31Z")

</div>

How to add “-” between the numbers Eg: 123456789123456789 as 12-3456-7891-2345-6789

---

## [Building on AIX 5.3](https://www.ruby-forum.com/t/building-on-aix-5-3/64042)

<div class="topic-metadata">

**Author:** [@justinj](https://www.ruby-forum.com/u/justinj)\
**Replies:** 2\
**Last updated:** [June 28, 2006, 8:15pm UTC](https://www.ruby-forum.com/t/building-on-aix-5-3/64042 "2006-06-28T20:15:36Z")

</div>

Hello, I’m having a difficult time building Ruby on AIX 5.3. I’m installing it on a separate file system (/svn) to avoid the need for root access. First I uncompress the following prebuilt binaries to /svn. I downl…

---

## [QInputDialog syntax](https://www.ruby-forum.com/t/qinputdialog-syntax/96338)

<div class="topic-metadata">

**Author:** [@gsiener](https://www.ruby-forum.com/u/gsiener)\
**Replies:** 3\
**Last updated:** [June 28, 2006, 8:13pm UTC](https://www.ruby-forum.com/t/qinputdialog-syntax/96338 "2006-06-28T20:13:17Z")

</div>

Hi, I’m new to Ruby and QtRuby. I have used kdevelop to create my first Qt based program and am struggling with the conversion between the C++ syntax used in the Qt Reference Document and actual Ruby syntax. In part…

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

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