# Ruby

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

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

---

## [What's the matter with my programm:Web Analysis](https://www.ruby-forum.com/t/whats-the-matter-with-my-programm-web-analysis/185587)

<div class="topic-metadata">

**Author:** [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Replies:** 9\
**Last updated:** [March 24, 2010, 4:08am UTC](https://www.ruby-forum.com/t/whats-the-matter-with-my-programm-web-analysis/185587 "2010-03-24T04:08:49Z")

</div>

HTMLRegexp =/(\<!–.?–\\s\>)| (\<(?:\[^"’\>\]|"\[^"\]"|’\[^’\]’)+\>)| (\[^\<\])/xm data =DATA.read data.scan(HTMLRegexp){|match| comment,tag,tdata=match\[0…2\] if comment p \[“Comment”,comment\] elseif tag p \[“Tag”,tag\] elseif tda…

---

## [Code Review: Tokens2](https://www.ruby-forum.com/t/code-review-tokens2/185652)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [March 24, 2010, 4:02am UTC](https://www.ruby-forum.com/t/code-review-tokens2/185652 "2010-03-24T04:02:23Z")

</div>

tfpt review “/shelveset:Tokens2;REDMOND\\tomat” Comment : Tokenizer improvements. Tomas

---

## [Problems with sqllite with fresh Rails 3 install](https://www.ruby-forum.com/t/problems-with-sqllite-with-fresh-rails-3-install/185646)

<div class="topic-metadata">

**Author:** [@azraelnewtype](https://www.ruby-forum.com/u/azraelnewtype)\
**Replies:** 0\
**Last updated:** [March 24, 2010, 2:36am UTC](https://www.ruby-forum.com/t/problems-with-sqllite-with-fresh-rails-3-install/185646 "2010-03-24T02:36:19Z")

</div>

I’m working through the basic tutorial for Rails 3.0 beta, using the Edge guide ( rails.info). I used Nick’s tips mentioned here (http://blog.nicksieger.com/articles/2010/02/24/jruby-and-rails-3-sitting-in-a-tree). …

---

## [PluginFactory 1.0.6](https://www.ruby-forum.com/t/pluginfactory-1-0-6/185637)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 0\
**Last updated:** [March 23, 2010, 10:06pm UTC](https://www.ruby-forum.com/t/pluginfactory-1-0-6/185637 "2010-03-23T22:06:31Z")

</div>

Version 1.0.6 of pluginfactory has been released. PluginFactory is a mixin for adding plugin classes to your application. It adds a ‘create’ method to your base plugin class that can be used to search for/and load the…

---

## [Logging, rolling file, permission denied](https://www.ruby-forum.com/t/logging-rolling-file-permission-denied/180623)

<div class="topic-metadata">

**Author:** [@niber](https://www.ruby-forum.com/u/niber)\
**Replies:** 5\
**Last updated:** [March 23, 2010, 6:49pm UTC](https://www.ruby-forum.com/t/logging-rolling-file-permission-denied/180623 "2010-03-23T18:49:50Z")

</div>

Hi, I’m trying out the excellent logging 1.3.0 gem inside my rails application. It works nicely with stdout and file appenders but I’m unable to using the rolling file appender config. After running some debug sessio…

---

## [Converting file from utf-16 to utf-8](https://www.ruby-forum.com/t/converting-file-from-utf-16-to-utf-8/185613)

<div class="topic-metadata">

**Author:** [@noxx000](https://www.ruby-forum.com/u/noxx000)\
**Replies:** 3\
**Last updated:** [March 23, 2010, 4:13pm UTC](https://www.ruby-forum.com/t/converting-file-from-utf-16-to-utf-8/185613 "2010-03-23T16:13:32Z")

</div>

Hi, I’m currently rewriting an old php-script in ruby. One thing this script is for is to open a file which is in utf-16, read it as utf-8, work a little bit with the data and save it into a database. However I trie…

---

## [Help installing rubysdl gem](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454)

<div class="topic-metadata">

**Author:** [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Replies:** 5\
**Last updated:** [March 23, 2010, 10:35am UTC](https://www.ruby-forum.com/t/help-installing-rubysdl-gem/185454 "2010-03-23T10:35:12Z")

</div>

Hi I am trying to install rubysdl gem on 1.9.1p243. I have tried to install using gem install and by compiling the source code. But the source code doesn’t compile. It throws the following error. I see the same outpu…

---

## [Callbacks when deleting self-referenced has\_many?](https://www.ruby-forum.com/t/callbacks-when-deleting-self-referenced-has-many/185569)

<div class="topic-metadata">

**Author:** [@enduro](https://www.ruby-forum.com/u/enduro)\
**Replies:** 1\
**Last updated:** [March 23, 2010, 10:29am UTC](https://www.ruby-forum.com/t/callbacks-when-deleting-self-referenced-has-many/185569 "2010-03-23T10:29:53Z")

</div>

Hi I’ve come across a behavior which doesn’t seem to be consistent. Let’s assume the following models: class Client \<\< ActiveRecord::Base has\_many :resale\_clients, :foreign\_key =\> ‘reseller\_id’ end class ResaleClie…

---

## [Raw data in xml](https://www.ruby-forum.com/t/raw-data-in-xml/185598)

<div class="topic-metadata">

**Author:** [@Don\_F](https://www.ruby-forum.com/u/Don_F)\
**Replies:** 0\
**Last updated:** [March 23, 2010, 8:41am UTC](https://www.ruby-forum.com/t/raw-data-in-xml/185598 "2010-03-23T08:41:38Z")

</div>

I have a array of lines that are actually a final document that I need to put into one XML file/buffer as one element including all newlines and formfeed characters. Actually all control characters. The snippet of Xml…

---

## [\[ANN\] Rumai 3.2.1 (2010-03-22)](https://www.ruby-forum.com/t/ann-rumai-3-2-1-2010-03-22/185593)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [March 23, 2010, 6:29am UTC](https://www.ruby-forum.com/t/ann-rumai-3-2-1-2010-03-22/185593 "2010-03-23T06:29:03Z")

</div>

Rumai 3.2.1 (2010-03-22) Ruby interface to the wmii window manager http://snk.tuxfamily.org/lib/rumai/ Rumai is a \[1\]Ruby interface to the \[2\]wmii window manager. \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_…

---

## [Persistent Instance Vars on Soap Server](https://www.ruby-forum.com/t/persistent-instance-vars-on-soap-server/185585)

<div class="topic-metadata">

**Author:** [@Jaime\_Fournier](https://www.ruby-forum.com/u/Jaime_Fournier)\
**Replies:** 0\
**Last updated:** [March 23, 2010, 4:50am UTC](https://www.ruby-forum.com/t/persistent-instance-vars-on-soap-server/185585 "2010-03-23T04:50:28Z")

</div>

Hello, I have code at http://mauthesis.com/test.rb I was under the assumption that each connection to this soap server would spawn a new instance of the main class and thus never have error on line 8 trigger. What …

---

## [Re: Help me plan my Ruby app :)](https://www.ruby-forum.com/t/re-help-me-plan-my-ruby-app/185577)

<div class="topic-metadata">

**Author:** [@christoph\_j](https://www.ruby-forum.com/u/christoph_j)\
**Replies:** 1\
**Last updated:** [March 23, 2010, 3:08am UTC](https://www.ruby-forum.com/t/re-help-me-plan-my-ruby-app/185577 "2010-03-23T03:08:24Z")

</div>

Hi, consider using sinatra / padrino which are tiny ruby web frameworks. Your app sounds a little like http://www.memorari.us/ (know the guy who built that one). Pieces that came in my mind: file uploads (your fil…

---

## [Read CSV file using csv library](https://www.ruby-forum.com/t/read-csv-file-using-csv-library/143691)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 18\
**Last updated:** [March 23, 2010, 1:44am UTC](https://www.ruby-forum.com/t/read-csv-file-using-csv-library/143691 "2010-03-23T01:44:51Z")

</div>

Hi all, I need to read a CSV file with csv library. And I tried the example from the library. require ‘csv’ CSV::Reader.parse(File.open(‘test.csv’)) do |row| puts row break if !row\[0\].is\_null && row\[0\].data == ‘sto…

---

## [ETIMEDOUT error code](https://www.ruby-forum.com/t/etimedout-error-code/185472)

<div class="topic-metadata">

**Author:** [@Jason\_Diller](https://www.ruby-forum.com/u/Jason_Diller)\
**Replies:** 3\
**Last updated:** [March 23, 2010, 1:15am UTC](https://www.ruby-forum.com/t/etimedout-error-code/185472 "2010-03-23T01:15:02Z")

</div>

I have been attempting to get an existing Ruby lib running under IronRuby. The first problem I hit was that there was no definition for the ETIMEDOUT error code in IR, so I added it and humbly submit my changes as a …

---

## [Ruby/Tk: How to colorize a Treeview?](https://www.ruby-forum.com/t/ruby-tk-how-to-colorize-a-treeview/185484)

<div class="topic-metadata">

**Author:** [@alby](https://www.ruby-forum.com/u/alby)\
**Replies:** 2\
**Last updated:** [March 22, 2010, 11:57pm UTC](https://www.ruby-forum.com/t/ruby-tk-how-to-colorize-a-treeview/185484 "2010-03-22T23:57:43Z")

</div>

I have an item in my Treeview that I want to highlight. I have this code: require ‘tk’ tree = Tk::Tile::Treeview.new.pack tree.insert(‘’, ‘end’, :text =\> ‘blah blah’, :tags =\> \[‘important’\]) tree.tag\_configure(‘conf…

---

## [Singleton methods without the singleton class](https://www.ruby-forum.com/t/singleton-methods-without-the-singleton-class/185189)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 4\
**Last updated:** [March 22, 2010, 11:46pm UTC](https://www.ruby-forum.com/t/singleton-methods-without-the-singleton-class/185189 "2010-03-22T23:46:39Z")

</div>

Hi all! JRuby currently allows you to add singleton methods to normal Java objects like this: foo = java.lang.String.new(‘blah’) def foo.bar do something end Unfortunately, this feature requires us to keep a weak …

---

## [Ironruby installation](https://www.ruby-forum.com/t/ironruby-installation/185571)

<div class="topic-metadata">

**Author:** [@zvilius](https://www.ruby-forum.com/u/zvilius)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 11:02pm UTC](https://www.ruby-forum.com/t/ironruby-installation/185571 "2010-03-22T23:02:45Z")

</div>

A co-worker in Germany is trying to install IronRuby on Windows XP SP3. The installer fails with: “Dieses Installationspaket kann vom Windows Installer-Dienst nicht installiert werden. Sie mussen ein Service Pack fur …

---

## [Splitting text string](https://www.ruby-forum.com/t/splitting-text-string/185563)

<div class="topic-metadata">

**Author:** [@xman2000](https://www.ruby-forum.com/u/xman2000)\
**Replies:** 4\
**Last updated:** [March 22, 2010, 10:07pm UTC](https://www.ruby-forum.com/t/splitting-text-string/185563 "2010-03-22T22:07:05Z")

</div>

I am working on a way to process the status of products and I want to use a bar code reader to make things easier. I already have the scanner which simply reads the bar code into the keyboard port and appends a carri…

---

## [Google Summer of Code](https://www.ruby-forum.com/t/google-summer-of-code/185568)

<div class="topic-metadata">

**Author:** [@3nd3r](https://www.ruby-forum.com/u/3nd3r)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 9:34pm UTC](https://www.ruby-forum.com/t/google-summer-of-code/185568 "2010-03-22T21:34:57Z")

</div>

I didn’t see very many ruby \* mentor organizations \*for the Google Summer of Code Project. Are the following the only organizations with links to ruby or are there others. puppet opennebula Codehaus What happene…

---

## [Sorting keys of hash based on value](https://www.ruby-forum.com/t/sorting-keys-of-hash-based-on-value/185562)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 4\
**Last updated:** [March 22, 2010, 8:50pm UTC](https://www.ruby-forum.com/t/sorting-keys-of-hash-based-on-value/185562 "2010-03-22T20:50:27Z")

</div>

Let’s say we have this contrived example: hash = {:a =\> {:happy =\> 5}, :b =\> {:happy =\> 4}, :c =\> {:happy =\> 7} } I would like to get the keys sorted by descending :happy value, like so: \[:c, :a, :b\] How would I d…

---

## [Reverting date from Time.to\_s](https://www.ruby-forum.com/t/reverting-date-from-time-to-s/185560)

<div class="topic-metadata">

**Author:** [@utsavgupta](https://www.ruby-forum.com/u/utsavgupta)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 7:20pm UTC](https://www.ruby-forum.com/t/reverting-date-from-time-to-s/185560 "2010-03-22T19:20:14Z")

</div>

I receive the dates from Twitter in the following format “Mon Mar 22 04:42:17 +0000 2010” Now how can I create a time object from this string… ie Obj.year=2010, Obj.month=3… etc etc Regards Utsav Gupta

---

## [Grouping elements of an array](https://www.ruby-forum.com/t/grouping-elements-of-an-array/185375)

<div class="topic-metadata">

**Author:** [@interactivenyc](https://www.ruby-forum.com/u/interactivenyc)\
**Replies:** 23\
**Last updated:** [March 22, 2010, 5:45pm UTC](https://www.ruby-forum.com/t/grouping-elements-of-an-array/185375 "2010-03-22T17:45:58Z")

</div>

I have an array of records that contain timestamps at random intervals. The records are ordered by timestamp. I would like to convert the array into an array of arrays; each subarray would contain “grouped records.” G…

---

## [Mountain West Ruby Conf : Videos](https://www.ruby-forum.com/t/mountain-west-ruby-conf-videos/185174)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 4:16pm UTC](https://www.ruby-forum.com/t/mountain-west-ruby-conf-videos/185174 "2010-03-22T16:16:24Z")

</div>

Hi all, Do you have an estimate as to when the presentations from MWRC will be available online? The website still tells us we can register… :slight\_smile:

---

## [Ruby 'C' Extensions and Unicode](https://www.ruby-forum.com/t/ruby-c-extensions-and-unicode/183169)

<div class="topic-metadata">

**Author:** [@praveen](https://www.ruby-forum.com/u/praveen)\
**Replies:** 10\
**Last updated:** [March 22, 2010, 2:41pm UTC](https://www.ruby-forum.com/t/ruby-c-extensions-and-unicode/183169 "2010-03-22T14:41:07Z")

</div>

Hi, I am working on enhancing the IBM\_DB Ruby driver (database driver for DB2 and Informix) by providing unicode support. I tried googling with no luck to find any documents or links which talk about the Ruby C exten…

---

## [Living with a Swarm of Boids - A report from the front](https://www.ruby-forum.com/t/living-with-a-swarm-of-boids-a-report-from-the-front/185462)

<div class="topic-metadata">

**Author:** [@thunk](https://www.ruby-forum.com/u/thunk)\
**Replies:** 14\
**Last updated:** [March 22, 2010, 2:35pm UTC](https://www.ruby-forum.com/t/living-with-a-swarm-of-boids-a-report-from-the-front/185462 "2010-03-22T14:35:13Z")

</div>

Hi, Haven’t checked in for awhile… thanks, guys, for the info from other threads. The “beef” in this post, if there is any, will probably be the “Advantages Seen” below… as the place to start - if you think like …

---

## [Boids, a use case](https://www.ruby-forum.com/t/boids-a-use-case/185537)

<div class="topic-metadata">

**Author:** [@thunk](https://www.ruby-forum.com/u/thunk)\
**Replies:** 6\
**Last updated:** [March 22, 2010, 2:27pm UTC](https://www.ruby-forum.com/t/boids-a-use-case/185537 "2010-03-22T14:27:31Z")

</div>

Guys, My graphical ControlPanel is written in Wee for the web and without that there is only a bunch of “boring” text in my current development environment. The output is rather domain dependent because that is what …

---

## [Rdoc hosting?](https://www.ruby-forum.com/t/rdoc-hosting/184324)

<div class="topic-metadata">

**Author:** [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Replies:** 8\
**Last updated:** [March 22, 2010, 11:23am UTC](https://www.ruby-forum.com/t/rdoc-hosting/184324 "2010-03-22T11:23:02Z")

</div>

Hi, I’ve started using GitHub and I really liked the idea of the rdoc.info web-hook (which generated ruby documentation after every commit). The problem is that I thought rdoc.info was actually for RDoc documentation, …

---

## [Ruby Manor: Manor Harder - videos now online](https://www.ruby-forum.com/t/ruby-manor-manor-harder-videos-now-online/185533)

<div class="topic-metadata">

**Author:** [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Replies:** 0\
**Last updated:** [March 22, 2010, 11:01am UTC](https://www.ruby-forum.com/t/ruby-manor-manor-harder-videos-now-online/185533 "2010-03-22T11:01:27Z")

</div>

Thanks to the herculean efforts of Murray and Final Cut Pro, we now have most of the “Ruby Manor: Manor Harder” videos online: http://rubymanor.org/harder/videos Watch them, download them, give them to all your friend…

---

## [Decompressing LZW compression from PDF file](https://www.ruby-forum.com/t/decompressing-lzw-compression-from-pdf-file/185521)

<div class="topic-metadata">

**Author:** [@ahmad](https://www.ruby-forum.com/u/ahmad)\
**Replies:** 2\
**Last updated:** [March 22, 2010, 10:30am UTC](https://www.ruby-forum.com/t/decompressing-lzw-compression-from-pdf-file/185521 "2010-03-22T10:30:59Z")

</div>

Hello, I’m trying to find a ruby module/code that can decompress LZW-compression-scheme from a PDF file. However, there is no such code or module (as far as I’ve known) that exist publicly. PDF usually compress its s…

---

## [Ruby sound library RUDL and ruby 1.9](https://www.ruby-forum.com/t/ruby-sound-library-rudl-and-ruby-1-9/185459)

<div class="topic-metadata">

**Author:** [@G\_Brandon\_H](https://www.ruby-forum.com/u/G_Brandon_H)\
**Replies:** 2\
**Last updated:** [March 22, 2010, 10:00am UTC](https://www.ruby-forum.com/t/ruby-sound-library-rudl-and-ruby-1-9/185459 "2010-03-22T10:00:00Z")

</div>

hello, I am trying to obtain a sound library so I can write morse code practice applications in ruby, I came across RUDL but can’t seem to get it to build on my machine. Here’s the output I get when I build it: http…

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

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