# Ruby

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

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

---

## [List of directory](https://www.ruby-forum.com/t/list-of-directory/110448)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 4\
**Last updated:** [July 26, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/list-of-directory/110448 "2007-07-26T23:41:38Z")

</div>

Hi, Does anybody know how to list directory in alphabetical order? i.e. I have following files: a10 a1 a2 a20 sort method sorts them as follows: a1 a10 a2 a20 but I need such order: a1 a2 a10 a20 Any hel…

---

## [Transparent Image Using Rmagick](https://www.ruby-forum.com/t/transparent-image-using-rmagick/110440)

<div class="topic-metadata">

**Author:** [@ciocan](https://www.ruby-forum.com/u/ciocan)\
**Replies:** 9\
**Last updated:** [July 26, 2007, 11:32pm UTC](https://www.ruby-forum.com/t/transparent-image-using-rmagick/110440 "2007-07-26T23:32:38Z")

</div>

Hello, I use rmagick to create a new image. How can I make this image with 50% transparency? Thanks

---

## [File.basename problems](https://www.ruby-forum.com/t/file-basename-problems/110337)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 12\
**Last updated:** [July 26, 2007, 11:12pm UTC](https://www.ruby-forum.com/t/file-basename-problems/110337 "2007-07-26T23:12:36Z")

</div>

Why is it that File.basename works for me for one single file, but, it doesn’t work for an array of files. Here’s an example of what worked for me for one file; then, it didn’t work for multiple files. Thanks, Peter …

---

## [Crash when using sockets](https://www.ruby-forum.com/t/crash-when-using-sockets/110391)

<div class="topic-metadata">

**Author:** [@memetical](https://www.ruby-forum.com/u/memetical)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/crash-when-using-sockets/110391 "2007-07-26T22:43:30Z")

</div>

whenever I try to use the following socket, an error window pops up saying rubyw.exe has requested the runtime to teminate it in an unusual way. I am running XP SP2 and ruby-1.8.6. the socket i try to open is the foll…

---

## [Set Telnet Server nonblocking = false](https://www.ruby-forum.com/t/set-telnet-server-nonblocking-false/110504)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/set-telnet-server-nonblocking-false/110504 "2007-07-26T22:43:30Z")

</div>

Hey all, I’m writing a telnet server. I think it should be obvious what it does. But, my clients keep getting disconnected whenever I use IO.getc because it is nonblocking and it’s throwing an error. How can I set my…

---

## [Class variables and how to set them up only once](https://www.ruby-forum.com/t/class-variables-and-how-to-set-them-up-only-once/110499)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 5\
**Last updated:** [July 26, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/class-variables-and-how-to-set-them-up-only-once/110499 "2007-07-26T22:40:30Z")

</div>

I’m trying to share a File object with everything that inherits from Superclass, for logging. I’m trying to come up with a nice clean way of handling this, and this isn’t it: Right now it’s doing a begin/rescue/end t…

---

## [Modeling -- how to support multiple views of same components](https://www.ruby-forum.com/t/modeling-how-to-support-multiple-views-of-same-components/110384)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 4\
**Last updated:** [July 26, 2007, 9:39pm UTC](https://www.ruby-forum.com/t/modeling-how-to-support-multiple-views-of-same-components/110384 "2007-07-26T21:39:21Z")

</div>

I have a little design conundrum. I’m not sure the best way to model this. Basically I have two model “parts” and I want to support two ways of using them. Eg. class Part1 attr\_accessor :a, :b, :x end class Part2 …

---

## [Rtrim and ltrim function for ruby: is this ok?](https://www.ruby-forum.com/t/rtrim-and-ltrim-function-for-ruby-is-this-ok/110299)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 5\
**Last updated:** [July 26, 2007, 9:24pm UTC](https://www.ruby-forum.com/t/rtrim-and-ltrim-function-for-ruby-is-this-ok/110299 "2007-07-26T21:24:20Z")

</div>

I created this function: class String def rtrim(character) if self\[-1, 1\] == character.to\_s self\[0, self.length - 1\] end return self end def ltrim(character) if self\[0, 1\] == character.to\_s self\[1, self.length\] …

---

## [Ruby training/classes Bay Area](https://www.ruby-forum.com/t/ruby-training-classes-bay-area/110145)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/ruby-training-classes-bay-area/110145 "2007-07-26T20:15:01Z")

</div>

Hello- Anyone know if there are any classes (training) in Ruby being held in the Bay Area ? Thanks, Bob

---

## [Does rake work with cruisecontrol? How?](https://www.ruby-forum.com/t/does-rake-work-with-cruisecontrol-how/110485)

<div class="topic-metadata">

**Author:** [@maung](https://www.ruby-forum.com/u/maung)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/does-rake-work-with-cruisecontrol-how/110485 "2007-07-26T20:07:23Z")

</div>

Hi, I am totally new to rake and cruisecontrol. Does Rake work with cruisecontrol? If so, could someone give me a short example? Any help would greatly appreciated. Thanks, maung

---

## [Sketchup user input](https://www.ruby-forum.com/t/sketchup-user-input/110473)

<div class="topic-metadata">

**Author:** [@Buzzie09](https://www.ruby-forum.com/u/Buzzie09)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 6:30pm UTC](https://www.ruby-forum.com/t/sketchup-user-input/110473 "2007-07-26T18:30:00Z")

</div>

How do I get user input in sketchup? How do I prompt for a point selection? then find a rectangle from 2 more points? How do I prompt for a edge, or face selection?

---

## [Rtrim and ltrim function for ruby: is this ok?](https://www.ruby-forum.com/t/rtrim-and-ltrim-function-for-ruby-is-this-ok/110374)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 6\
**Last updated:** [July 26, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/rtrim-and-ltrim-function-for-ruby-is-this-ok/110374 "2007-07-26T18:26:52Z")

</div>

I made these two functions to extend the default String object: class String def rtrim(character) if self\[-1, 1\] == character.to\_s self\[0, self.length - 1\] end return self end def ltrim(character) if self\[0, 1\] =…

---

## [NameError: ApplicationAPI](https://www.ruby-forum.com/t/nameerror-applicationapi/110479)

<div class="topic-metadata">

**Author:** [@markus](https://www.ruby-forum.com/u/markus)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/nameerror-applicationapi/110479 "2007-07-26T18:20:59Z")

</div>

Just for the record… I’ve seen occasional mentions of a problem people have had upgrading existing Rails 1.1.x applications to Rails 1.2.x, leading to complete failure of the application with the message: NameError: …

---

## [Interesting research for Ruby implementors](https://www.ruby-forum.com/t/interesting-research-for-ruby-implementors/110354)

<div class="topic-metadata">

**Author:** [@MSEdward\_SEdS\_Bora](https://www.ruby-forum.com/u/MSEdward_SEdS_Bora)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 6:04pm UTC](https://www.ruby-forum.com/t/interesting-research-for-ruby-implementors/110354 "2007-07-26T18:04:58Z")

</div>

I just discovered this paper today: http://domino.research.ibm.com/comm/research\_people.nsf/pages/hirzel.index.html/$FILE/sigmetrics07-layouts.pdf “Data Layouts for Object-Oriented Programs”. Interesting reading for t…

---

## [Help if else](https://www.ruby-forum.com/t/help-if-else/110467)

<div class="topic-metadata">

**Author:** [@r0nsync](https://www.ruby-forum.com/u/r0nsync)\
**Replies:** 4\
**Last updated:** [July 26, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/help-if-else/110467 "2007-07-26T17:46:57Z")

</div>

if ((( chaine\[i+14\] == “twincards\>false\</twincards”)||(chaine\[i+14\] == “twincards\>true\</twincards”))|| ( chaine\[ i+14\]== “twincards xsi:nil=“1”/”)) ??? : syntax error, expecting end-of-file ???

---

## [Help with net/ssh](https://www.ruby-forum.com/t/help-with-net-ssh/110468)

<div class="topic-metadata">

**Author:** [@bloc](https://www.ruby-forum.com/u/bloc)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/help-with-net-ssh/110468 "2007-07-26T17:06:42Z")

</div>

hey guys, I’m new to Ruby and Rails. I posted this in Rails forum, but I’m also posting here. Hopefully it isn’t a big deal. My setup is Locomotive on Mac OS X. When I try to run the below code, I get the below erro…

---

## [Python Vs Ruby ( again )](https://www.ruby-forum.com/t/python-vs-ruby-again/110469)

<div class="topic-metadata">

**Author:** [@bpauly](https://www.ruby-forum.com/u/bpauly)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/python-vs-ruby-again/110469 "2007-07-26T16:53:51Z")

</div>

There was a discussion a while back in trying to get Ruby looking like Python using an indentation scheme and I posted a possible solution to that http://xtargets.com/snippets/posts/show/68 There is also the Lazibi l…

---

## [How to truncate float number after dot?](https://www.ruby-forum.com/t/how-to-truncate-float-number-after-dot/110438)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 7\
**Last updated:** [July 26, 2007, 4:20pm UTC](https://www.ruby-forum.com/t/how-to-truncate-float-number-after-dot/110438 "2007-07-26T16:20:48Z")

</div>

Hi, How to truncate float number after dot? I suppose it would be easy. Thank in advance MT

---

## [FCGI with GEM install error](https://www.ruby-forum.com/t/fcgi-with-gem-install-error/102281)

<div class="topic-metadata">

**Author:** [@dezrtdude](https://www.ruby-forum.com/u/dezrtdude)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/fcgi-with-gem-install-error/102281 "2007-07-26T15:11:53Z")

</div>

Hello folks! After successfully installing Ruby + Rails on windows to develop, I wanted to install Ruby with FCGI (for apache2), MySQL and Rails on a SuSE Linux 10.0 (x64) server for production use. RAILS installed f…

---

## [Gem install fcgi does not work](https://www.ruby-forum.com/t/gem-install-fcgi-does-not-work/89858)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/gem-install-fcgi-does-not-work/89858 "2007-07-26T15:09:45Z")

</div>

Hi all I’m trying to follow this guide: http://wiki.rubyonrails.org/rails/pages/RailsOnSUSE And I’m having problem with installing fcgi using gems (I’m logged in as root): koelsch:/home/josh # gem install fcgi Atte…

---

## [MySQL](https://www.ruby-forum.com/t/mysql/110451)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 8\
**Last updated:** [July 26, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/mysql/110451 "2007-07-26T14:51:30Z")

</div>

Hi, How to operate on MySQL? I would like to delete, create database and upgrade with prepared files. I know mysql library but I’m not sure whether it let me operate on commands such as delete database, source file\_…

---

## [Boolean question. File here but not there](https://www.ruby-forum.com/t/boolean-question-file-here-but-not-there/110234)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [July 26, 2007, 2:23pm UTC](https://www.ruby-forum.com/t/boolean-question-file-here-but-not-there/110234 "2007-07-26T14:23:08Z")

</div>

Hi, I’m tryiing to determine that, for every TIFF file I have, is there a corresponding PDF file, and, if there isn’t, then, notate that in the log. If there is a PDF file, then, don’t log it. So, the resulting log s…

---

## [MySql+UTF8 woes](https://www.ruby-forum.com/t/mysql-utf8-woes/110452)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 1:53pm UTC](https://www.ruby-forum.com/t/mysql-utf8-woes/110452 "2007-07-26T13:53:56Z")

</div>

I am experiencing a strange problem when retrieving Unicode values from my MySql5 database on Windows. Here is what I have: All programs/modules in my application require in the beginning a file containing $KCODE=‘…

---

## [Archives of this forum](https://www.ruby-forum.com/t/archives-of-this-forum/110231)

<div class="topic-metadata">

**Author:** [@llinklater](https://www.ruby-forum.com/u/llinklater)\
**Replies:** 5\
**Last updated:** [July 26, 2007, 1:35pm UTC](https://www.ruby-forum.com/t/archives-of-this-forum/110231 "2007-07-26T13:35:34Z")

</div>

Because of the magnitude of contributors there is a LOT of great stuff in here, but it goes away quickly. Where can I get an archive of what is inside here?

---

## [Blocking read blocks all threads on Windows?](https://www.ruby-forum.com/t/blocking-read-blocks-all-threads-on-windows/110446)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 12:31pm UTC](https://www.ruby-forum.com/t/blocking-read-blocks-all-threads-on-windows/110446 "2007-07-26T12:31:24Z")

</div>

If I run this on Linux (Ruby 1.8.6), it times out as I’d expect: require ‘timeout’ r, w = IO.pipe Timeout::timeout(2) { r.getc } But if I run it on Windows, it blocks forever. Similarly the following code locks up o…

---

## [See raw xml in soap4r](https://www.ruby-forum.com/t/see-raw-xml-in-soap4r/109981)

<div class="topic-metadata">

**Author:** [@nappin](https://www.ruby-forum.com/u/nappin)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 11:43am UTC](https://www.ruby-forum.com/t/see-raw-xml-in-soap4r/109981 "2007-07-26T11:43:22Z")

</div>

Hi, Is there any way with soap4r to see the raw xml of the response without turning on the debug mode? For me at least, my soap scripts work correctly 99% of the time, however occasionally they raise exceptions and i…

---

## [Ruby on the Meraki Mini](https://www.ruby-forum.com/t/ruby-on-the-meraki-mini/103096)

<div class="topic-metadata">

**Author:** [@diarmuidwrenne](https://www.ruby-forum.com/u/diarmuidwrenne)\
**Replies:** 5\
**Last updated:** [July 26, 2007, 11:40am UTC](https://www.ruby-forum.com/t/ruby-on-the-meraki-mini/103096 "2007-07-26T11:40:34Z")

</div>

Hi Guys, I have posted my experience using Ruby on the Meraki Minis. They are $50 wifi routers that do mesh networking. the run a version of OpenWRT and include lighttpd and ruby. I have a couple of example programs a…

---

## [Rake and implicit dependencies](https://www.ruby-forum.com/t/rake-and-implicit-dependencies/110435)

<div class="topic-metadata">

**Author:** [@bpauly](https://www.ruby-forum.com/u/bpauly)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 10:34am UTC](https://www.ruby-forum.com/t/rake-and-implicit-dependencies/110435 "2007-07-26T10:34:04Z")

</div>

I am playing with Rake to build c projects and I run into this problem ######### task :default =\> \[‘main.out’\] file ‘main.out’ rule ‘.out’ =\> \[’.o’\] do |t| sh “cc #{t.source} -o #{t.name}” end rule ‘.o’ =\> \[’.c’\] …

---

## [Rtags bug](https://www.ruby-forum.com/t/rtags-bug/110433)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 10:33am UTC](https://www.ruby-forum.com/t/rtags-bug/110433 "2007-07-26T10:33:04Z")

</div>

And progress on this bug? http://rubyforge.org/tracker/index.php?func=detail&aid=11397&group\_id=1789&atid=6959 Thanks, T.

---

## [Bidirectionnal relation](https://www.ruby-forum.com/t/bidirectionnal-relation/110273)

<div class="topic-metadata">

**Author:** [@dohzya](https://www.ruby-forum.com/u/dohzya)\
**Replies:** 5\
**Last updated:** [July 26, 2007, 10:08am UTC](https://www.ruby-forum.com/t/bidirectionnal-relation/110273 "2007-07-26T10:08:44Z")

</div>

Hi everyone, I have a problem with bidirectional relations : how to implements it ? I can’t implements it with 2 relations without synchronize them : no synchronization class Entity attr\_accessor :mother attr\_reader …

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

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