# Ruby

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

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

---

## [Creating object from hash](https://www.ruby-forum.com/t/creating-object-from-hash/152727)

<div class="topic-metadata">

**Author:** [@dmjb](https://www.ruby-forum.com/u/dmjb)\
**Replies:** 3\
**Last updated:** [November 7, 2008, 12:19am UTC](https://www.ruby-forum.com/t/creating-object-from-hash/152727 "2008-11-07T00:19:15Z")

</div>

I’m creating an object from a hash using this: class Computer def initialize(hash) hash.each do |k,v| instance\_variable\_set("@#{k}", v) ## create and initialize an instance variable for this key/value pair instanc…

---

## [Prawn Hackfest Day 1 of 2 @ RubyConf](https://www.ruby-forum.com/t/prawn-hackfest-day-1-of-2-rubyconf/152737)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [November 6, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/prawn-hackfest-day-1-of-2-rubyconf/152737 "2008-11-06T23:00:07Z")

</div>

Tonight will mark the first of a two night hackfest on Prawn\[0\], the fast, nimble PDF generator for Ruby. == Who should come? Anyone with an interest in Ruby PDF generation, or an interest in helping out with a cool …

---

## [Flay 1.0.0 Released](https://www.ruby-forum.com/t/flay-1-0-0-released/152725)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [November 6, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/flay-1-0-0-released/152725 "2008-11-06T21:42:36Z")

</div>

flay version 1.0.0 has been released! http://ruby.sadi.st/ http://rubyforge.org/projects/seattlerb Flay analyzes ruby code for structural similarities. Differences in literal values, variable, class, method names, wh…

---

## [Tmail + IMAP + Attachments](https://www.ruby-forum.com/t/tmail-imap-attachments/152552)

<div class="topic-metadata">

**Author:** [@mephux](https://www.ruby-forum.com/u/mephux)\
**Replies:** 3\
**Last updated:** [November 6, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/tmail-imap-attachments/152552 "2008-11-06T21:05:22Z")

</div>

I am working on a script to log in to a mail server via IMAP and pull tables of content from certain emails. All the tables are accompanied by graphs which are quite nice. How can I pull these attachments with Tmail, …

---

## [Calculating a curve, making a skeleton, exporting to vector,](https://www.ruby-forum.com/t/calculating-a-curve-making-a-skeleton-exporting-to-vector/152560)

<div class="topic-metadata">

**Author:** [@tladuke](https://www.ruby-forum.com/u/tladuke)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 7:17pm UTC](https://www.ruby-forum.com/t/calculating-a-curve-making-a-skeleton-exporting-to-vector/152560 "2008-11-06T19:17:46Z")

</div>

Can I do this in Ruby? Basically, I want to copy this guy: http://www.youtube.com/watch?v=29\_omkkvxiE I don’t even know what words I’m supposed to describe this.

---

## [Project manager panel in SciTE](https://www.ruby-forum.com/t/project-manager-panel-in-scite/152069)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 13\
**Last updated:** [November 6, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/project-manager-panel-in-scite/152069 "2008-11-06T18:17:11Z")

</div>

Hi all, SciTE is a very good IDE for Ruby. But when it comes to a project or dealing many files, it would be handy if there is a project manager panel availble. I wonder if anyone here knows how to enable this functi…

---

## [Change\_class 1.0.0 Released](https://www.ruby-forum.com/t/change-class-1-0-0-released/152709)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [November 6, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/change-class-1-0-0-released/152709 "2008-11-06T18:00:04Z")

</div>

change\_class version 1.0.0 has been released! http://rubyforge.org/projects/seattlerb Lets you set the class of an object. Use at your own risk. Changes: 1.0.0 / 2008-11-06 1 major enhancement Birthday! http…

---

## [Very basic newb Rake question](https://www.ruby-forum.com/t/very-basic-newb-rake-question/152706)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/very-basic-newb-rake-question/152706 "2008-11-06T17:40:40Z")

</div>

I have a rakefile that was created automatically by NetBeans, and want to run just the rdoc task, which is of the form: Rake::RDocTask do |rdoc| … end However I have no idea what to invoke on the command line to exe…

---

## [Debugger under JRuby 1.1.5 - workaround](https://www.ruby-forum.com/t/debugger-under-jruby-1-1-5-workaround/152701)

<div class="topic-metadata">

**Author:** [@mkrauskopf](https://www.ruby-forum.com/u/mkrauskopf)\
**Replies:** 0\
**Last updated:** [November 6, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/debugger-under-jruby-1-1-5-workaround/152701 "2008-11-06T16:16:01Z")

</div>

There is an issue in debugger which causes failure under JRuby 1.1.5. Those wanting to use it with 1.1.5 just change lines 2 and 3 in $GEM\_REPO/gems/ruby-debug-base-0.10.2-java/lib/ruby-debug-base.rb from: require ‘./…

---

## [Search a word in a string](https://www.ruby-forum.com/t/search-a-word-in-a-string/152568)

<div class="topic-metadata">

**Author:** [@ganeshguna](https://www.ruby-forum.com/u/ganeshguna)\
**Replies:** 3\
**Last updated:** [November 6, 2008, 3:35pm UTC](https://www.ruby-forum.com/t/search-a-word-in-a-string/152568 "2008-11-06T15:35:23Z")

</div>

Is there any ruby supported methods is there for searching a word in a particular string For Example “Hi this is for test” i need to search “Hi”

---

## [Gtk/glade and combobox](https://www.ruby-forum.com/t/gtk-glade-and-combobox/152515)

<div class="topic-metadata">

**Author:** [@joelito](https://www.ruby-forum.com/u/joelito)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 2:12pm UTC](https://www.ruby-forum.com/t/gtk-glade-and-combobox/152515 "2008-11-06T14:12:36Z")

</div>

Hi all! I made a GUI for my ruby gtk2 app and this is the code: #!/usr/bin/ruby require 'libglade2' require 'gtk2' class GladeRuby def button1\_clicked entry1 = @glade.get\_widget('entry1') combo1 = @glade.g…

---

## [New Version of IBM\_DB Rails Adapter/Driver for IBM DataServers now available](https://www.ruby-forum.com/t/new-version-of-ibm-db-rails-adapter-driver-for-ibm-dataservers-now-available/152674)

<div class="topic-metadata">

**Author:** [@praveen](https://www.ruby-forum.com/u/praveen)\
**Replies:** 0\
**Last updated:** [November 6, 2008, 10:25am UTC](https://www.ruby-forum.com/t/new-version-of-ibm-db-rails-adapter-driver-for-ibm-dataservers-now-available/152674 "2008-11-06T10:25:58Z")

</div>

Hi All, New version of IBM\_DB (1.0.0) is now available. Visit the site http://rubyforge.org/projects/rubyibm/ for downloading the new version. This release of ibm\_db provides support for secure connections using SSL …

---

## [Ruby Best Practices (O'Reilly) now a Rough Cut](https://www.ruby-forum.com/t/ruby-best-practices-oreilly-now-a-rough-cut/152661)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [November 6, 2008, 5:17am UTC](https://www.ruby-forum.com/t/ruby-best-practices-oreilly-now-a-rough-cut/152661 "2008-11-06T05:17:54Z")

</div>

Hi folks, Since RubyConf is a great time for announcements, I’ve got one I’d like to share. I’ve been relatively quiet about this, but I’ve been working on a book for O’Reily titled “Ruby Best Practices.” With just …

---

## [Method names-how to indicate get vs set type of method?](https://www.ruby-forum.com/t/method-names-how-to-indicate-get-vs-set-type-of-method/152657)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [November 6, 2008, 4:21am UTC](https://www.ruby-forum.com/t/method-names-how-to-indicate-get-vs-set-type-of-method/152657 "2008-11-06T04:21:49Z")

</div>

hi, What is the naming convention for method names to clarify whether its a get or set type of method? tks

---

## [Stylesheet not honored; directory access thwarted](https://www.ruby-forum.com/t/stylesheet-not-honored-directory-access-thwarted/152637)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 2\
**Last updated:** [November 6, 2008, 1:30am UTC](https://www.ruby-forum.com/t/stylesheet-not-honored-directory-access-thwarted/152637 "2008-11-06T01:30:33Z")

</div>

Hi, I intend to import CVS data from user-selected files a sub-directory withing a Rails app. I wrote a toy app outside the scope of Rails just to test this capability. The toy app is posted at http://www.pastie.or…

---

## [Newbie question: Where to put library .rb files?](https://www.ruby-forum.com/t/newbie-question-where-to-put-library-rb-files/152507)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 3\
**Last updated:** [November 6, 2008, 1:20am UTC](https://www.ruby-forum.com/t/newbie-question-where-to-put-library-rb-files/152507 "2008-11-06T01:20:39Z")

</div>

At our site, newly started using Ruby, we’re now starting to get code we’d like to make generally available via ‘require’. What is the standard location/method for doing this? Can it be done in such a manner that rdoc…

---

## [Convert string array to interger array in in one line](https://www.ruby-forum.com/t/convert-string-array-to-interger-array-in-in-one-line/152600)

<div class="topic-metadata">

**Author:** [@jags](https://www.ruby-forum.com/u/jags)\
**Replies:** 3\
**Last updated:** [November 5, 2008, 11:49pm UTC](https://www.ruby-forum.com/t/convert-string-array-to-interger-array-in-in-one-line/152600 "2008-11-05T23:49:24Z")

</div>

hi guys i have a array like this for e.g \[\[“0”, “0”, “0”, “0”, “0”, “3”, “3”\], \[“0”, “0”, “0”, “0”, “0”, “3”, “3”\], \[“0”, “0”, “0”, “0”, “0”, “3”, “3”\], \[“0”, “3”, “0”, “0”, “0”, “0”, “3”\], \[“0”, “0”, “0”, “0”, “0”…

---

## [Resync'd RubySpecs](https://www.ruby-forum.com/t/resyncd-rubyspecs/152643)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 11:13pm UTC](https://www.ruby-forum.com/t/resyncd-rubyspecs/152643 "2008-11-05T23:13:07Z")

</div>

I’ve pushed out re-sync’d versions of RubySpec, MSpec, and tags. Let me know if they cause any problems. JD

---

## [Shoes shape location](https://www.ruby-forum.com/t/shoes-shape-location/152642)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/shoes-shape-location/152642 "2008-11-05T22:42:57Z")

</div>

In Shoes, how do I get the current location of a shape in a window. I thought the below would work, but console shows 0 for x and y Shoes.app do shp = oval 10,10,40,40 debug “shp x-#{shp.left} shp y-#{shp.top}” end

---

## [Stack level too deep](https://www.ruby-forum.com/t/stack-level-too-deep/152621)

<div class="topic-metadata">

**Author:** [@Laurent\_Bois](https://www.ruby-forum.com/u/Laurent_Bois)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/stack-level-too-deep/152621 "2008-11-05T17:40:25Z")

</div>

Hello, I currently work a JRails application. I used to setup my project including the following dependencies : org.jruby jruby-complete 1.1 org.jruby.extras goldspike 1.6 \<dependency\> …

---

## [Can I sell my RubyConf ticket?](https://www.ruby-forum.com/t/can-i-sell-my-rubyconf-ticket/152540)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 3\
**Last updated:** [November 5, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/can-i-sell-my-rubyconf-ticket/152540 "2008-11-05T15:49:32Z")

</div>

Unfortunately I can’t make it this year…I saw that there is a waiting list now though. Can I sell my ticket off to somebody? How? btw the ticket would be what I paid for it, which is $250

---

## [Help ! RedCloth CodeRay integration](https://www.ruby-forum.com/t/help-redcloth-coderay-integration/80865)

<div class="topic-metadata">

**Author:** [@zenzei](https://www.ruby-forum.com/u/zenzei)\
**Replies:** 1\
**Last updated:** [November 5, 2008, 3:48pm UTC](https://www.ruby-forum.com/t/help-redcloth-coderay-integration/80865 "2008-11-05T15:48:52Z")

</div>

Hello, I’ve been digging in the RedCloth code to add CodeRay support. CodeRay is a nice syntax highlighter. Adding CodeRay support is really nice to do add ruby example in blog posts. RedCloth seems to support a ta…

---

## [Replace spaces with commas?](https://www.ruby-forum.com/t/replace-spaces-with-commas/152445)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 7\
**Last updated:** [November 5, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/replace-spaces-with-commas/152445 "2008-11-05T15:45:26Z")

</div>

Been looking at the Acts As Taggable On Steriods plugin, by default it makes each word separated by a comma a tag but I really wanted an easier way to handle this so each word gets a comma put between it so it becomes…

---

## [String comparisions and counting](https://www.ruby-forum.com/t/string-comparisions-and-counting/152605)

<div class="topic-metadata">

**Author:** [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Replies:** 7\
**Last updated:** [November 5, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/string-comparisions-and-counting/152605 "2008-11-05T15:30:02Z")

</div>

I have an array full of strings which represent a date ID. The array contains indivduals strings like the following: TueAug052008 I want to iterate through this array (@eventbydate\[\]) and check each of the values of …

---

## [What's wrong about this chomp code?](https://www.ruby-forum.com/t/whats-wrong-about-this-chomp-code/152596)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 4\
**Last updated:** [November 5, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/whats-wrong-about-this-chomp-code/152596 "2008-11-05T15:11:56Z")

</div>

when I was running this code File.open(“1c.txt”) do |f| while line= f.gets.chomp; p line ; end end why they warning with the message below? ========= private method ‘chomp’ called for nil:NilClass from ok.rb:2:in…

---

## [How to log and chain signals](https://www.ruby-forum.com/t/how-to-log-and-chain-signals/152603)

<div class="topic-metadata">

**Author:** [@frocco](https://www.ruby-forum.com/u/frocco)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/how-to-log-and-chain-signals/152603 "2008-11-05T14:25:12Z")

</div>

Hi everyone, I’ve been running my own ruby dispatcher on my website for a few years now, but I keep having problems with FCGI and no amount of logging has ever come up with any answers… The problem is that the proces…

---

## [Check for valid email address](https://www.ruby-forum.com/t/check-for-valid-email-address/152567)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 2\
**Last updated:** [November 5, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/check-for-valid-email-address/152567 "2008-11-05T14:21:40Z")

</div>

Hi I have a text field mail\_id I have to prevent the user to enter only a valid mail id For example removed\_email\_address@domain.invalid Could you please tell how can I check that? Thanks in advance Sijo

---

## [Dbi support](https://www.ruby-forum.com/t/dbi-support/152585)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 0\
**Last updated:** [November 5, 2008, 11:20am UTC](https://www.ruby-forum.com/t/dbi-support/152585 "2008-11-05T11:20:03Z")

</div>

Hi, I have been discussing integrating db support for rails with Andrew Peters. We think the best way forward is to implement a DBI layer for ironruby. Now the question is how come DBI isn’t in the list of libraries …

---

## [Minitest 1.3.0 Released](https://www.ruby-forum.com/t/minitest-1-3-0-released/150602)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 3\
**Last updated:** [November 5, 2008, 10:24am UTC](https://www.ruby-forum.com/t/minitest-1-3-0-released/150602 "2008-11-05T10:24:30Z")

</div>

minitest version 1.3.0 has been released! http://rubyforge.org/projects/bfts minitest/unit is a small and fast replacement for ruby’s huge and slow test/unit. This is meant to be clean and easy to use both as a regul…

---

## [Convert string to array with delimiter](https://www.ruby-forum.com/t/convert-string-to-array-with-delimiter/152579)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 3\
**Last updated:** [November 5, 2008, 10:18am UTC](https://www.ruby-forum.com/t/convert-string-to-array-with-delimiter/152579 "2008-11-05T10:18:37Z")

</div>

Dear all I have the following string want to convert to arry str="/dev/lis\_home\_712 2097152 1052656 1044496 51% /appl/lis/home2\\n" I use str.scan(/\\w+/), which give the following result \[“dev”, “lis\_hom…

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

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