# Ruby

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

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

---

## [Distributing a ruby program](https://www.ruby-forum.com/t/distributing-a-ruby-program/117925)

<div class="topic-metadata">

**Author:** [@tomrobinson](https://www.ruby-forum.com/u/tomrobinson)\
**Replies:** 2\
**Last updated:** [October 22, 2007, 7:25pm UTC](https://www.ruby-forum.com/t/distributing-a-ruby-program/117925 "2007-10-22T19:25:39Z")

</div>

I want to distribute a ruby program to 4 offices where I work. How do I create a minimum subset of the ruby distribution such that it contains only the modules and ruby system that I need so that my program can run? …

---

## [Ruby and barcodes](https://www.ruby-forum.com/t/ruby-and-barcodes/117932)

<div class="topic-metadata">

**Author:** [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Replies:** 4\
**Last updated:** [October 22, 2007, 5:35pm UTC](https://www.ruby-forum.com/t/ruby-and-barcodes/117932 "2007-10-22T17:35:29Z")

</div>

Hello 1 - I would like to generate a 2D barcode with ruby? Is it possible? 2 - If it is possible, is there a way to make the oposite? (read the file generated with the barcode - PDF/image/etc) and extract is content …

---

## [Coping all files in a folder](https://www.ruby-forum.com/t/coping-all-files-in-a-folder/117927)

<div class="topic-metadata">

**Author:** [@nick](https://www.ruby-forum.com/u/nick)\
**Replies:** 1\
**Last updated:** [October 22, 2007, 4:11pm UTC](https://www.ruby-forum.com/t/coping-all-files-in-a-folder/117927 "2007-10-22T16:11:43Z")

</div>

require ‘ftools’ source=“c:\\axis\\FTP storage” dest=“c:\\axis\\images” For some reason this code will not work, I am not sure why. It will get into the loop with the copy state meant and then error. dir.each do|file| …

---

## [How to make use of singularize method](https://www.ruby-forum.com/t/how-to-make-use-of-singularize-method/196499)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 0\
**Last updated:** [October 22, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/how-to-make-use-of-singularize-method/196499 "2007-10-22T16:00:26Z")

</div>

Hello I need to know how to make use of singularize method with params\[:path\], the code is something like this \<%= params\[:path\] %\> , the output of this particular statement is computers and I need to get computer. …

---

## [Coping all files in a folder](https://www.ruby-forum.com/t/coping-all-files-in-a-folder/117930)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 22, 2007, 3:59pm UTC](https://www.ruby-forum.com/t/coping-all-files-in-a-folder/117930 "2007-10-22T15:59:23Z")

</div>

require ‘ftools’ source=“c:\\axis\\FTP storage” dest=“c:\\axis\\images” For some reason this code will not work, I am not sure why. It will get into the loop with the copy state meant and then error. dir.each do|file| …

---

## [I have nothing to do with ORA-01756!](https://www.ruby-forum.com/t/i-have-nothing-to-do-with-ora-01756/117926)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [October 22, 2007, 3:28pm UTC](https://www.ruby-forum.com/t/i-have-nothing-to-do-with-ora-01756/117926 "2007-10-22T15:28:56Z")

</div>

I have create a oracle 9i (9.2) database and set its characterset to UTF8. After I create a table named man, together with controllers and scaffold with ruby, I log on to the page “New Man” and input 3 chinese charact…

---

## [Printing Line number during runtime](https://www.ruby-forum.com/t/printing-line-number-during-runtime/117896)

<div class="topic-metadata">

**Author:** [@pash](https://www.ruby-forum.com/u/pash)\
**Replies:** 2\
**Last updated:** [October 22, 2007, 3:25pm UTC](https://www.ruby-forum.com/t/printing-line-number-during-runtime/117896 "2007-10-22T15:25:24Z")

</div>

Hi All, I am a newbie to ruby programming, Is there a way to print the line number of the code that ruby is interpreting during runtime without changing my code? Can I see what line is ruby running currently? Is the…

---

## [Fwd: Correction (was RE: Please Forward: Ruby Quiz Submission (Time Window #144))](https://www.ruby-forum.com/t/fwd-correction-was-re-please-forward-ruby-quiz-submission-time-window-144/229155)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [October 22, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/fwd-correction-was-re-please-forward-ruby-quiz-submission-time-window-144/229155 "2007-10-22T14:41:59Z")

</div>

Begin forwarded message:

---

## [\[ANN\] Ruby In Steel 1.1.5 - Rails extras/ VS2008 beta](https://www.ruby-forum.com/t/ann-ruby-in-steel-1-1-5-rails-extras-vs2008-beta/196497)

<div class="topic-metadata">

**Author:** [@huw](https://www.ruby-forum.com/u/huw)\
**Replies:** 0\
**Last updated:** [October 22, 2007, 11:29am UTC](https://www.ruby-forum.com/t/ann-ruby-in-steel-1-1-5-rails-extras-vs2008-beta/196497 "2007-10-22T11:29:44Z")

</div>

Ruby In Steel 1.1.5 SapphireSteel Software has today released Ruby In Steel Developer 1.1.5. The biggest single upgrade to the software since the release of version 1.0 in January 2007, the new edition has hugely impr…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/117868)

<div class="topic-metadata">

**Author:** [@Schmidt\_Harald](https://www.ruby-forum.com/u/Schmidt_Harald)\
**Replies:** 1\
**Last updated:** [October 22, 2007, 8:38am UTC](https://www.ruby-forum.com/t/unsubscribe/117868 "2007-10-22T08:38:24Z")

</div>

Unsubscribe

---

## [Eval alternative to execute string](https://www.ruby-forum.com/t/eval-alternative-to-execute-string/117709)

<div class="topic-metadata">

**Author:** [@koos](https://www.ruby-forum.com/u/koos)\
**Replies:** 6\
**Last updated:** [October 22, 2007, 8:30am UTC](https://www.ruby-forum.com/t/eval-alternative-to-execute-string/117709 "2007-10-22T08:30:13Z")

</div>

I have the following stored in a file Example1.rb require ‘rubygems’ require ‘wx’ include Wx require ‘wx\_sugar/all’ class ExampleApp \< App def on\_init frame = Frame.new( nil, :title =\> “Example1.rb” ).show end e…

---

## [Bug cleanup in progress](https://www.ruby-forum.com/t/bug-cleanup-in-progress/117788)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 3\
**Last updated:** [October 22, 2007, 7:49am UTC](https://www.ruby-forum.com/t/bug-cleanup-in-progress/117788 "2007-10-22T07:49:16Z")

</div>

I went through about a 120 bugs this evening, fixing a bunch, applying patches for a bunch, closing a bunch that were already working, backporting a few fixes, assigning some to specific versions or committers, and ad…

---

## [Time Window (#144)](https://www.ruby-forum.com/t/time-window-144/117695)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 10\
**Last updated:** [October 22, 2007, 7:34am UTC](https://www.ruby-forum.com/t/time-window-144/117695 "2007-10-22T07:34:04Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Problem configuring Tomcat to handle .rhtml](https://www.ruby-forum.com/t/problem-configuring-tomcat-to-handle-rhtml/117895)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 0\
**Last updated:** [October 22, 2007, 7:25am UTC](https://www.ruby-forum.com/t/problem-configuring-tomcat-to-handle-rhtml/117895 "2007-10-22T07:25:53Z")

</div>

Hi All, I’m trying to get my installed Apache Tomcat 6.0 to properly process ://localhost:8080/Whatever.rhtml, where this file contains embedded Ruby. I consulted %CATALINA\_HOME%/webapps/docs/cgi-howto.html on mt Win…

---

## [Class variables](https://www.ruby-forum.com/t/class-variables/117894)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 2\
**Last updated:** [October 22, 2007, 7:17am UTC](https://www.ruby-forum.com/t/class-variables/117894 "2007-10-22T07:17:11Z")

</div>

I have tried to deal with class variables but I received weird output the code is here and below it is the output class ClassVariable attr\_accessor :total @@num1 = 0 @@num2 = 0 def getValues puts “enter a number” …

---

## [Gsub does not work with do/end block, only brackets](https://www.ruby-forum.com/t/gsub-does-not-work-with-do-end-block-only-brackets/117881)

<div class="topic-metadata">

**Author:** [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Replies:** 4\
**Last updated:** [October 22, 2007, 3:37am UTC](https://www.ruby-forum.com/t/gsub-does-not-work-with-do-end-block-only-brackets/117881 "2007-10-22T03:37:52Z")

</div>

puts “abcdefg”.gsub(/abc/) do |x| x.upcase end ^This does not work. ArgumentError, it’s expecting the second argument that’s required when a block is not provided. puts “abcdefg”.gsub(/abc/) { |x| x.upcase } ^Thi…

---

## [How to use a hash inside a Struct?](https://www.ruby-forum.com/t/how-to-use-a-hash-inside-a-struct/117877)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 6\
**Last updated:** [October 22, 2007, 1:51am UTC](https://www.ruby-forum.com/t/how-to-use-a-hash-inside-a-struct/117877 "2007-10-22T01:51:25Z")

</div>

Is there a way to use a hash inside a Structure. Something like: object = Struct.new(Hash.new(), :attr2, :attr3) I know this doesn’t work, but do you get the idea of what I am trying to do? Jayson

---

## [Mms2r 1.1.12 Released](https://www.ruby-forum.com/t/mms2r-1-1-12-released/117874)

<div class="topic-metadata">

**Author:** [@mike-moscow](https://www.ruby-forum.com/u/mike-moscow)\
**Replies:** 0\
**Last updated:** [October 22, 2007, 12:33am UTC](https://www.ruby-forum.com/t/mms2r-1-1-12-released/117874 "2007-10-22T00:33:04Z")

</div>

mms2r version 1.1.12 has been released! http://mms2r.rubyforge.org/ DESCRIPTION: MMS2R is a library that decodes the parts of an MMS message to disk while stripping out advertising injected by the cellphone carrier…

---

## [How to setup path](https://www.ruby-forum.com/t/how-to-setup-path/117866)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 5\
**Last updated:** [October 22, 2007, 12:25am UTC](https://www.ruby-forum.com/t/how-to-setup-path/117866 "2007-10-22T00:25:27Z")

</div>

how to setup the ruby path that my code can look at runtime for the libraries.

---

## [Why's (Poignant) Guide to Ruby (is this guy ok?)](https://www.ruby-forum.com/t/whys-poignant-guide-to-ruby-is-this-guy-ok/117781)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 12\
**Last updated:** [October 22, 2007, 12:19am UTC](https://www.ruby-forum.com/t/whys-poignant-guide-to-ruby-is-this-guy-ok/117781 "2007-10-22T00:19:38Z")

</div>

Recently, I was looking for a Ruby guide that could help my son catch on to Ruby. I have seen several mentions an Why’s (Poignant) Guide to Ruby, so I decided to read through it to see if it was something my son could…

---

## [Gnu licence](https://www.ruby-forum.com/t/gnu-licence/117864)

<div class="topic-metadata">

**Author:** [@jacques](https://www.ruby-forum.com/u/jacques)\
**Replies:** 0\
**Last updated:** [October 21, 2007, 7:36pm UTC](https://www.ruby-forum.com/t/gnu-licence/117864 "2007-10-21T19:36:16Z")

</div>

Showing vendor/plugins/coupa\_engine/app/views/catalog\_items/\_detail.rhtml where line #15 raised: GNU General Public License for more details.

---

## [Showing vendor/plugins/coupa\_engine/app/views/catalog\_items/](https://www.ruby-forum.com/t/showing-vendor-plugins-coupa-engine-app-views-catalog-items/117863)

<div class="topic-metadata">

**Author:** [@jacques](https://www.ruby-forum.com/u/jacques)\
**Replies:** 0\
**Last updated:** [October 21, 2007, 7:34pm UTC](https://www.ruby-forum.com/t/showing-vendor-plugins-coupa-engine-app-views-catalog-items/117863 "2007-10-21T19:34:43Z")

</div>

Any ideas ?

---

## [Memory management](https://www.ruby-forum.com/t/memory-management/117857)

<div class="topic-metadata">

**Author:** [@Bazsl](https://www.ruby-forum.com/u/Bazsl)\
**Replies:** 2\
**Last updated:** [October 21, 2007, 6:59pm UTC](https://www.ruby-forum.com/t/memory-management/117857 "2007-10-21T18:59:36Z")

</div>

I am new to Ruby. If I instantiate an object instance with x = Foo.new should I set x to nil to free the object instance when it is no longer needed? Can anyone point me to any articles etc. on memory management in R…

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229140)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [October 21, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229140 "2007-10-21T17:20:03Z")

</div>

Begin forwarded message:

---

## [RACC and YACC problem in TMail](https://www.ruby-forum.com/t/racc-and-yacc-problem-in-tmail/117852)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 0\
**Last updated:** [October 21, 2007, 3:42pm UTC](https://www.ruby-forum.com/t/racc-and-yacc-problem-in-tmail/117852 "2007-10-21T15:42:51Z")

</div>

Hello all, I am trying to get outlook email through a small set of programs I wrote to download/modify/and upload emails. Problem is, TMail seems to not be handling the Microsoft outlook Content-Type header declarati…

---

## [How to obtain the default encoding of system?](https://www.ruby-forum.com/t/how-to-obtain-the-default-encoding-of-system/117847)

<div class="topic-metadata">

**Author:** [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Replies:** 0\
**Last updated:** [October 21, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/how-to-obtain-the-default-encoding-of-system/117847 "2007-10-21T14:26:50Z")

</div>

a script run on linux or windows, i want to know the encoding of system, in order to ouput suitable string.thanks

---

## [Installing ruby on ubuntu GNU/Linux](https://www.ruby-forum.com/t/installing-ruby-on-ubuntu-gnu-linux/117828)

<div class="topic-metadata">

**Author:** [@Devi\_Web\_D](https://www.ruby-forum.com/u/Devi_Web_D)\
**Replies:** 4\
**Last updated:** [October 21, 2007, 12:52pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-ubuntu-gnu-linux/117828 "2007-10-21T12:52:05Z")

</div>

I am setting up ruby on a new ubuntu system and was wondering if it matters whether things like rails and various ruby packages are installed via ubuntu’s package manager (Synaptic) or via RubyGems.

---

## [Libxml iterate xml tree](https://www.ruby-forum.com/t/libxml-iterate-xml-tree/117815)

<div class="topic-metadata">

**Author:** [@Philipp](https://www.ruby-forum.com/u/Philipp)\
**Replies:** 1\
**Last updated:** [October 21, 2007, 12:31pm UTC](https://www.ruby-forum.com/t/libxml-iterate-xml-tree/117815 "2007-10-21T12:31:01Z")

</div>

Hello Everyone, i dumped my whole saturday on a small xml problem :slight\_smile: i have a xml document e.g now i want to get all door\_handle from each door ? …

---

## [Anonymous classes?](https://www.ruby-forum.com/t/anonymous-classes/117836)

<div class="topic-metadata">

**Author:** [@nbits](https://www.ruby-forum.com/u/nbits)\
**Replies:** 7\
**Last updated:** [October 21, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/anonymous-classes/117836 "2007-10-21T12:08:19Z")

</div>

Here is what I’d like to do. anonymous\_class = class.new; somehow define methods on anonymous\_class somehow create an object of type anonymous\_class And I’m running into a roadblock. I can create an anonymous class e…

---

## [How to split ruby code into multiple files](https://www.ruby-forum.com/t/how-to-split-ruby-code-into-multiple-files/117818)

<div class="topic-metadata">

**Author:** [@ceddy](https://www.ruby-forum.com/u/ceddy)\
**Replies:** 5\
**Last updated:** [October 21, 2007, 11:48am UTC](https://www.ruby-forum.com/t/how-to-split-ruby-code-into-multiple-files/117818 "2007-10-21T11:48:54Z")

</div>

Hi guys, my ruby code is now a long file and I’d like to split it into different smaller files so that I could reuse them in different programs and make my original code smaller at the same time. One file should be u…

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

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