# Ruby

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

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

---

## [Writing web services using Ruby](https://www.ruby-forum.com/t/writing-web-services-using-ruby/120153)

<div class="topic-metadata">

**Author:** [@thilinamb](https://www.ruby-forum.com/u/thilinamb)\
**Replies:** 4\
**Last updated:** [November 15, 2007, 5:43am UTC](https://www.ruby-forum.com/t/writing-web-services-using-ruby/120153 "2007-11-15T05:43:15Z")

</div>

hi, i want to write a web service using Ruby. This is not the client, but the service. Is there any good reference for writing services in Ruby. what i found in the web were about writing clients using Ruby. But i wa…

---

## [Test/unit question. Accessing class variables?](https://www.ruby-forum.com/t/test-unit-question-accessing-class-variables/120230)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [November 15, 2007, 5:35am UTC](https://www.ruby-forum.com/t/test-unit-question-accessing-class-variables/120230 "2007-11-15T05:35:55Z")

</div>

Hello. This is my first attempt in trying to use the ruby library test/ unit. Additionally my programming and ruby skills are still around the beginner stage. I have a unix utility which I’ve written in ruby and no…

---

## [Adding an attribute to an object](https://www.ruby-forum.com/t/adding-an-attribute-to-an-object/120243)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 3\
**Last updated:** [November 15, 2007, 4:46am UTC](https://www.ruby-forum.com/t/adding-an-attribute-to-an-object/120243 "2007-11-15T04:46:13Z")

</div>

I know how to add new methods to an existing object, but is there a way to add an attribute? I know I can do it if the object was created with ObjectStruct, but what if it is a “normal” Ruby object? R. Mark V. Objec…

---

## [Rspec questions: same file? mocks objects as params?](https://www.ruby-forum.com/t/rspec-questions-same-file-mocks-objects-as-params/120209)

<div class="topic-metadata">

**Author:** [@dawillis](https://www.ruby-forum.com/u/dawillis)\
**Replies:** 3\
**Last updated:** [November 15, 2007, 3:19am UTC](https://www.ruby-forum.com/t/rspec-questions-same-file-mocks-objects-as-params/120209 "2007-11-15T03:19:42Z")

</div>

I’m just getting started with rspec. Two questions: Should the rspec be in the same file as the production code? The examples on the rspec site seem to indicate they should be in a separate file but I wanted to doub…

---

## [Post about ThreadDump Stack Traces](https://www.ruby-forum.com/t/post-about-threaddump-stack-traces/120238)

<div class="topic-metadata">

**Author:** [@bdeverea](https://www.ruby-forum.com/u/bdeverea)\
**Replies:** 0\
**Last updated:** [November 15, 2007, 2:44am UTC](https://www.ruby-forum.com/t/post-about-threaddump-stack-traces/120238 "2007-11-15T02:44:39Z")

</div>

Hey all, I posted on this list a few weeks ago about the trouble I was having trying to tease a stack trace out of another thread for ThreadDump, but never got any attention. I’ve written it all up in a bit more deta…

---

## [CGI::Session::FileStore $B$N%G!\<%?$,2u$l$k(B](https://www.ruby-forum.com/t/cgi-filestore-b-n-g-2u-l-k-b/120231)

<div class="topic-metadata">

**Author:** [@SSSBSHS\_SSSSS5SRSmS](https://www.ruby-forum.com/u/SSSBSHS_SSSSS5SRSmS)\
**Replies:** 0\
**Last updated:** [November 15, 2007, 12:19am UTC](https://www.ruby-forum.com/t/cgi-filestore-b-n-g-2u-l-k-b/120231 "2007-11-15T00:19:46Z")

</div>

e$B$H$\_$?$G$9!#e(B 1.8.6 e$B$Ge(B CGI::Session::FileStore e$B$N%G!\<%?$,2u$l$k$3$H$,$"$j$^$9!#e(B LOCK\_EX e$B$r3MF@$G$-$F$J$$$N$K%U%!%$%k$NFbMF$r\>C$7$F$$$k!#e(B 412: f = File.open(@path, File::CREAT|File::TRUNC|Fi…

---

## [Hpricot & mechanize fail to parse page after redirect](https://www.ruby-forum.com/t/hpricot-mechanize-fail-to-parse-page-after-redirect/120213)

<div class="topic-metadata">

**Author:** [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Replies:** 2\
**Last updated:** [November 14, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/hpricot-mechanize-fail-to-parse-page-after-redirect/120213 "2007-11-14T22:18:42Z")

</div>

Hi everyone, My quest with mechanize/Hpricot continues :slight\_smile: Something extremely strange happened today - some simple working code broke down, and i can’t figure out why. I am trying to access a piratebay.or…

---

## [Seg faults with 1.8.6](https://www.ruby-forum.com/t/seg-faults-with-1-8-6/120222)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [November 14, 2007, 9:48pm UTC](https://www.ruby-forum.com/t/seg-faults-with-1-8-6/120222 "2007-11-14T21:48:48Z")

</div>

I recently upgraded from ruby 1.8.5 to 1.8.6. At first I was using the prebuilt binaries that come with Ubuntu Gutsy, but now I am using a built from source version of 1.8.6 p110. I am seeing seg faults several times…

---

## [Efficiency of recursion (stack level too deep)](https://www.ruby-forum.com/t/efficiency-of-recursion-stack-level-too-deep/120146)

<div class="topic-metadata">

**Author:** [@Chet\_Nichols\_III](https://www.ruby-forum.com/u/Chet_Nichols_III)\
**Replies:** 3\
**Last updated:** [November 14, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/efficiency-of-recursion-stack-level-too-deep/120146 "2007-11-14T21:46:28Z")

</div>

hi there- so i started running into a problem using recursion with ruby- it seemed a little too soon for me to be getting a stack overflow (‘stack level too deep (SystemStackError)’), so i wrote up a quick simple sc…

---

## [Module#constants](https://www.ruby-forum.com/t/module-constants/120135)

<div class="topic-metadata">

**Author:** [@fxn](https://www.ruby-forum.com/u/fxn)\
**Replies:** 4\
**Last updated:** [November 14, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/module-constants/120135 "2007-11-14T21:42:20Z")

</div>

According to my trials nor Module#constants neither Module#const\_get work with constants defined in enclosing modules: module M C = 1 module N C # -\> 1 end end M::N.constants # -\> \[\] M::N.const\_get(“C”) # -\> Nam…

---

## [Transfer content of flat file to an array](https://www.ruby-forum.com/t/transfer-content-of-flat-file-to-an-array/120220)

<div class="topic-metadata">

**Author:** [@smeitei](https://www.ruby-forum.com/u/smeitei)\
**Replies:** 4\
**Last updated:** [November 14, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/transfer-content-of-flat-file-to-an-array/120220 "2007-11-14T21:32:22Z")

</div>

Scenario … I have a text file 23 24 56 78 90 89 I want to transfer this content into an array, numArr=\[23,24,56,78,90,89\] How to do it

---

## ["once" meta-method without "module\_eval" (Pickaxe)](https://www.ruby-forum.com/t/once-meta-method-without-module-eval-pickaxe/120154)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 6\
**Last updated:** [November 14, 2007, 8:39pm UTC](https://www.ruby-forum.com/t/once-meta-method-without-module-eval-pickaxe/120154 "2007-11-14T20:39:28Z")

</div>

My impression is that Ruby meta-programming used to lean heavily on evaluating strings as code, but is moving away from that. (Good!) In that spirit, it would be nice to replace this example from Chapter 24, Classes…

---

## [Date.new('2007-09-01') not legal?](https://www.ruby-forum.com/t/date-new-2007-09-01-not-legal/120208)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 3\
**Last updated:** [November 14, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/date-new-2007-09-01-not-legal/120208 "2007-11-14T20:07:14Z")

</div>

Is that form of creating a new date object really not legal? If so, that seems mighty odd. – gw

---

## [Can't modify literal regexp: why?](https://www.ruby-forum.com/t/cant-modify-literal-regexp-why/120117)

<div class="topic-metadata">

**Author:** [@jeremysarda](https://www.ruby-forum.com/u/jeremysarda)\
**Replies:** 4\
**Last updated:** [November 14, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/cant-modify-literal-regexp-why/120117 "2007-11-14T19:59:02Z")

</div>

I was just curious as to why this is illegal. Example: $ irb /blah/.clone SecurityError: can’t modify literal regexp from (irb):1:in initialize\_copy' from (irb):1:inclone’ from (irb):1 Regexp.new(/blah/).clon…

---

## [ANN: DataMapper 0.2.3 Released](https://www.ruby-forum.com/t/ann-datamapper-0-2-3-released/119234)

<div class="topic-metadata">

**Author:** [@sams](https://www.ruby-forum.com/u/sams)\
**Replies:** 1\
**Last updated:** [November 14, 2007, 7:37pm UTC](https://www.ruby-forum.com/t/ann-datamapper-0-2-3-released/119234 "2007-11-14T19:37:23Z")

</div>

DataMapper version 0.2.3 has just been released. DataMapper is a Ruby O/R Mapper based on the Data Mapper Design Pattern. It’s similar to ActiveRecord in usage, with an emphasis on Domain Models. CHANGELOG: – 0.2.3 …

---

## [Get file path of script being executed](https://www.ruby-forum.com/t/get-file-path-of-script-being-executed/120092)

<div class="topic-metadata">

**Author:** [@bado](https://www.ruby-forum.com/u/bado)\
**Replies:** 3\
**Last updated:** [November 14, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/get-file-path-of-script-being-executed/120092 "2007-11-14T19:35:37Z")

</div>

Hi all, I have some directories in my project like: communications model database database/sqlite http Every directory contains scripts, more specifically classes, that are called from a main script Portal.rb locate…

---

## [Put a argument into a Ruby script](https://www.ruby-forum.com/t/put-a-argument-into-a-ruby-script/120192)

<div class="topic-metadata">

**Author:** [@z4n9ief](https://www.ruby-forum.com/u/z4n9ief)\
**Replies:** 2\
**Last updated:** [November 14, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/put-a-argument-into-a-ruby-script/120192 "2007-11-14T18:10:05Z")

</div>

Hi, I would like to send a value in a script by using a argument. For example, that could be my command: $ ./script.rb Hello world And that could be my script: puts “#{$1} #{$2}” But I have try it and it do not wor…

---

## [Checking permissions for config files](https://www.ruby-forum.com/t/checking-permissions-for-config-files/119702)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 2\
**Last updated:** [November 14, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/checking-permissions-for-config-files/119702 "2007-11-14T16:10:48Z")

</div>

I have been trying to find a class that can take in a file path and another argument like group id or read write permissions for different people like root, group and other. The only class i can find that does anythin…

---

## [Why are so many people confused about "Enterprise" software?](https://www.ruby-forum.com/t/why-are-so-many-people-confused-about-enterprise-software/120097)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 9\
**Last updated:** [November 14, 2007, 4:08pm UTC](https://www.ruby-forum.com/t/why-are-so-many-people-confused-about-enterprise-software/120097 "2007-11-14T16:08:07Z")

</div>

Really, why are so many people confused about “Enterprise” software, or what “Enterprise Ruby” would be? Enterprise software is not in any way, faster, more scalable, more reliable, or better written than non enterpri…

---

## [Why this rake db:migrate error](https://www.ruby-forum.com/t/why-this-rake-db-migrate-error/119805)

<div class="topic-metadata">

**Author:** [@darius](https://www.ruby-forum.com/u/darius)\
**Replies:** 4\
**Last updated:** [November 14, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/why-this-rake-db-migrate-error/119805 "2007-11-14T16:01:04Z")

</div>

hello I’m getting a rake db:migrate error which I can’t understand (newbie). – add\_column(:stories, :votes\_count, :integer, {:default=\>0}) rake aborted! Mysql::Error: #42S21Duplicate column name ‘votes\_count’: ALTER …

---

## [Ruby Libraries (and Leopard)](https://www.ruby-forum.com/t/ruby-libraries-and-leopard/120084)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 1\
**Last updated:** [November 14, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/ruby-libraries-and-leopard/120084 "2007-11-14T14:51:47Z")

</div>

Hi, I am wanting to experiment with SVG with Ruby, and although there is no gem for SVG afaik, I downloaded ruby-svg (from http://ruby-svg.sourceforge.jp/). I followed the simple install instructions (just run a rub…

---

## [How to debug failing Kernel.system call](https://www.ruby-forum.com/t/how-to-debug-failing-kernel-system-call/120010)

<div class="topic-metadata">

**Author:** [@BallS\_Donald\_A\_Jr\_S](https://www.ruby-forum.com/u/BallS_Donald_A_Jr_S)\
**Replies:** 3\
**Last updated:** [November 14, 2007, 1:40pm UTC](https://www.ruby-forum.com/t/how-to-debug-failing-kernel-system-call/120010 "2007-11-14T13:40:46Z")

</div>

Hi folks. I’ve got a simple Kernel.system call which is failing: system(‘svn’, ‘commit’, ‘-q’, ‘–non-interactive’, ‘–message’, ‘File updated by dball’, ‘reports/2007-11-11.txt’) with exit code 256. When I run this fro…

---

## [Does Ruby has method properties](https://www.ruby-forum.com/t/does-ruby-has-method-properties/119922)

<div class="topic-metadata">

**Author:** [@thilinamb](https://www.ruby-forum.com/u/thilinamb)\
**Replies:** 15\
**Last updated:** [November 14, 2007, 1:04pm UTC](https://www.ruby-forum.com/t/does-ruby-has-method-properties/119922 "2007-11-14T13:04:24Z")

</div>

In java script it is possible to something like this, method.outputType = “string”; we are setting the return type of the method. Is this possible in Ruby? i searched in the google and found this. http://bias2build.…

---

## [Merb-0.4.0](https://www.ruby-forum.com/t/merb-0-4-0/119667)

<div class="topic-metadata">

**Author:** [@ezra\_z](https://www.ruby-forum.com/u/ezra_z)\
**Replies:** 6\
**Last updated:** [November 14, 2007, 11:15am UTC](https://www.ruby-forum.com/t/merb-0-4-0/119667 "2007-11-14T11:15:57Z")

</div>

Hello Friends- Just a quick note to announce the release of Merb-0.4.0. this is a significant release for the project and has way too many features and changes to list here. You can read about the new changes here on…

---

## [How to reload available rubygems in a long running process](https://www.ruby-forum.com/t/how-to-reload-available-rubygems-in-a-long-running-process/119993)

<div class="topic-metadata">

**Author:** [@tomfarm](https://www.ruby-forum.com/u/tomfarm)\
**Replies:** 5\
**Last updated:** [November 14, 2007, 9:24am UTC](https://www.ruby-forum.com/t/how-to-reload-available-rubygems-in-a-long-running-process/119993 "2007-11-14T09:24:48Z")

</div>

In my Ruby monitoring framework, god, I have the ability to load configuration files into an already running god instance. This allows the user to create new watches without having to restart god. There is a problem, …

---

## [Rubygems: why "Bulk updating Gem source index..."](https://www.ruby-forum.com/t/rubygems-why-bulk-updating-gem-source-index/120134)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 3\
**Last updated:** [November 14, 2007, 8:49am UTC](https://www.ruby-forum.com/t/rubygems-why-bulk-updating-gem-source-index/120134 "2007-11-14T08:49:38Z")

</div>

I get that message almost every time I use a command like: gem query -rn someGem I think once it didn’t say “Bulk Updating”, which takes about 5 minutes. Is there anyway to stop that?

---

## [RubyGems Beta 0.9.4.7](https://www.ruby-forum.com/t/rubygems-beta-0-9-4-7/120156)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [November 14, 2007, 7:45am UTC](https://www.ruby-forum.com/t/rubygems-beta-0-9-4-7/120156 "2007-11-14T07:45:52Z")

</div>

RubyGems 0.9.4.7 is a beta release for the upcoming 0.9.5 which adds several new features and fixes several bugs. To upgrade to the beta: gem update --system --source http://segment7.net/ A tar.gz and .zip of the bet…

---

## [Rails incredibly slow?](https://www.ruby-forum.com/t/rails-incredibly-slow/120149)

<div class="topic-metadata">

**Author:** [@rjeffries](https://www.ruby-forum.com/u/rjeffries)\
**Replies:** 1\
**Last updated:** [November 14, 2007, 7:45am UTC](https://www.ruby-forum.com/t/rails-incredibly-slow/120149 "2007-11-14T07:45:16Z")

</div>

Chet and I installed Instant Rails on our laptops. My laptop is faster than his and has more memory. But his rails is working and mine is infinitely slow. I’ll dump what I know here in hopes that something in it is he…

---

## [Read file into array](https://www.ruby-forum.com/t/read-file-into-array/120142)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 2\
**Last updated:** [November 14, 2007, 7:05am UTC](https://www.ruby-forum.com/t/read-file-into-array/120142 "2007-11-14T07:05:30Z")

</div>

Hello, What are examples of reading a csv file (Comma) into an Array

---

## [Method\_added/define\_method infinite loop](https://www.ruby-forum.com/t/method-added-define-method-infinite-loop/120070)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 7\
**Last updated:** [November 14, 2007, 6:49am UTC](https://www.ruby-forum.com/t/method-added-define-method-infinite-loop/120070 "2007-11-14T06:49:44Z")

</div>

What’s the best way to avoid the classic method\_added/define\_method infinite loop? class X def self.method\_added(name) p name define\_method(name) # do something else end end def foo; end end This will, of cou…

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

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