# Ruby

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

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

---

## [Getting shell output](https://www.ruby-forum.com/t/getting-shell-output/180160)

<div class="topic-metadata">

**Author:** [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Replies:** 4\
**Last updated:** [December 13, 2009, 11:45pm UTC](https://www.ruby-forum.com/t/getting-shell-output/180160 "2009-12-13T23:45:51Z")

</div>

I’m trying to write a script that automates some backups using dump. The script works well for the most part but I’m having problems getting the output of dump to send in the email. I appears that dump writes all of i…

---

## [Casting null](https://www.ruby-forum.com/t/casting-null/180159)

<div class="topic-metadata">

**Author:** [@Fabio\_Y](https://www.ruby-forum.com/u/Fabio_Y)\
**Replies:** 3\
**Last updated:** [December 13, 2009, 11:00pm UTC](https://www.ruby-forum.com/t/casting-null/180159 "2009-12-13T23:00:13Z")

</div>

Hi, I was looking for a way to cast null to a class, is that possible? I didn’t find any info related to this. Thanks

---

## [Class ExistingName](https://www.ruby-forum.com/t/class-existingname/180158)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 2\
**Last updated:** [December 13, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/class-existingname/180158 "2009-12-13T19:37:49Z")

</div>

Recently i created a file object.rb class Object I forgot that ruby already reserved this name, so I renamed the class. But I was still curious. Is there a way to use a “class Object”? I guess there is no easy way, m…

---

## [Question about file management](https://www.ruby-forum.com/t/question-about-file-management/180141)

<div class="topic-metadata">

**Author:** [@atma](https://www.ruby-forum.com/u/atma)\
**Replies:** 4\
**Last updated:** [December 13, 2009, 6:11pm UTC](https://www.ruby-forum.com/t/question-about-file-management/180141 "2009-12-13T18:11:09Z")

</div>

A salut to the list, I need read info from a file, extract the info that I want which is the date and IP and dump them into a database (mysql). However, this file gets constantly updated, sits on /var/log/. Until now…

---

## [FasterCSV question: skip headers](https://www.ruby-forum.com/t/fastercsv-question-skip-headers/180152)

<div class="topic-metadata">

**Author:** [@thiel](https://www.ruby-forum.com/u/thiel)\
**Replies:** 2\
**Last updated:** [December 13, 2009, 5:44pm UTC](https://www.ruby-forum.com/t/fastercsv-question-skip-headers/180152 "2009-12-13T17:44:49Z")

</div>

Hi , I am refactoring a class that’s using Fastercsv to read a csv file. How do I skip the first (header) line. Now I’m using a helpvariable skipHEADER but I want a more elegant solution . Kind regards, Thiel

---

## [Code block for element comparison in an array?](https://www.ruby-forum.com/t/code-block-for-element-comparison-in-an-array/180150)

<div class="topic-metadata">

**Author:** [@derek](https://www.ruby-forum.com/u/derek)\
**Replies:** 13\
**Last updated:** [December 13, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/code-block-for-element-comparison-in-an-array/180150 "2009-12-13T17:43:39Z")

</div>

I’m new to Ruby and I can’t think of how to do this! I would like each element in an array to compare itself with all its proceeding elements. For example: In an array of 10 elements, a\[0\] will be compared to a\[1\] … …

---

## [Is it possible to force a Ruby program to run as a proc name different than "ruby"?](https://www.ruby-forum.com/t/is-it-possible-to-force-a-ruby-program-to-run-as-a-proc-name-different-than-ruby/180117)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 27\
**Last updated:** [December 13, 2009, 2:28pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-force-a-ruby-program-to-run-as-a-proc-name-different-than-ruby/180117 "2009-12-13T14:28:46Z")

</div>

Hi, I have a Python software called “py\_program”. It runs as daemon in Linux so doing a “ps” I get: root 6541 /usr/bin/python /home/ibc/py\_program However in /proc/6541/status I read: Name: py\_program This is goo…

---

## [Gets command help --ruby](https://www.ruby-forum.com/t/gets-command-help-ruby/180146)

<div class="topic-metadata">

**Author:** [@kgovinda](https://www.ruby-forum.com/u/kgovinda)\
**Replies:** 2\
**Last updated:** [December 13, 2009, 10:35am UTC](https://www.ruby-forum.com/t/gets-command-help-ruby/180146 "2009-12-13T10:35:50Z")

</div>

hi there, i am a learner of ruby and while i am writing a code i am stopped with input method. i search and found that gets is the command use to input from keyboard but i do not know how? so can you explain me on de…

---

## [\[Bug #2474\] The \_\_FILE\_\_ constant equals a relative path when required using a relative path FAILED](https://www.ruby-forum.com/t/bug-2474-the-file-constant-equals-a-relative-path-when-required-using-a-relative-path-failed/180125)

<div class="topic-metadata">

**Author:** [@ujihisa\_S](https://www.ruby-forum.com/u/ujihisa_S)\
**Replies:** 2\
**Last updated:** [December 13, 2009, 10:32am UTC](https://www.ruby-forum.com/t/bug-2474-the-file-constant-equals-a-relative-path-when-required-using-a-relative-path-failed/180125 "2009-12-13T10:32:54Z")

</div>

Bug #2474: The FILE constant equals a relative path when required using a relative path FAILED on 1.8.8dev http://redmine.ruby-lang.org/issues/show/2474 e$B5/I\<\<Te(B: ujihisa . e$B%9%F!\<%?%9e(B: Assigned, e$BM%@hEYe(…

---

## [Access Excel](https://www.ruby-forum.com/t/access-excel/180089)

<div class="topic-metadata">

**Author:** [@jethrow](https://www.ruby-forum.com/u/jethrow)\
**Replies:** 8\
**Last updated:** [December 13, 2009, 8:25am UTC](https://www.ruby-forum.com/t/access-excel/180089 "2009-12-13T08:25:55Z")

</div>

First off, I’m relatively new to Ruby. What I’m trying to do is access a specific Excel Workbook that is alreay open. I already know the following: access running Excel - WIN32OLE.connect(“Excel.Application”) access …

---

## [Wordpress Port](https://www.ruby-forum.com/t/wordpress-port/179902)

<div class="topic-metadata">

**Author:** [@hjast](https://www.ruby-forum.com/u/hjast)\
**Replies:** 30\
**Last updated:** [December 13, 2009, 5:24am UTC](https://www.ruby-forum.com/t/wordpress-port/179902 "2009-12-13T05:24:14Z")

</div>

Has there any been an effort to make a ruby Wordpress port? I am a rails and ruby guy, and now have to do a blog in Wordpress. PHP is an ugly langauge and I wish I could use ruby for extending and looking at the archi…

---

## [Program: a small ball in a window](https://www.ruby-forum.com/t/program-a-small-ball-in-a-window/180102)

<div class="topic-metadata">

**Author:** [@diabolator2](https://www.ruby-forum.com/u/diabolator2)\
**Replies:** 10\
**Last updated:** [December 13, 2009, 5:16am UTC](https://www.ruby-forum.com/t/program-a-small-ball-in-a-window/180102 "2009-12-13T05:16:56Z")

</div>

Please help, I realy need help! I need a program which shows a simple ball on the screen, just a ball. Its position must be defined by (x,y) coordinates.I mean I would be able to play with (x,y) in order to change the…

---

## [Syntax issue](https://www.ruby-forum.com/t/syntax-issue/180071)

<div class="topic-metadata">

**Author:** [@macsig](https://www.ruby-forum.com/u/macsig)\
**Replies:** 16\
**Last updated:** [December 12, 2009, 8:45pm UTC](https://www.ruby-forum.com/t/syntax-issue/180071 "2009-12-12T20:45:27Z")

</div>

Hello guys, I have hard time using Prawn (PDF library). I need to add to number\_pages the font size def number\_pages(string, position) page\_count.times do |i| go\_to\_page(i) str = string.gsub("\<page\>","#{i+1}").gs…

---

## [TupleSpace Documentation](https://www.ruby-forum.com/t/tuplespace-documentation/180129)

<div class="topic-metadata">

**Author:** [@lapajko](https://www.ruby-forum.com/u/lapajko)\
**Replies:** 1\
**Last updated:** [December 12, 2009, 5:52pm UTC](https://www.ruby-forum.com/t/tuplespace-documentation/180129 "2009-12-12T17:52:13Z")

</div>

Hi, I’m writing TupleSpace in C++ and I’d like to have it compatibile with Ruby TupleSpace (Rinda). Is there any documenation about Rinda socket communication? I don’t want to lost lot of time with debugging socket c…

---

## [Gruff & Uneven Data: Interpolation or Line Connection](https://www.ruby-forum.com/t/gruff-uneven-data-interpolation-or-line-connection/180136)

<div class="topic-metadata">

**Author:** [@paerez](https://www.ruby-forum.com/u/paerez)\
**Replies:** 0\
**Last updated:** [December 12, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/gruff-uneven-data-interpolation-or-line-connection/180136 "2009-12-12T17:48:16Z")

</div>

I often have data, for example, for interest rates with varying maturities, at uneven intervals - data at one, three and six months, and data at one through seven years. To use Gruff to make a line graph of this data,…

---

## [Design tool Jeszra 0.1 for Ruby Tk](https://www.ruby-forum.com/t/design-tool-jeszra-0-1-for-ruby-tk/180051)

<div class="topic-metadata">

**Author:** [@Arndt\_Roger\_S](https://www.ruby-forum.com/u/Arndt_Roger_S)\
**Replies:** 8\
**Last updated:** [December 12, 2009, 3:41pm UTC](https://www.ruby-forum.com/t/design-tool-jeszra-0-1-for-ruby-tk/180051 "2009-12-12T15:41:07Z")

</div>

Hi all Ruby-Tk Users and Developers. I am pleased to announce the first public release of Jeszra (0.1). http://jeszra.sourceforge.net Jeszra is a visual design tool, written in Tcl/Tk, which combines 2D vector graph…

---

## [Which template for ruby-begin project?](https://www.ruby-forum.com/t/which-template-for-ruby-begin-project/180130)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 5\
**Last updated:** [December 12, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/which-template-for-ruby-begin-project/180130 "2009-12-12T15:23:22Z")

</div>

Hi, Once we used Template::Toolkit (Perl) and Smarty (PHP) for templates, both are great. Now if we begin a new web project with Ruby, and choose the Sinatra framework, what’s the corrensponding template for it? And…

---

## [Ruby Conefernce India 2010 first time](https://www.ruby-forum.com/t/ruby-conefernce-india-2010-first-time/197116)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [December 12, 2009, 11:29am UTC](https://www.ruby-forum.com/t/ruby-conefernce-india-2010-first-time/197116 "2009-12-12T11:29:14Z")

</div>

Hi See details http://rubyconfindia.org/ Sijo

---

## [A question on method name](https://www.ruby-forum.com/t/a-question-on-method-name/180126)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 3\
**Last updated:** [December 12, 2009, 11:23am UTC](https://www.ruby-forum.com/t/a-question-on-method-name/180126 "2009-12-12T11:23:21Z")

</div>

Hello, This works fine for me: class Horse def name @name end def nameset(v1,v2) @name = v1 + v2.to\_s end end xx=Horse.new xx.nameset("hello ",1) p xx.name But if I changed the …

---

## [Unicorn Server questions](https://www.ruby-forum.com/t/unicorn-server-questions/180120)

<div class="topic-metadata">

**Author:** [@beev](https://www.ruby-forum.com/u/beev)\
**Replies:** 1\
**Last updated:** [December 12, 2009, 8:11am UTC](https://www.ruby-forum.com/t/unicorn-server-questions/180120 "2009-12-12T08:11:39Z")

</div>

First is regarding the the “listen” configuration option. Why is this option important? What can I do once a worker is set up to listen on a port? I do not really see the need of this unless… What I am really trying t…

---

## [Ruby 1.9.1 mingw32 under Windows](https://www.ruby-forum.com/t/ruby-1-9-1-mingw32-under-windows/180108)

<div class="topic-metadata">

**Author:** [@tandrei](https://www.ruby-forum.com/u/tandrei)\
**Replies:** 2\
**Last updated:** [December 12, 2009, 5:03am UTC](https://www.ruby-forum.com/t/ruby-1-9-1-mingw32-under-windows/180108 "2009-12-12T05:03:12Z")

</div>

I’ve tried using ruby 1.9.1 compiled with mingw32 and had the following error: f = File.open(‘C:/1.tst’, ‘w’) =\> #\<File:C:/1.tst\> f.truncate(0) =\> 0 f.truncate(10) Errno::EINVAL: Invalid argument - C:/1.tst from (i…

---

## [ekoVenture is looking for a RoR engineer!](https://www.ruby-forum.com/t/ekoventure-is-looking-for-a-ror-engineer/180121)

<div class="topic-metadata">

**Author:** [@David\_Duchen](https://www.ruby-forum.com/u/David_Duchen)\
**Replies:** 0\
**Last updated:** [December 12, 2009, 1:00am UTC](https://www.ruby-forum.com/t/ekoventure-is-looking-for-a-ror-engineer/180121 "2009-12-12T01:00:55Z")

</div>

ekoVenture’s looking to hire a rock star RoR engineer! We’re a very cool start-up with a great niche, and we practice extreme programming and all the tenets of agile development. To apply for the position, go here: We…

---

## [Help on searching large sets of data](https://www.ruby-forum.com/t/help-on-searching-large-sets-of-data/180109)

<div class="topic-metadata">

**Author:** [@beev](https://www.ruby-forum.com/u/beev)\
**Replies:** 3\
**Last updated:** [December 12, 2009, 12:29am UTC](https://www.ruby-forum.com/t/help-on-searching-large-sets-of-data/180109 "2009-12-12T00:29:19Z")

</div>

I am reaching out to get some help/ideas about our current search implementation. We are currently using Ferret as our search engine and its not keeping up with our needs… we are quite needy ;). We have about 5m+ docu…

---

## [How to use open\_uri with cookies?](https://www.ruby-forum.com/t/how-to-use-open-uri-with-cookies/180119)

<div class="topic-metadata">

**Author:** [@yumiu](https://www.ruby-forum.com/u/yumiu)\
**Replies:** 0\
**Last updated:** [December 12, 2009, 12:28am UTC](https://www.ruby-forum.com/t/how-to-use-open-uri-with-cookies/180119 "2009-12-12T00:28:55Z")

</div>

Hi, I need to send a request with cookies info. I tried open(url,“Cookie” =\> cookies) it gives me NoMethodError Exception: undefined method \`strip’ for #ActionController::CookieJar:0x1344a558 Can anyone give me so…

---

## [Building ruby on AIX 5.3](https://www.ruby-forum.com/t/building-ruby-on-aix-5-3/180099)

<div class="topic-metadata">

**Author:** [@rbaibich](https://www.ruby-forum.com/u/rbaibich)\
**Replies:** 6\
**Last updated:** [December 11, 2009, 10:59pm UTC](https://www.ruby-forum.com/t/building-ruby-on-aix-5-3/180099 "2009-12-11T22:59:47Z")

</div>

Hello, I’m trying to build ruby 1.9.1 p376 on a AIX platform using pWares’s gcc but this is the error I’m getting: checking for size\_t… yes checking size of size\_t… configure: error: in /tmp/Packages\_for\_Management/…

---

## [Gems installation - invalid gem format](https://www.ruby-forum.com/t/gems-installation-invalid-gem-format/179817)

<div class="topic-metadata">

**Author:** [@javix](https://www.ruby-forum.com/u/javix)\
**Replies:** 9\
**Last updated:** [December 11, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/gems-installation-invalid-gem-format/179817 "2009-12-11T22:37:13Z")

</div>

No matter on which OS you are, - XP Family, XP Pro or Ubuntu 9.10. No matter if you have firewall ‘hyper-sensitive’ or proxy. When trying to do gem update --system or even when trying to install a new gem like 'gem in…

---

## [Human-readable listing of array elements](https://www.ruby-forum.com/t/human-readable-listing-of-array-elements/180061)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 21\
**Last updated:** [December 11, 2009, 9:50pm UTC](https://www.ruby-forum.com/t/human-readable-listing-of-array-elements/180061 "2009-12-11T21:50:26Z")

</div>

This took me less than a minute to write, but I don’t know if it’s as elegant as it could be. Are there more “Ruby-like ways™” to write this? def stringify array return array\[0\] if array.size == 1 string = “” array…

---

## ["private" modules](https://www.ruby-forum.com/t/private-modules/180073)

<div class="topic-metadata">

**Author:** [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Replies:** 7\
**Last updated:** [December 11, 2009, 7:51pm UTC](https://www.ruby-forum.com/t/private-modules/180073 "2009-12-11T19:51:54Z")

</div>

Hi, I’m writing a ruby library, under a module named “A”. Since I provide classes which share names with standard ruby classes (like Vector), this way I avoid namespace pollution when requiring my library. The proble…

---

## [Ruby PDB protein structure API?](https://www.ruby-forum.com/t/ruby-pdb-protein-structure-api/180090)

<div class="topic-metadata">

**Author:** [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Replies:** 2\
**Last updated:** [December 11, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/ruby-pdb-protein-structure-api/180090 "2009-12-11T18:28:12Z")

</div>

Probably not more than 1/2 year ago I used a nice package that allowed reading in PDB formatted protein structures in ruby. For the life of me I can’t find this package on the web anymore. Where did it go?

---

## [Fill gaps in Array of Hashes](https://www.ruby-forum.com/t/fill-gaps-in-array-of-hashes/180065)

<div class="topic-metadata">

**Author:** [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Replies:** 9\
**Last updated:** [December 11, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/fill-gaps-in-array-of-hashes/180065 "2009-12-11T17:39:38Z")

</div>

I have the following object as a result from MySQL: \[{:positive=\>“0”, :neutral=\>“2”, :total=\>“5”, :date=\>“2009-12-01”, :negative=\>“3”}, {:positive=\>“3”, :neutral=\>“3”, :total=\>“7”, :date=\>“2009-12-08”, :negative=\>“1”}…

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

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