# Ruby

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

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

---

## [Enhancing the Gateway (Help Needed)](https://www.ruby-forum.com/t/enhancing-the-gateway-help-needed/118560)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 25\
**Last updated:** [October 29, 2007, 11:45pm UTC](https://www.ruby-forum.com/t/enhancing-the-gateway-help-needed/118560 "2007-10-29T23:45:30Z")

</div>

Here’s the short-story on the current situation with our mailing list to Usenet gateway: Our Usenet host rejects multipart/alternative messages because they are technically illegal Usenet posts This means that some e…

---

## [Leopard + mysql](https://www.ruby-forum.com/t/leopard-mysql/118616)

<div class="topic-metadata">

**Author:** [@x43](https://www.ruby-forum.com/u/x43)\
**Replies:** 6\
**Last updated:** [October 29, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/leopard-mysql/118616 "2007-10-29T23:41:45Z")

</div>

Hello: I am trying to connect to a remote mysql server via ruby with require mysql tag. I am seeing the following error : dbconnect.rb:4:in \`require’: no such file to load – mysql (LoadError) from dbconnect.rb:4 An…

---

## [Skip the first invocation e.g. skip\_first { foo }](https://www.ruby-forum.com/t/skip-the-first-invocation-e-g-skip-first-foo/118355)

<div class="topic-metadata">

**Author:** [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Replies:** 31\
**Last updated:** [October 29, 2007, 11:31pm UTC](https://www.ruby-forum.com/t/skip-the-first-invocation-e-g-skip-first-foo/118355 "2007-10-29T23:31:29Z")

</div>

Consider the following code: first = true 3.times do if first first = false else puts ‘foo’ end … end I’d like to be able to do the following instead: 3.times do skip\_first { puts ‘foo’ } … end However, I’…

---

## [At Revision 46, Microsoft.Scripting.csproj imports SpecSharp.targets](https://www.ruby-forum.com/t/at-revision-46-microsoft-scripting-csproj-imports-specsharp-targets/118307)

<div class="topic-metadata">

**Author:** [@Brian\_JSCardiff](https://www.ruby-forum.com/u/Brian_JSCardiff)\
**Replies:** 5\
**Last updated:** [October 29, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/at-revision-46-microsoft-scripting-csproj-imports-specsharp-targets/118307 "2007-10-29T23:27:23Z")

</div>

Since the SpecSharp.targets its not in trunk VS is unable to load the project. BTW: Hi all! I am trying to keep up to date with this great project and I expect to have some time to collaborate in the following weeks. …

---

## [Cheri: Builder-style JRuby/Swing GUI development](https://www.ruby-forum.com/t/cheri-builder-style-jruby-swing-gui-development/118649)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 2\
**Last updated:** [October 29, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/cheri-builder-style-jruby-swing-gui-development/118649 "2007-10-29T23:15:42Z")

</div>

Ara mentioned wanting to hear more about Swing-based GUI stuff in JRuby, so here’s a quick intro to some of the frameworks available right now for doing Swing stuff. I’d like to know what people think of these and wha…

---

## [Something wrong with my hash of hash](https://www.ruby-forum.com/t/something-wrong-with-my-hash-of-hash/118636)

<div class="topic-metadata">

**Author:** [@larstico](https://www.ruby-forum.com/u/larstico)\
**Replies:** 5\
**Last updated:** [October 29, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/something-wrong-with-my-hash-of-hash/118636 "2007-10-29T22:50:38Z")

</div>

I try to get a hash of hash to make some sort of counter (I have a set of random pair and want to count the number of times they appear). I use this code but even if I can access data, my hash seems empty (so each and…

---

## [Autoprint of exception backtrace](https://www.ruby-forum.com/t/autoprint-of-exception-backtrace/116713)

<div class="topic-metadata">

**Author:** [@mortee](https://www.ruby-forum.com/u/mortee)\
**Replies:** 1\
**Last updated:** [October 29, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/autoprint-of-exception-backtrace/116713 "2007-10-29T20:25:28Z")

</div>

How can I modify how much of the exception backtrace gets printed by ruby for an unhandled exception? When an exception is raised deep in the caller stack, I see the bottom of the stack printed, then something like … …

---

## [Problem using FileUtils to sort JPEG files](https://www.ruby-forum.com/t/problem-using-fileutils-to-sort-jpeg-files/117835)

<div class="topic-metadata">

**Author:** [@forgottenwizard](https://www.ruby-forum.com/u/forgottenwizard)\
**Replies:** 13\
**Last updated:** [October 29, 2007, 7:45pm UTC](https://www.ruby-forum.com/t/problem-using-fileutils-to-sort-jpeg-files/117835 "2007-10-29T19:45:39Z")

</div>

This is an odd problem, I admit. I’m currently working on a short script to sort a set of JPEGs by size, but right now I’m just trying to move them from point A to point B (I’m still learning Ruby, so I do this to try…

---

## [Form.select question](https://www.ruby-forum.com/t/form-select-question/118642)

<div class="topic-metadata">

**Author:** [@Dave\_Hackenyos](https://www.ruby-forum.com/u/Dave_Hackenyos)\
**Replies:** 1\
**Last updated:** [October 29, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/form-select-question/118642 "2007-10-29T19:43:18Z")

</div>

Hello, I am researching Ruby and Rails and am having a little trouble. I have a form that look like this: \<% form\_for :book, :url =\> { :action =\> :sort } do |form| %\> \<%= form.select :sort\_type, Book::SORT\_TYPES, …

---

## [Does a required\_by method exist?](https://www.ruby-forum.com/t/does-a-required-by-method-exist/118646)

<div class="topic-metadata">

**Author:** [@jack](https://www.ruby-forum.com/u/jack)\
**Replies:** 1\
**Last updated:** [October 29, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/does-a-required-by-method-exist/118646 "2007-10-29T19:23:55Z")

</div>

Through some caller() and load path searching, I’ve found you can get the full path to the file requiring the one you’re currently in…Is there a built-in or easier way of doing this though? thanks!

---

## [Is rubyzip threadsafe?](https://www.ruby-forum.com/t/is-rubyzip-threadsafe/118644)

<div class="topic-metadata">

**Author:** [@come](https://www.ruby-forum.com/u/come)\
**Replies:** 0\
**Last updated:** [October 29, 2007, 6:57pm UTC](https://www.ruby-forum.com/t/is-rubyzip-threadsafe/118644 "2007-10-29T18:57:02Z")

</div>

Hi, I wrote a program where many threads access a same uniq zip file. Right now, I’m using the Monitor Mixin to ensure the thread safety : Zip::ZipFile.open(“my\_file.zip”, Zip::ZipFile::CREATE) do |zipfile| zipfile.e…

---

## [Autoload ain't down with the program](https://www.ruby-forum.com/t/autoload-aint-down-with-the-program/118576)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 3\
**Last updated:** [October 29, 2007, 6:40pm UTC](https://www.ruby-forum.com/t/autoload-aint-down-with-the-program/118576 "2007-10-29T18:40:05Z")

</div>

I run into a bit of a snag. I’ve augmented the #require and #load methods and noticed that #autoload doesn’t pick up on it --though the docs say #autoload uses #require. Apparently it uses it’s own internal code thoug…

---

## [RubyJS 0.6 - pre-RubyConf version](https://www.ruby-forum.com/t/rubyjs-0-6-pre-rubyconf-version/118633)

<div class="topic-metadata">

**Author:** [@michaeln](https://www.ruby-forum.com/u/michaeln)\
**Replies:** 1\
**Last updated:** [October 29, 2007, 6:19pm UTC](https://www.ruby-forum.com/t/rubyjs-0-6-pre-rubyconf-version/118633 "2007-10-29T18:19:34Z")

</div>

Hi all, After 9 months, the second incarnation of RubyJS is out (a complete rewrite). RubyJS compiles Ruby to Javascript and tries to be as efficient as possible without sacrifying Ruby’s beauty. This is a pre-rele…

---

## [SWIG / Ruby GC issues](https://www.ruby-forum.com/t/swig-ruby-gc-issues/118528)

<div class="topic-metadata">

**Author:** [@redroofgreentree](https://www.ruby-forum.com/u/redroofgreentree)\
**Replies:** 3\
**Last updated:** [October 29, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/swig-ruby-gc-issues/118528 "2007-10-29T18:13:08Z")

</div>

Hi all, I have this really nasty SWIG/ruby GC issue. (Namely objects are being freed when I don’t want them to be freed). These bugs are hard to track down, here’s what would really help me: Is there some way I can t…

---

## [Racc error recovery](https://www.ruby-forum.com/t/racc-error-recovery/118232)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 4\
**Last updated:** [October 29, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/racc-error-recovery/118232 "2007-10-29T17:42:06Z")

</div>

Hi everyone, I’m writing a racc parser, and I need to recover from parse errors. Basically I’m writing a CSS parser, and I need to handle poorly formatted CSS. Unfortunately I can’t seem to find any good documentatio…

---

## [A screen cast of RubyCocoa](https://www.ruby-forum.com/t/a-screen-cast-of-rubycocoa/118631)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 0\
**Last updated:** [October 29, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/a-screen-cast-of-rubycocoa/118631 "2007-10-29T17:21:00Z")

</div>

There is a screencast of building a RubyCocoa app with Xcode in the new Leopard. It’s in Japanese. http://www.youtube.com/watch?v=7q\_DD-W6-oI

---

## [Uniq on custom objects](https://www.ruby-forum.com/t/uniq-on-custom-objects/118590)

<div class="topic-metadata">

**Author:** [@daniel\_SSSSkerud](https://www.ruby-forum.com/u/daniel_SSSSkerud)\
**Replies:** 3\
**Last updated:** [October 29, 2007, 3:36pm UTC](https://www.ruby-forum.com/t/uniq-on-custom-objects/118590 "2007-10-29T15:36:51Z")

</div>

I cannot get uniq to work with an array of custom class-objects. It seems overriding hash is now enough. This is what I mean: class Obj attr\_reader :name, :number def initialize(name, number) @name = name @number …

---

## [NOT reading an entire file into memory](https://www.ruby-forum.com/t/not-reading-an-entire-file-into-memory/118504)

<div class="topic-metadata">

**Author:** [@Devi\_Web\_D](https://www.ruby-forum.com/u/Devi_Web_D)\
**Replies:** 8\
**Last updated:** [October 29, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/not-reading-an-entire-file-into-memory/118504 "2007-10-29T14:41:15Z")

</div>

I am trying to write a parser for a text-based file format. Files in this format frequently become very large. While the specification specifically allows applications to crash on large files, I know several people wh…

---

## [A memcached-like server in Ruby - feasible?](https://www.ruby-forum.com/t/a-memcached-like-server-in-ruby-feasible/118509)

<div class="topic-metadata">

**Author:** [@Tom\_M.hinski](https://www.ruby-forum.com/u/Tom_M.hinski)\
**Replies:** 27\
**Last updated:** [October 29, 2007, 2:36pm UTC](https://www.ruby-forum.com/t/a-memcached-like-server-in-ruby-feasible/118509 "2007-10-29T14:36:34Z")

</div>

Hi group, I’m running a very high-load website done in Rails. The number and duration of queries per-page is killing us. So we’re thinking of using a caching layer like memcached. Except we’d like something more soph…

---

## [Hiccup with WPF/Button events](https://www.ruby-forum.com/t/hiccup-with-wpf-button-events/118505)

<div class="topic-metadata">

**Author:** [@1100101](https://www.ruby-forum.com/u/1100101)\
**Replies:** 4\
**Last updated:** [October 29, 2007, 2:02pm UTC](https://www.ruby-forum.com/t/hiccup-with-wpf-button-events/118505 "2007-10-29T14:02:54Z")

</div>

Hi there, I finally found the time to play around with IronRuby today, so I compiled the latest build and tried some of the example code out there. When extending some WPF examples though, I ran into a problem with B…

---

## [Tell whether it is mod\_ruby or not](https://www.ruby-forum.com/t/tell-whether-it-is-mod-ruby-or-not/118600)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 1\
**Last updated:** [October 29, 2007, 1:56pm UTC](https://www.ruby-forum.com/t/tell-whether-it-is-mod-ruby-or-not/118600 "2007-10-29T13:56:12Z")

</div>

there usually is mod\_perl or mod\_php installed with the webservers… i wonder if ruby works, is there a way to tell whether it is a newly spawned process every time, or is it built in as mod\_ruby?

---

## [Ruby and irb](https://www.ruby-forum.com/t/ruby-and-irb/118589)

<div class="topic-metadata">

**Author:** [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Replies:** 6\
**Last updated:** [October 29, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/ruby-and-irb/118589 "2007-10-29T12:08:59Z")

</div>

Hello I have a problem with irb console. When i want to write special characters like “@” and “\[” or “\]” i cant. IRB simply dont let me write this characters. It is like if i was not writing on the beyboard. Any hel…

---

## [iTerm and Ruby::OSA](https://www.ruby-forum.com/t/iterm-and-ruby-osa/118551)

<div class="topic-metadata">

**Author:** [@mattmcswain](https://www.ruby-forum.com/u/mattmcswain)\
**Replies:** 3\
**Last updated:** [October 29, 2007, 12:00pm UTC](https://www.ruby-forum.com/t/iterm-and-ruby-osa/118551 "2007-10-29T12:00:54Z")

</div>

Hi. I wonder if anyone has successfully gotten iTerm to open a new session within a terminal window and execute commands using RubyOSA? http://rubyosa.rubyforge.org/ I can do this from the Apple ScriptEditor but not …

---

## [Duplicate elements in array](https://www.ruby-forum.com/t/duplicate-elements-in-array/118543)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 14\
**Last updated:** [October 29, 2007, 11:29am UTC](https://www.ruby-forum.com/t/duplicate-elements-in-array/118543 "2007-10-29T11:29:17Z")

</div>

Hello I am trying to output the duplicate elements in an array. I looked into the api of ruby I found uniq method which outputs the array with no duplication. What i want is to know which elements is duplicated. For …

---

## [Puts gets](https://www.ruby-forum.com/t/puts-gets/118572)

<div class="topic-metadata">

**Author:** [@llinklater](https://www.ruby-forum.com/u/llinklater)\
**Replies:** 2\
**Last updated:** [October 29, 2007, 11:04am UTC](https://www.ruby-forum.com/t/puts-gets/118572 "2007-10-29T11:04:53Z")

</div>

I write this: puts “foo” some\_var = gets I expect the foo to show up before the gets occurs but it does not. Any ideas?

---

## [Mysql-ruby returns wrong record count](https://www.ruby-forum.com/t/mysql-ruby-returns-wrong-record-count/118587)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [October 29, 2007, 9:09am UTC](https://www.ruby-forum.com/t/mysql-ruby-returns-wrong-record-count/118587 "2007-10-29T09:09:20Z")

</div>

Just started using mysql-ruby, and doing a simply query like this: select distinct rcrdNo from someTable I’m getting results back from mysql-ruby that is simply not correct. rcrdNo is a unique random string that’s 20 …

---

## [GeoIP C lib bindings](https://www.ruby-forum.com/t/geoip-c-lib-bindings/118421)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [October 29, 2007, 8:50am UTC](https://www.ruby-forum.com/t/geoip-c-lib-bindings/118421 "2007-10-29T08:50:45Z")

</div>

This is a library which provides a single function. The function takes as input an IP address and it outputs a hash containing best-guess geographical information (like city, country, latitude, and longitude). Actual…

---

## [Kill an IO.popen'ed program?](https://www.ruby-forum.com/t/kill-an-io-popened-program/118582)

<div class="topic-metadata">

**Author:** [@jared](https://www.ruby-forum.com/u/jared)\
**Replies:** 2\
**Last updated:** [October 29, 2007, 8:42am UTC](https://www.ruby-forum.com/t/kill-an-io-popened-program/118582 "2007-10-29T08:42:31Z")

</div>

Hi, I’m looking for a way to forcibly terminate a process started with a pipe. That is, when I run: file = IO.popen(“sleep 300”, “r+”) file.close The file.close command just hangs and waits for the sleep command to …

---

## [Beginner needs help w/ tk in Mac OSX](https://www.ruby-forum.com/t/beginner-needs-help-w-tk-in-mac-osx/70117)

<div class="topic-metadata">

**Author:** [@damoncali](https://www.ruby-forum.com/u/damoncali)\
**Replies:** 2\
**Last updated:** [October 29, 2007, 7:52am UTC](https://www.ruby-forum.com/t/beginner-needs-help-w-tk-in-mac-osx/70117 "2007-10-29T07:52:14Z")

</div>

Hi All, I’m just starting to learn Ruby and have run into a problem getting tk to work. I’m runnig Mac OS 10.4.7 and Ruby 1.8.2. When I try to include ‘tk’ I get the following error: dyld: NSLinkModule() error dyld:…

---

## [Detecting Mono path](https://www.ruby-forum.com/t/detecting-mono-path/118574)

<div class="topic-metadata">

**Author:** [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Replies:** 0\
**Last updated:** [October 29, 2007, 3:44am UTC](https://www.ruby-forum.com/t/detecting-mono-path/118574 "2007-10-29T03:44:38Z")

</div>

The official way to detect path to Mono runtime is to run pkg-config. The following patch should resolve TODO. Index: Rakefile — Rakefile (revision 53) +++ Rakefile (working copy) @@ -32,7 +32,8 @@ if ENV\[‘mo…

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

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