# Ruby

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

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

---

## [Asynchronous network access with Rack?](https://www.ruby-forum.com/t/asynchronous-network-access-with-rack/184809)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 5\
**Last updated:** [March 9, 2010, 10:46am UTC](https://www.ruby-forum.com/t/asynchronous-network-access-with-rack/184809 "2010-03-09T10:46:24Z")

</div>

I’ve read that “threading is considered harmful” for Ruby web apps. Well, I’m writing a Sinatra app which will build a page based on the responses of several servers (Net::HTTP.get). I want to do these .gets in parall…

---

## [Do I need to install ruby & gems on production server?](https://www.ruby-forum.com/t/do-i-need-to-install-ruby-gems-on-production-server/184794)

<div class="topic-metadata">

**Author:** [@cyberjom](https://www.ruby-forum.com/u/cyberjom)\
**Replies:** 5\
**Last updated:** [March 9, 2010, 10:21am UTC](https://www.ruby-forum.com/t/do-i-need-to-install-ruby-gems-on-production-server/184794 "2010-03-09T10:21:29Z")

</div>

Sorry for basic question but I can’t find clear answer ? I’m currently develop app on rails. But I have a case to deploy this app on Java machine running JBoss. The machine has no ruby. If I use JRuby , Can I deploy J…

---

## [Canâ€™t get pingfm class work](https://www.ruby-forum.com/t/cana-t-get-pingfm-class-work/184830)

<div class="topic-metadata">

**Author:** [@rskokan](https://www.ruby-forum.com/u/rskokan)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 9:56am UTC](https://www.ruby-forum.com/t/cana-t-get-pingfm-class-work/184830 "2010-03-09T09:56:03Z")

</div>

Hi all, I have simple code from Ping.fm Ruby Client/Library (GitHub - Oshuma/pingfm: Ping.fm Ruby Library) require 'pingfm' pingfm = Pingfm::Client.new('api\_key', 'user\_app\_key') but it gives me uninitialized constan…

---

## [Classpath Ignored in Command Line](https://www.ruby-forum.com/t/classpath-ignored-in-command-line/184818)

<div class="topic-metadata">

**Author:** [@Paul\_F\_Fraser](https://www.ruby-forum.com/u/Paul_F_Fraser)\
**Replies:** 3\
**Last updated:** [March 9, 2010, 8:40am UTC](https://www.ruby-forum.com/t/classpath-ignored-in-command-line/184818 "2010-03-09T08:40:58Z")

</div>

java -jar jruby-complete-1.5.0.dev.jar -J-cp h2-latest.jar main.rb fails with jruby: unknown option -J-cp also java -cp h2-latest.jar -jar jruby-complete-1.5.0.dev.jar main.rb ignores the classpath How best to get …

---

## [Machinist with Plain Old Ruby Objects](https://www.ruby-forum.com/t/machinist-with-plain-old-ruby-objects/184746)

<div class="topic-metadata">

**Author:** [@Sean\_DeNigris](https://www.ruby-forum.com/u/Sean_DeNigris)\
**Replies:** 2\
**Last updated:** [March 9, 2010, 5:00am UTC](https://www.ruby-forum.com/t/machinist-with-plain-old-ruby-objects/184746 "2010-03-09T05:00:56Z")

</div>

Does anyone have experience with this? Specifically, I want to use a blueprint for a class that takes an argument to new, but calling make (even with an argument) causes an error. Example: class MyClass def initial…

---

## [Ruby 1.9.1 built-in JSON troubles](https://www.ruby-forum.com/t/ruby-1-9-1-built-in-json-troubles/184693)

<div class="topic-metadata">

**Author:** [@Aaron\_DSGifford](https://www.ruby-forum.com/u/Aaron_DSGifford)\
**Replies:** 5\
**Last updated:** [March 9, 2010, 1:41am UTC](https://www.ruby-forum.com/t/ruby-1-9-1-built-in-json-troubles/184693 "2010-03-09T01:41:20Z")

</div>

I’m puzzled. On a box running Ruby 1.9.1 I try this: user@host:/path$ irb irb(main):001:0\> require ‘json’ =\> true irb(main):002:0\> JSON.parse(JSON.generate(’\\’)) JSON::ParserError: 598: unexpected token at ‘"\\"’ f…

---

## [How to export validations in javascript](https://www.ruby-forum.com/t/how-to-export-validations-in-javascript/184785)

<div class="topic-metadata">

**Author:** [@Moises\_S](https://www.ruby-forum.com/u/Moises_S)\
**Replies:** 10\
**Last updated:** [March 9, 2010, 1:16am UTC](https://www.ruby-forum.com/t/how-to-export-validations-in-javascript/184785 "2010-03-09T01:16:43Z")

</div>

Hi all I’m exporting my selenium scripts to jruby, but I have some functions in my user-extensions.js file, here is one of them if (selenium.browserbot.getCurrentWindow().document.getElementById(id).style.displa…

---

## [Code Review: CharEnum3](https://www.ruby-forum.com/t/code-review-charenum3/184810)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 12:23am UTC](https://www.ruby-forum.com/t/code-review-charenum3/184810 "2010-03-09T00:23:27Z")

</div>

tfpt review “/shelveset:CharEnum3;REDMOND\\tomat” Comment : Implements character enumerator. Fixes String#split to handle case of empty separator and KCODE set - it should split the string to characters using the cur…

---

## [Class vs Module in constant lookup](https://www.ruby-forum.com/t/class-vs-module-in-constant-lookup/184521)

<div class="topic-metadata">

**Author:** [@Peter\_McLain](https://www.ruby-forum.com/u/Peter_McLain)\
**Replies:** 9\
**Last updated:** [March 8, 2010, 6:08pm UTC](https://www.ruby-forum.com/t/class-vs-module-in-constant-lookup/184521 "2010-03-08T18:08:48Z")

</div>

Constant lookup behaves differently if there is a class versus a module in the name: XYZ = 10 module M end class C end p defined? M::XYZ # =\> nil p defined? C::XYZ # =\> "constant" Is this difference intend…

---

## [IronRuby.Ruby.GetExecutionContext removed](https://www.ruby-forum.com/t/ironruby-ruby-getexecutioncontext-removed/184601)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 3\
**Last updated:** [March 8, 2010, 5:55pm UTC](https://www.ruby-forum.com/t/ironruby-ruby-getexecutioncontext-removed/184601 "2010-03-08T17:55:21Z")

</div>

including the mailing list as people might run into this … Tomas, I know you recently removed IronRuby.Ruby.GetExecutionContext; is there any other way to get to the instance of IronRuby.Ruby.RubyContext? I’d presume …

---

## [Login Prompt - how to?](https://www.ruby-forum.com/t/login-prompt-how-to/184782)

<div class="topic-metadata">

**Author:** [@brunik](https://www.ruby-forum.com/u/brunik)\
**Replies:** 1\
**Last updated:** [March 8, 2010, 5:08pm UTC](https://www.ruby-forum.com/t/login-prompt-how-to/184782 "2010-03-08T17:08:30Z")

</div>

Hello everyone, Can anyone tell me how I can login to a web page using a login prompt? http://oit.pdx.edu/files/myfiles1.png or please point me to a gem or what to study in order to be able to do this. I have used W…

---

## [Limit number of concurrent running threads in pool](https://www.ruby-forum.com/t/limit-number-of-concurrent-running-threads-in-pool/184575)

<div class="topic-metadata">

**Author:** [@joemanfoo](https://www.ruby-forum.com/u/joemanfoo)\
**Replies:** 13\
**Last updated:** [March 8, 2010, 4:41pm UTC](https://www.ruby-forum.com/t/limit-number-of-concurrent-running-threads-in-pool/184575 "2010-03-08T16:41:35Z")

</div>

Hi I created a pool of threads (say, 500 threads) to process. However, due to the weight of each thread, I want to limit the number of threads that run concurrently. So how would I go about putting a limit on the nu…

---

## [Rake doesn't recognise that rubyzip gem is installed](https://www.ruby-forum.com/t/rake-doesnt-recognise-that-rubyzip-gem-is-installed/184781)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [March 8, 2010, 4:09pm UTC](https://www.ruby-forum.com/t/rake-doesnt-recognise-that-rubyzip-gem-is-installed/184781 "2010-03-08T16:09:50Z")

</div>

Hi all. First of all apologies for a rails-ish post but i think this is a more general ruby gems problem. I’m trying to freeze the rubyzip gem into an app with rake, and get an error that it isn’t installed. But it …

---

## [\[Bug:trunk\] require\_relative depends on current directory](https://www.ruby-forum.com/t/bug-trunk-require-relative-depends-on-current-directory/181318)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 12\
**Last updated:** [March 8, 2010, 1:51pm UTC](https://www.ruby-forum.com/t/bug-trunk-require-relative-depends-on-current-directory/181318 "2010-03-08T13:51:48Z")

</div>

e$B1sF#$G$9!#e(B e$B%=!\<%9%U%!%$%k$rAjBP%Q%9$G;XDj$7$F5/F0$7$?$H$-!“e(Brequire\_relative e$B$,e(B e$B%+%l%s%H%G%#%l%/%H%j$K0MB8$9$k$h$&$G$9$,!”$3$l$O;EMM$G$7$g$&$+!#e(B $ cat /tmp/t1.rb Dir.chdir(“foo”) require\_rela…

---

## ["Self Organizing Record" Idea](https://www.ruby-forum.com/t/self-organizing-record-idea/184662)

<div class="topic-metadata">

**Author:** [@thunk](https://www.ruby-forum.com/u/thunk)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 1:47pm UTC](https://www.ruby-forum.com/t/self-organizing-record-idea/184662 "2010-03-08T13:47:40Z")

</div>

(and the real question on my mind lately…) I’m using Class instances directly as “records” and intend to use CouchDB (or another “document” base) to pull them up when the system gets larger. Things are working out g…

---

## [Mutex object](https://www.ruby-forum.com/t/mutex-object/184702)

<div class="topic-metadata">

**Author:** [@ash34](https://www.ruby-forum.com/u/ash34)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 12:46pm UTC](https://www.ruby-forum.com/t/mutex-object/184702 "2010-03-08T12:46:15Z")

</div>

Should I create a new Mutex object per thread accessing a shared resource or is it per shared resource being accessed. I understand that I need to create a Mutex object and use the synchronize method to make the assoc…

---

## [Conditional keys in hash - out of the box?](https://www.ruby-forum.com/t/conditional-keys-in-hash-out-of-the-box/184650)

<div class="topic-metadata">

**Author:** [@enduro](https://www.ruby-forum.com/u/enduro)\
**Replies:** 11\
**Last updated:** [March 8, 2010, 11:28am UTC](https://www.ruby-forum.com/t/conditional-keys-in-hash-out-of-the-box/184650 "2010-03-08T11:28:36Z")

</div>

Hi Cumbersome title, here’s what I’d like to do both elegantly and without monkey patching Hash: Say, I need to pass a hash to a method: mymethod :this =\> ‘green’ Now I’d like to include a second hash member only if…

---

## [Ffi-mysql 0.0.2](https://www.ruby-forum.com/t/ffi-mysql-0-0-2/184766)

<div class="topic-metadata">

**Author:** [@lobbr](https://www.ruby-forum.com/u/lobbr)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 10:20am UTC](https://www.ruby-forum.com/t/ffi-mysql-0-0-2/184766 "2010-03-08T10:20:31Z")

</div>

ffi-mysql version 0.0.2 by Frank F. http://bitbucket.org/lyro/ffi-mysql == DESCRIPTION Pure Ruby FFI interface to MySQL. == CHANGES support double and float fields improve performance of fetch\_row

---

## [Code Review: bugfixrc3](https://www.ruby-forum.com/t/code-review-bugfixrc3/184759)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 7:23am UTC](https://www.ruby-forum.com/t/code-review-bugfixrc3/184759 "2010-03-08T07:23:45Z")

</div>

tfpt review “/shelveset:bugfixrc3;REDMOND\\jdeville” Comment : adds clr\_ext library including Array#to\_clr\_array, Kernel#as, and Ivan’s attr\_event to Samples version =\> 0.9.5.0 Closes: CP#1594 CP#3934 CP#3083 CP#184…

---

## [Communicating with running process / acceptance-testing GUI apps](https://www.ruby-forum.com/t/communicating-with-running-process-acceptance-testing-gui-apps/184677)

<div class="topic-metadata">

**Author:** [@Sean\_DeNigris](https://www.ruby-forum.com/u/Sean_DeNigris)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 5:49am UTC](https://www.ruby-forum.com/t/communicating-with-running-process-acceptance-testing-gui-apps/184677 "2010-03-08T05:49:32Z")

</div>

Hi list, Does anyone have a method for interacting with a running Ruby process? Specifically, I want to launch a Ruby app using a wxruby GUI, and then somehow drive it from cucumber. I tried non-Ruby solutions like…

---

## [Tyrantmanager 1.5.0 Released](https://www.ruby-forum.com/t/tyrantmanager-1-5-0-released/184750)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 2:39am UTC](https://www.ruby-forum.com/t/tyrantmanager-1-5-0-released/184750 "2010-03-08T02:39:18Z")

</div>

tyrantmanager version 1.5.0 has been released. {{ Release notes for Version 1.5.0 }} update archive-ulog command with --force option to insert a record and force a replication to take place http://copiousfreetime.r…

---

## [Escaping strings](https://www.ruby-forum.com/t/escaping-strings/184716)

<div class="topic-metadata">

**Author:** [@advenk](https://www.ruby-forum.com/u/advenk)\
**Replies:** 3\
**Last updated:** [March 7, 2010, 11:09pm UTC](https://www.ruby-forum.com/t/escaping-strings/184716 "2010-03-07T23:09:52Z")

</div>

Hi, This seems rather easy, but its got me stuck. i am using ruby DBI to insert records into a mysql database. dbh.do(“INSERT INTO sentences (id,text) VALUES (#{id},#{sentence})”) the sentence is a pretty long and …

---

## [Berkeley DB BDB Install on Windows](https://www.ruby-forum.com/t/berkeley-db-bdb-install-on-windows/178686)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 13\
**Last updated:** [March 7, 2010, 8:15pm UTC](https://www.ruby-forum.com/t/berkeley-db-bdb-install-on-windows/178686 "2010-03-07T20:15:54Z")

</div>

I’ve been scripting in Ruby (and Rails) for about two years now, but have never gotten into the internals of the module/gem side. I’ve created a Ruby script using SQLite3 which works well for small data sets but has a…

---

## [Weakref: can I use it like this?](https://www.ruby-forum.com/t/weakref-can-i-use-it-like-this/184720)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 1\
**Last updated:** [March 7, 2010, 6:20pm UTC](https://www.ruby-forum.com/t/weakref-can-i-use-it-like-this/184720 "2010-03-07T18:20:35Z")

</div>

I want to do some extended processing on an object referred to by a weakref. This might generate lots of garbage so I don’t want to turn off garbage collection while I’m doing this. So I’d really like to get …

---

## [Testing a class method that also is called in initialize](https://www.ruby-forum.com/t/testing-a-class-method-that-also-is-called-in-initialize/184703)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 2\
**Last updated:** [March 7, 2010, 6:00pm UTC](https://www.ruby-forum.com/t/testing-a-class-method-that-also-is-called-in-initialize/184703 "2010-03-07T18:00:05Z")

</div>

Hi im still learning testing and bit confused about testing the parse\_file method below class Data def initialize a\_file @records = parse\_file(a\_file) end def parse\_file(a\_file) … end end To test parse\_file i m…

---

## [Base-64 encoding--Just for the fun of it!](https://www.ruby-forum.com/t/base-64-encoding-just-for-the-fun-of-it/184615)

<div class="topic-metadata">

**Author:** [@Aaron\_DSGifford](https://www.ruby-forum.com/u/Aaron_DSGifford)\
**Replies:** 9\
**Last updated:** [March 7, 2010, 4:30pm UTC](https://www.ruby-forum.com/t/base-64-encoding-just-for-the-fun-of-it/184615 "2010-03-07T16:30:32Z")

</div>

Yes, there’s always: require ‘base64’ Base64::encoe64(data) But now and then it’s fun to write one’s own base64 encoder just for the fun of it. What I want to ask is this: How short can one get a function definiti…

---

## [Daemonizing and launching subprocesses on JRuby with Spoon and posix\_spawn](https://www.ruby-forum.com/t/daemonizing-and-launching-subprocesses-on-jruby-with-spoon-and-posix-spawn/184729)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 0\
**Last updated:** [March 7, 2010, 3:57pm UTC](https://www.ruby-forum.com/t/daemonizing-and-launching-subprocesses-on-jruby-with-spoon-and-posix-spawn/184729 "2010-03-07T15:57:10Z")

</div>

A common question people ask about JRuby is “why doesn’t work on JRuby?” Usually the answer is that we don’t support “fork”. Most of the daemonization libraries for MRI fork the process and then terminate, leaving th…

---

## [Send file over XMPP](https://www.ruby-forum.com/t/send-file-over-xmpp/184728)

<div class="topic-metadata">

**Author:** [@di3go](https://www.ruby-forum.com/u/di3go)\
**Replies:** 0\
**Last updated:** [March 7, 2010, 3:39pm UTC](https://www.ruby-forum.com/t/send-file-over-xmpp/184728 "2010-03-07T15:39:49Z")

</div>

Hi Anyone know how to send files over XMPP? Im creating a software for use inside our company that acts like a DropBox, the part of monitoring the files and send the notifications to the server its done using inotify…

---

## [Mysterious JRuby stack trace](https://www.ruby-forum.com/t/mysterious-jruby-stack-trace/184628)

<div class="topic-metadata">

**Author:** [@cage](https://www.ruby-forum.com/u/cage)\
**Replies:** 3\
**Last updated:** [March 7, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/mysterious-jruby-stack-trace/184628 "2010-03-07T14:49:18Z")

</div>

Hi guys, I’m using JRuby 1.4.0 complete jar in one of my projects. I’m executing it from ant via the exec task: java -jar jruby1.4.0.jar script.rb script\_params The thing is, on some computers I receive this: \[exec\]…

---

## [Mongrel\_service 0.4.beta3 Released](https://www.ruby-forum.com/t/mongrel-service-0-4-beta3-released/184726)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [March 7, 2010, 2:44pm UTC](https://www.ruby-forum.com/t/mongrel-service-0-4-beta3-released/184726 "2010-03-07T14:44:02Z")

</div>

mongrel\_service version 0.4.beta3 has been released! http://github.com/fauna/mongrel\_service This plugin offer native win32 services for rails. This replace mongrel\_rails\_service. Since this is a pre-release gem, yo…

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

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