# Ruby

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

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

---

## [Running Java from Rails](https://www.ruby-forum.com/t/running-java-from-rails/85325)

<div class="topic-metadata">

**Author:** [@Javier\_CH](https://www.ruby-forum.com/u/Javier_CH)\
**Replies:** 8\
**Last updated:** [February 12, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/running-java-from-rails/85325 "2007-02-12T19:49:50Z")

</div>

Does anyone know of a possibility to run Java-Classes out of RoR (e.g. use java objects in a ruby context)? I’m a newbie regarding RoR coming from Java-Land and I’m asking myself if there’s an easy way for me to code …

---

## [== operator - How does it work?](https://www.ruby-forum.com/t/operator-how-does-it-work/85328)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 4\
**Last updated:** [February 12, 2007, 6:32pm UTC](https://www.ruby-forum.com/t/operator-how-does-it-work/85328 "2007-02-12T18:32:37Z")

</div>

I am running the following code from Programming Ruby book on page 120: class Song include Comparable def initialize(name, artist, duration) @name = name @artist = artist @duration = duration @plays = 0 …

---

## [Ruby and CLIPS expert system shell](https://www.ruby-forum.com/t/ruby-and-clips-expert-system-shell/85288)

<div class="topic-metadata">

**Author:** [@Kobayashi](https://www.ruby-forum.com/u/Kobayashi)\
**Replies:** 1\
**Last updated:** [February 12, 2007, 5:43pm UTC](https://www.ruby-forum.com/t/ruby-and-clips-expert-system-shell/85288 "2007-02-12T17:43:32Z")

</div>

Is it somehow possible to use Ruby with CLIPS expert system shell?

---

## [Embedding if statements in upto function.(newbie question)](https://www.ruby-forum.com/t/embedding-if-statements-in-upto-function-newbie-question/85285)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 6\
**Last updated:** [February 12, 2007, 4:07pm UTC](https://www.ruby-forum.com/t/embedding-if-statements-in-upto-function-newbie-question/85285 "2007-02-12T16:07:20Z")

</div>

Thank you to everyone for all of your help. I was trying to use upto to go through an array of arrays while using if statments. Could anyone enlighten me on what I am doing wrong with the if statements? I am sure it…

---

## [Camping Install -Without Gems](https://www.ruby-forum.com/t/camping-install-without-gems/85260)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 1\
**Last updated:** [February 12, 2007, 12:57pm UTC](https://www.ruby-forum.com/t/camping-install-without-gems/85260 "2007-02-12T12:57:51Z")

</div>

Hey! So the plan was to rent out a small development server to test a proof of concept design with camping, and then to port it to a more expensive server upon success. The server only has 64 MB of ram. Upon running …

---

## [Ruby-GNOME2 Win32 GUI Installer](https://www.ruby-forum.com/t/ruby-gnome2-win32-gui-installer/85296)

<div class="topic-metadata">

**Author:** [@Masao\_M](https://www.ruby-forum.com/u/Masao_M)\
**Replies:** 0\
**Last updated:** [February 12, 2007, 12:29pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-win32-gui-installer/85296 "2007-02-12T12:29:48Z")

</div>

Hi, I released the new Ruby-GNOME2 Win32 GUI Installer for Ruby-GNOME2-0.16.0. What’s this? This is the GUI installer of GTK2, Ruby/GTK2 and some other libraries which Ruby-GNOME2 project supports. This includes al…

---

## [URI.extract issue](https://www.ruby-forum.com/t/uri-extract-issue/85290)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 0\
**Last updated:** [February 12, 2007, 12:22pm UTC](https://www.ruby-forum.com/t/uri-extract-issue/85290 "2007-02-12T12:22:47Z")

</div>

require ‘uri’ URI.extract(“xczc http://www.google.com/';return fsfasjunkdfsfsadf c”) =\> \[“http://www.google.com/';return”\] T.

---

## [Guidelines for combining FP and OO with Ruby](https://www.ruby-forum.com/t/guidelines-for-combining-fp-and-oo-with-ruby/85287)

<div class="topic-metadata">

**Author:** [@rubarachni](https://www.ruby-forum.com/u/rubarachni)\
**Replies:** 0\
**Last updated:** [February 12, 2007, 12:11pm UTC](https://www.ruby-forum.com/t/guidelines-for-combining-fp-and-oo-with-ruby/85287 "2007-02-12T12:11:46Z")

</div>

There have been some threads on Functional Programming with Ruby. But I haven’t found any guidelines on combining Functional Programming and Object Oriented with Ruby : when FP is better suited ? when OO is better su…

---

## [Erubis 2.2.0 release - a fast eRuby implementation](https://www.ruby-forum.com/t/erubis-2-2-0-release-a-fast-eruby-implementation/85289)

<div class="topic-metadata">

**Author:** [@kwatch](https://www.ruby-forum.com/u/kwatch)\
**Replies:** 0\
**Last updated:** [February 12, 2007, 12:09pm UTC](https://www.ruby-forum.com/t/erubis-2-2-0-release-a-fast-eruby-implementation/85289 "2007-02-12T12:09:46Z")

</div>

Hi all, I have released Erubis 2.2.0. http://www.kuwata-lab.com/erubis http://www.kuwata-lab.com/erubis/CHANGES Erubis is another implementation of eRuby. Features: Very fast, almost three times faster than ERB an…

---

## [How can I change the default font size in tk?](https://www.ruby-forum.com/t/how-can-i-change-the-default-font-size-in-tk/85270)

<div class="topic-metadata">

**Author:** [@wangdong2](https://www.ruby-forum.com/u/wangdong2)\
**Replies:** 2\
**Last updated:** [February 12, 2007, 5:45am UTC](https://www.ruby-forum.com/t/how-can-i-change-the-default-font-size-in-tk/85270 "2007-02-12T05:45:17Z")

</div>

root = TkRoot.new do font {Tahoma 10 normal} end can’t work.

---

## [Backport from ruby 1.9, including constants](https://www.ruby-forum.com/t/backport-from-ruby-1-9-including-constants/85255)

<div class="topic-metadata">

**Author:** [@Victor\_SZverokSS\_Sh](https://www.ruby-forum.com/u/Victor_SZverokSS_Sh)\
**Replies:** 9\
**Last updated:** [February 12, 2007, 5:00am UTC](https://www.ruby-forum.com/t/backport-from-ruby-1-9-including-constants/85255 "2007-02-12T05:00:15Z")

</div>

Hello all. During last several monthes I’ve worked on some library, using the latest ruby1.9. Now I want to release the library to community, but first I need to “backport” it. One small problem I’ve stumbled upon: …

---

## [ActiveRecord::Extensions 0.4.0 Released](https://www.ruby-forum.com/t/activerecord-extensions-0-4-0-released/102687)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 0\
**Last updated:** [February 12, 2007, 4:11am UTC](https://www.ruby-forum.com/t/activerecord-extensions-0-4-0-released/102687 "2007-02-12T04:11:12Z")

</div>

ActiveRecord::Extensions 0.4.0 is released! Whats New? to\_csv functionality temporary table support foreign key support Check out the full release notes at: http://www.continuousthinking.com/2007/2/12/activerecord- …

---

## [Windows and Ruby - Not very good friends?](https://www.ruby-forum.com/t/windows-and-ruby-not-very-good-friends/85191)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 13\
**Last updated:** [February 12, 2007, 1:32am UTC](https://www.ruby-forum.com/t/windows-and-ruby-not-very-good-friends/85191 "2007-02-12T01:32:05Z")

</div>

I am new to Ruby and RoR, so pardon me if I ask naive questions. Ruby on Windows just does not feel right to me. Primarily, I develop in Linux, mostly in Fedora. Though, I have Ubuntu installed on some machines as w…

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229094)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [February 12, 2007, 12:34am UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229094 "2007-02-12T00:34:00Z")

</div>

Begin forwarded message:

---

## [Fwd: quiz 113](https://www.ruby-forum.com/t/fwd-quiz-113/133590)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [February 12, 2007, 12:33am UTC](https://www.ruby-forum.com/t/fwd-quiz-113/133590 "2007-02-12T00:33:00Z")

</div>

Begin forwarded message:

---

## [Fwd: Answer to #113](https://www.ruby-forum.com/t/fwd-answer-to-113/229100)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [February 12, 2007, 12:31am UTC](https://www.ruby-forum.com/t/fwd-answer-to-113/229100 "2007-02-12T00:31:59Z")

</div>

Begin forwarded message:

---

## [Creating/accessing class vars from modules being used as mix](https://www.ruby-forum.com/t/creating-accessing-class-vars-from-modules-being-used-as-mix/85247)

<div class="topic-metadata">

**Author:** [@Christopher\_JSBott](https://www.ruby-forum.com/u/Christopher_JSBott)\
**Replies:** 2\
**Last updated:** [February 12, 2007, 12:28am UTC](https://www.ruby-forum.com/t/creating-accessing-class-vars-from-modules-being-used-as-mix/85247 "2007-02-12T00:28:59Z")

</div>

Hello, I’m writing a module that is to be used as a mixin for classes. I cannot create or access class variables from within module methods. Please look at this small pastie. It contains the module definitions, cla…

---

## [Generator implementation](https://www.ruby-forum.com/t/generator-implementation/85235)

<div class="topic-metadata">

**Author:** [@Lin\_Jen-Shin](https://www.ruby-forum.com/u/Lin_Jen-Shin)\
**Replies:** 0\
**Last updated:** [February 11, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/generator-implementation/85235 "2007-02-11T21:45:47Z")

</div>

I was reading the Generator implementation a few hours ago, finding out that it’s a little hard to understand the code for me. Then I started writing my own implementation with Continuation, hoping I understood things…

---

## [Dhaka-2.0.1 housecleaning](https://www.ruby-forum.com/t/dhaka-2-0-1-housecleaning/85231)

<div class="topic-metadata">

**Author:** [@Mushfeq\_K](https://www.ruby-forum.com/u/Mushfeq_K)\
**Replies:** 0\
**Last updated:** [February 11, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/dhaka-2-0-1-housecleaning/85231 "2007-02-11T20:55:44Z")

</div>

This release adds no new functionality. Instead it focuses on: Cleaning up the code - I’m grateful to Marcel Molina, Jr for submitting a major library-wide patch that makes the code much more idiomatic. The adoption…

---

## [Socket Problem](https://www.ruby-forum.com/t/socket-problem/85228)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [February 11, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/socket-problem/85228 "2007-02-11T20:25:42Z")

</div>

Hello, I’ve a problem with socket using in ruby. My TCPSocket use a lot of CPU time when downloading and I don’t know from where it sould come. Reply me if you have an idea or if you already has a problem like this …

---

## [AWS Presentation at the Feb. Phoenix Ruby User Group Meeting](https://www.ruby-forum.com/t/aws-presentation-at-the-feb-phoenix-ruby-user-group-meeting/85227)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [February 11, 2007, 7:12pm UTC](https://www.ruby-forum.com/t/aws-presentation-at-the-feb-phoenix-ruby-user-group-meeting/85227 "2007-02-11T19:12:36Z")

</div>

What: Phoenix Ruby U. Group When: February 12, 2007, 6:15 PM Where: Axway (formerly known as Cyclone Commerce) offices See http://www.rubyaz.org/groups/prug for address and map Topic: Amazon Web Services Jinesh Var…

---

## [Creating an object the hard way, made easy with lambda](https://www.ruby-forum.com/t/creating-an-object-the-hard-way-made-easy-with-lambda/85226)

<div class="topic-metadata">

**Author:** [@Griff](https://www.ruby-forum.com/u/Griff)\
**Replies:** 0\
**Last updated:** [February 11, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/creating-an-object-the-hard-way-made-easy-with-lambda/85226 "2007-02-11T18:45:35Z")

</div>

\#!/usr/bin/env ruby #$LastChangedRevision: 49 $ The purpose of this sample is to demonstrate the application of lambda expressions to create a rudimentary ‘person object’. Its features Smalltalk style “message passin…

---

## [Remove element from array](https://www.ruby-forum.com/t/remove-element-from-array/85221)

<div class="topic-metadata">

**Author:** [@j-merrill](https://www.ruby-forum.com/u/j-merrill)\
**Replies:** 3\
**Last updated:** [February 11, 2007, 5:58pm UTC](https://www.ruby-forum.com/t/remove-element-from-array/85221 "2007-02-11T17:58:46Z")

</div>

Hi, how can I do to rtemove an elemnt from an array, I have this array : “user”=\>{“password\_confirmation”=\>"", “screen\_name”=\>“sdfsdfsdfsdf”, “first\_name”=\>“sdfsdfsd”, “last\_name”=\>“dskkd”, “password”=\>"", “email”=\>“…

---

## [Inter process semaphore](https://www.ruby-forum.com/t/inter-process-semaphore/85212)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 11, 2007, 4:20pm UTC](https://www.ruby-forum.com/t/inter-process-semaphore/85212 "2007-02-11T16:20:23Z")

</div>

Hi! Is there a way in ruby to use global system’s semaphore. I am using Linux and AFAIK in C you can have many programs using the same semaphore, but I do not know how to do this in Ruby :(. Best Regards, Roman Kamy…

---

## [Inter process semaphore](https://www.ruby-forum.com/t/inter-process-semaphore/85207)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 11, 2007, 3:57pm UTC](https://www.ruby-forum.com/t/inter-process-semaphore/85207 "2007-02-11T15:57:22Z")

</div>

Hi! Is there a way in ruby to use global system’s semaphore? I am using Linux and AFAIK in C you can have many programs using the same semaphore, but I do not know how to do this in Ruby :(. Best Regards, Roman Kamy…

---

## [autorunner.rb$B$N(B-n$B$,F0$+$J$$(B](https://www.ruby-forum.com/t/autorunner-rb-b-n-b-n-b-f0-j-b/85213)

<div class="topic-metadata">

**Author:** [@Kouhei\_S](https://www.ruby-forum.com/u/Kouhei_S)\
**Replies:** 0\
**Last updated:** [February 11, 2007, 1:55pm UTC](https://www.ruby-forum.com/t/autorunner-rb-b-n-b-n-b-f0-j-b/85213 "2007-02-11T13:55:13Z")

</div>

é ˆè—¤ã§ã™ï¼Ž method\_nameãŒStringã§ã¯ãªãSymbolã§è¿”ã£ã¦ãã‚‹ã‚ˆã†ã«ãªã£ãŸãŸ ã‚autorunner.rbã®-nã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒå‹•ã‹ãªããªã£ã¦ã„ã¾ã™ï¼Ž

---

## [Hash into Two Arguments (for REXML)](https://www.ruby-forum.com/t/hash-into-two-arguments-for-rexml/85152)

<div class="topic-metadata">

**Author:** [@keith2koool](https://www.ruby-forum.com/u/keith2koool)\
**Replies:** 1\
**Last updated:** [February 11, 2007, 1:16pm UTC](https://www.ruby-forum.com/t/hash-into-two-arguments-for-rexml/85152 "2007-02-11T13:16:10Z")

</div>

Hey, I’m storing my XML namespaces for REXML as Hashes (for XPath.first \[1\]) like so: RDF\_NS = {“rdf” =\> “http://www.w3.org/1999/02/22-rdf-syntax-ns#”} When I need to do an XPath lookup, these work great (especially …

---

## [Randomly Sorting Strings](https://www.ruby-forum.com/t/randomly-sorting-strings/85200)

<div class="topic-metadata">

**Author:** [@woodyee](https://www.ruby-forum.com/u/woodyee)\
**Replies:** 8\
**Last updated:** [February 11, 2007, 12:15pm UTC](https://www.ruby-forum.com/t/randomly-sorting-strings/85200 "2007-02-11T12:15:11Z")

</div>

Hi! I’m trying to write a program that will print out a different string each time it’s run from a list of strings. For example: example = \[‘one’, ‘two’, ‘three’\] sort them somehow ‘two’ prints out as the output, for…

---

## [Gateway Down-Time This Weekend](https://www.ruby-forum.com/t/gateway-down-time-this-weekend/84689)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 1\
**Last updated:** [February 11, 2007, 6:06am UTC](https://www.ruby-forum.com/t/gateway-down-time-this-weekend/84689 "2007-02-11T06:06:31Z")

</div>

Our Usenet host is going offline for a few hours this Saturday (February 10th) to make hardware upgrades. The Usenet to mailing list message exchange will not function while the host is down. Thank you for your patie…

---

## [Fib\_example.rb](https://www.ruby-forum.com/t/fib-example-rb/85195)

<div class="topic-metadata">

**Author:** [@Rae](https://www.ruby-forum.com/u/Rae)\
**Replies:** 1\
**Last updated:** [February 11, 2007, 4:25am UTC](https://www.ruby-forum.com/t/fib-example-rb/85195 "2007-02-11T04:25:23Z")

</div>

I am reading the Programming Ruby book by Dave T. (2nd edition) and he mentions a trick when you want to use irb to try example code and directs you how to load “code/rdoc/fib\_example.rb”. I just downloaded the latest…

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

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