# Ruby

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

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

---

## [Help for code understanding](https://www.ruby-forum.com/t/help-for-code-understanding/171928)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 7\
**Last updated:** [July 11, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/help-for-code-understanding/171928 "2009-07-11T23:49:24Z")

</div>

Hi all, I find a method in a source code as follows: def seq self.class.new(self) end What does the code do, especially for class.new()? Thank you, Li

---

## [Trouble with 'require' and 'include' in daemons](https://www.ruby-forum.com/t/trouble-with-require-and-include-in-daemons/171934)

<div class="topic-metadata">

**Author:** [@explainer](https://www.ruby-forum.com/u/explainer)\
**Replies:** 0\
**Last updated:** [July 11, 2009, 9:26pm UTC](https://www.ruby-forum.com/t/trouble-with-require-and-include-in-daemons/171934 "2009-07-11T21:26:03Z")

</div>

I am using the deamons gem to implement a set of daemons listening to various things, and am launching the daemons from a Rails app. I am having trouble with getting the require and include operations to work in the …

---

## [Best OS packages for Ruby?](https://www.ruby-forum.com/t/best-os-packages-for-ruby/171254)

<div class="topic-metadata">

**Author:** [@Michael\_JSISJacks](https://www.ruby-forum.com/u/Michael_JSISJacks)\
**Replies:** 22\
**Last updated:** [July 11, 2009, 5:47pm UTC](https://www.ruby-forum.com/t/best-os-packages-for-ruby/171254 "2009-07-11T17:47:29Z")

</div>

Hi all, I know the question in the subject of this thread might seem a bit strange, but I wanted to get the opinion of others regarding the best operating system for Ruby hosting and development. What I’m mainly look…

---

## [How to save a file in gb2312 encoding](https://www.ruby-forum.com/t/how-to-save-a-file-in-gb2312-encoding/171916)

<div class="topic-metadata">

**Author:** [@myvpsoft.com](https://www.ruby-forum.com/u/myvpsoft.com)\
**Replies:** 0\
**Last updated:** [July 11, 2009, 12:35pm UTC](https://www.ruby-forum.com/t/how-to-save-a-file-in-gb2312-encoding/171916 "2009-07-11T12:35:32Z")

</div>

I using Watir to show a webpage’s text, but the out put is like irb\>\> \\242\\204\\346\\265\\213\\351\\243\\216\\ I want output same as the character show in the webpage, how can i do. ( i searched before asking, and using ico…

---

## [Quick question on reading from TCPSockets](https://www.ruby-forum.com/t/quick-question-on-reading-from-tcpsockets/171899)

<div class="topic-metadata">

**Author:** [@snow-templar](https://www.ruby-forum.com/u/snow-templar)\
**Replies:** 2\
**Last updated:** [July 11, 2009, 9:55am UTC](https://www.ruby-forum.com/t/quick-question-on-reading-from-tcpsockets/171899 "2009-07-11T09:55:29Z")

</div>

So in my program, I am reading a series of ASCII strings from the TCPSocket. My code is letting everything through just fine. The problem is in the verification of the data. You see, the point of this protocol I am…

---

## [Sinatra, and web enabling existing .NET codebases](https://www.ruby-forum.com/t/sinatra-and-web-enabling-existing-net-codebases/171907)

<div class="topic-metadata">

**Author:** [@dotty](https://www.ruby-forum.com/u/dotty)\
**Replies:** 0\
**Last updated:** [July 11, 2009, 8:03am UTC](https://www.ruby-forum.com/t/sinatra-and-web-enabling-existing-net-codebases/171907 "2009-07-11T08:03:29Z")

</div>

Aaron Quint gave a very interesting talk at GoGaRuCo: http://pivotallabs.com/gogaruco/talks/51-sinatra-the-framework-within About using sinatra to quickly and easily REST-enable libraries. I think this might be a very…

---

## [IronRuby "Fusion" (VB6 , VBScript, Javascript)](https://www.ruby-forum.com/t/ironruby-fusion-vb6-vbscript-javascript/171905)

<div class="topic-metadata">

**Author:** [@dotty](https://www.ruby-forum.com/u/dotty)\
**Replies:** 0\
**Last updated:** [July 11, 2009, 7:52am UTC](https://www.ruby-forum.com/t/ironruby-fusion-vb6-vbscript-javascript/171905 "2009-07-11T07:52:07Z")

</div>

In the same vein as VB “Fusion”: I’ve found that creating a COM-callable wrapper that hosts IronRuby is pretty easy to put together. I actually was initially trying to be able to execute IronRuby from VB6 (using vbSc…

---

## [Rc-rest 3.0.0 Released](https://www.ruby-forum.com/t/rc-rest-3-0-0-released/171895)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 1\
**Last updated:** [July 10, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/rc-rest-3-0-0-released/171895 "2009-07-10T23:32:50Z")

</div>

rc-rest version 3.0.0 has been released! http://seattlerb.rubyforge.org/rc-rest http://rubyforge.org/projects/rctools/ Robot Co-op REST web services base class. This library makes it easy to implement REST-like web s…

---

## [Can we develop desktop application](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876)

<div class="topic-metadata">

**Author:** [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Replies:** 5\
**Last updated:** [July 10, 2009, 11:19pm UTC](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876 "2009-07-10T23:19:58Z")

</div>

Is ruby for developing web based applications only or can we develop desktop applications with ruby. If we do how can we do that. Regards, Rajkumar.Surabhi

---

## [OT: Is there an NG for Ruby on Rails?](https://www.ruby-forum.com/t/ot-is-there-an-ng-for-ruby-on-rails/171853)

<div class="topic-metadata">

**Author:** [@ohaya](https://www.ruby-forum.com/u/ohaya)\
**Replies:** 9\
**Last updated:** [July 10, 2009, 9:55pm UTC](https://www.ruby-forum.com/t/ot-is-there-an-ng-for-ruby-on-rails/171853 "2009-07-10T21:55:48Z")

</div>

Hi, I was wondering if there is a separate newsgroup for Ruby on Rails? Or, is it ok to post Ruby on Rails messages here? Thanks, Jim

---

## [Unicorn 0.8.2 and 0.9.1](https://www.ruby-forum.com/t/unicorn-0-8-2-and-0-9-1/171791)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 2\
**Last updated:** [July 10, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/unicorn-0-8-2-and-0-9-1/171791 "2009-07-10T21:53:27Z")

</div>

Unicorn is a Rack HTTP server for Unix, fast clients and nothing else Socket handling bugfixes and socket-related usability and performance tweaks. We no longer trust FD\_CLOEXEC to be inherited across accept(); thank…

---

## [To\_yaml\_style](https://www.ruby-forum.com/t/to-yaml-style/171887)

<div class="topic-metadata">

**Author:** [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Replies:** 0\
**Last updated:** [July 10, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/to-yaml-style/171887 "2009-07-10T21:30:58Z")

</div>

I wanted an array: big\_array = \[\[1,2\], \[1,2\], \[1,2\], \[1,2\]\] To convert into more readable yaml. (Yeah I know, YAML is for computers to read and write but sometimes I want to eyeball it) The default yaml I get is: …

---

## [Include? won't find match even though it's in String](https://www.ruby-forum.com/t/include-wont-find-match-even-though-its-in-string/171880)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 3\
**Last updated:** [July 10, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/include-wont-find-match-even-though-its-in-string/171880 "2009-07-10T19:30:08Z")

</div>

\#removed\_email\_address@domain.invalid is in the string test12 which is a string of email addresses #separated by newline characters #puts test12 prints out very nice listing of all email addresses on a separate #line …

---

## [Own method has\_key for class Hash. -howto](https://www.ruby-forum.com/t/own-method-has-key-for-class-hash-howto/171760)

<div class="topic-metadata">

**Author:** [@koko](https://www.ruby-forum.com/u/koko)\
**Replies:** 3\
**Last updated:** [July 10, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/own-method-has-key-for-class-hash-howto/171760 "2009-07-10T18:12:35Z")

</div>

Dear all, Can you help me how can I implement my own “has\_key” method for “hash class.” class Hash def my\_each\_key(&block) self.each { |key| yield(key\[0\]) } end def my\_each\_value(&block) self.each { |value| yi…

---

## [Why is my server shutting down?](https://www.ruby-forum.com/t/why-is-my-server-shutting-down/171803)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 7\
**Last updated:** [July 10, 2009, 5:02pm UTC](https://www.ruby-forum.com/t/why-is-my-server-shutting-down/171803 "2009-07-10T17:02:48Z")

</div>

I start the MySQL server with the “ruby script/server” command. It loads fine. When I go to localhost:3000, the server immediately shuts down and throws out an error. It says: C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\activerec…

---

## [Installing JRuby on Windows Question Set](https://www.ruby-forum.com/t/installing-jruby-on-windows-question-set/125650)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 9\
**Last updated:** [July 10, 2009, 3:50pm UTC](https://www.ruby-forum.com/t/installing-jruby-on-windows-question-set/125650 "2009-07-10T15:50:34Z")

</div>

Greetings All, I have concluded that I ought to try out JRuby. Running on windows I get the short end of the stick when it comes to non-ruby-native functionality, and there is an AI package in Java that I want to pla…

---

## [Ruby on Rails - navigation tree](https://www.ruby-forum.com/t/ruby-on-rails-navigation-tree/171851)

<div class="topic-metadata">

**Author:** [@Xenia](https://www.ruby-forum.com/u/Xenia)\
**Replies:** 1\
**Last updated:** [July 10, 2009, 3:31pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-navigation-tree/171851 "2009-07-10T15:31:34Z")

</div>

Hi, folks, I am trying to build a beautiful navigation tree, to help users browse through an inherently hierarchical website. Looking for the appropriate control, I chose the yui treeview (javascript). There is a si…

---

## [Tcp server with multithreading](https://www.ruby-forum.com/t/tcp-server-with-multithreading/171847)

<div class="topic-metadata">

**Author:** [@arachnd](https://www.ruby-forum.com/u/arachnd)\
**Replies:** 7\
**Last updated:** [July 10, 2009, 3:19pm UTC](https://www.ruby-forum.com/t/tcp-server-with-multithreading/171847 "2009-07-10T15:19:31Z")

</div>

hi. I’m writing tcp server and I want to know: how can I block thread until some event will occur w/o overhead? (i.e. not timer, but something like semaphore); how can I interrupt IO::select() call from main thre…

---

## [IOError in Displaying page](https://www.ruby-forum.com/t/ioerror-in-displaying-page/171877)

<div class="topic-metadata">

**Author:** [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Replies:** 1\
**Last updated:** [July 10, 2009, 3:02pm UTC](https://www.ruby-forum.com/t/ioerror-in-displaying-page/171877 "2009-07-10T15:02:55Z")

</div>

Hi all, While i am rendering or displaying page after processing request iam getting an error page saying IOError If i refresh the page iam getting the original page which i wanted. what is the problem and how to sol…

---

## [A inherent class, how to write?](https://www.ruby-forum.com/t/a-inherent-class-how-to-write/171846)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 3\
**Last updated:** [July 10, 2009, 2:25pm UTC](https://www.ruby-forum.com/t/a-inherent-class-how-to-write/171846 "2009-07-10T14:25:47Z")

</div>

I have a file like this; class File class \<\< self def diff #some stuff-------------- end end end def method\_1 #----------- end def method\_2 #------------ end method\_1 method\_2 now ,I need to rewrite this f…

---

## [unpack("N\*")](https://www.ruby-forum.com/t/unpack-n/171834)

<div class="topic-metadata">

**Author:** [@z4n9ief](https://www.ruby-forum.com/u/z4n9ief)\
**Replies:** 2\
**Last updated:** [July 10, 2009, 1:05pm UTC](https://www.ruby-forum.com/t/unpack-n/171834 "2009-07-10T13:05:44Z")

</div>

Hi, I’m trying to unpack a string into network byte order (big-endian), such as the following method: Convert an 8-bit or 16-bit string to an array of big-endian words In 8-bit function, characters \>255 have their h…

---

## [Question about ruby syntax](https://www.ruby-forum.com/t/question-about-ruby-syntax/171856)

<div class="topic-metadata">

**Author:** [@richardchaven](https://www.ruby-forum.com/u/richardchaven)\
**Replies:** 1\
**Last updated:** [July 10, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/question-about-ruby-syntax/171856 "2009-07-10T12:57:32Z")

</div>

Hi I’ve been reading about ruby and started to learn it to replace the work I was doing with perl. I have a question about the code from this link. http://www.adaruby.com/2008/01/11/scraping-gmail-with-mechanize-and-h…

---

## [Use xsd file with rexml](https://www.ruby-forum.com/t/use-xsd-file-with-rexml/171861)

<div class="topic-metadata">

**Author:** [@babiben](https://www.ruby-forum.com/u/babiben)\
**Replies:** 0\
**Last updated:** [July 10, 2009, 11:07am UTC](https://www.ruby-forum.com/t/use-xsd-file-with-rexml/171861 "2009-07-10T11:07:04Z")

</div>

hello, Is it possible to use a xsd file with rexml ? When i try to display an element, i obtain an error message. If i try the same operation with xml file, all is rigth and i am very happy :slight\_smile: thanks

---

## [Rubyscript2exe](https://www.ruby-forum.com/t/rubyscript2exe/171852)

<div class="topic-metadata">

**Author:** [@nonybd](https://www.ruby-forum.com/u/nonybd)\
**Replies:** 1\
**Last updated:** [July 10, 2009, 10:20am UTC](https://www.ruby-forum.com/t/rubyscript2exe/171852 "2009-07-10T10:20:54Z")

</div>

Hello, world! I hate to just give another problem, but not enough to not to. Rubyscript2exe worked fine to assemble a program I wrote, but when I try to run it, it produces an error saying that it can’t find a Gem I …

---

## [How to invoke RubyParser on a class?](https://www.ruby-forum.com/t/how-to-invoke-rubyparser-on-a-class/171830)

<div class="topic-metadata">

**Author:** [@Juston\_Davies](https://www.ruby-forum.com/u/Juston_Davies)\
**Replies:** 2\
**Last updated:** [July 10, 2009, 9:35am UTC](https://www.ruby-forum.com/t/how-to-invoke-rubyparser-on-a-class/171830 "2009-07-10T09:35:56Z")

</div>

I think I’ve got the basic concept and I got the test case to work where you can parse “1+1” and then use Ruby2Ruby to get it back to “1+1.” But how do I get RubyParser to parse a class. I tried handing it method, pro…

---

## [RubyWorld Conference](https://www.ruby-forum.com/t/rubyworld-conference/171855)

<div class="topic-metadata">

**Author:** [@Shugo\_M](https://www.ruby-forum.com/u/Shugo_M)\
**Replies:** 0\
**Last updated:** [July 10, 2009, 6:27am UTC](https://www.ruby-forum.com/t/rubyworld-conference/171855 "2009-07-10T06:27:15Z")

</div>

Hello, We will hold the RubyWorld Conference 2009 in Matsue, Shimane, Japan from Sep 7th to Sep 8th. RubyWorld Conference The aim of the conference is to promote the use of Ruby in wider areas through various talks. …

---

## [How can I start a shell process and return immediately?](https://www.ruby-forum.com/t/how-can-i-start-a-shell-process-and-return-immediately/115853)

<div class="topic-metadata">

**Author:** [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Replies:** 18\
**Last updated:** [July 10, 2009, 5:35am UTC](https://www.ruby-forum.com/t/how-can-i-start-a-shell-process-and-return-immediately/115853 "2009-07-10T05:35:54Z")

</div>

I want to start a Java program from a Ruby program and have the Java program run in another process and have control returned to my Ruby program as soon as the Java process starts up successfully. I can do this from a…

---

## [Help with while commands](https://www.ruby-forum.com/t/help-with-while-commands/171849)

<div class="topic-metadata">

**Author:** [@jord1000](https://www.ruby-forum.com/u/jord1000)\
**Replies:** 1\
**Last updated:** [July 10, 2009, 5:28am UTC](https://www.ruby-forum.com/t/help-with-while-commands/171849 "2009-07-10T05:28:49Z")

</div>

hello, I am very new to the ruby world and just to get some practice I began writing a little program that allows you to interact (this all through text mind you) with a baby dragon. Anyway, after i use gets for “get…

---

## [How do you not include the trackback URL when using RSS/Maker?](https://www.ruby-forum.com/t/how-do-you-not-include-the-trackback-url-when-using-rss-maker/171844)

<div class="topic-metadata">

**Author:** [@Patrick\_Lajeunesse](https://www.ruby-forum.com/u/Patrick_Lajeunesse)\
**Replies:** 0\
**Last updated:** [July 10, 2009, 4:18am UTC](https://www.ruby-forum.com/t/how-do-you-not-include-the-trackback-url-when-using-rss-maker/171844 "2009-07-10T04:18:44Z")

</div>

I want to make feeds using RSS/Maker, but I don’t want the trackback to madskills.com. I can’t figure out a parameter to turn it off. Sample code: require ‘rss/maker’ rss\_content = RSS::Maker.make(“2.0”) do |m| m.ch…

---

## [Interrupt Execution](https://www.ruby-forum.com/t/interrupt-execution/171783)

<div class="topic-metadata">

**Author:** [@acampos](https://www.ruby-forum.com/u/acampos)\
**Replies:** 1\
**Last updated:** [July 10, 2009, 1:44am UTC](https://www.ruby-forum.com/t/interrupt-execution/171783 "2009-07-10T01:44:26Z")

</div>

Hi, I’m still searching for a way to halt or interrupt the execution of an IronRuby script. At the moment I do it by executing each script on a separate thread and call Thread.Abort but that is resulting in a memory …

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

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