# Ruby

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

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

---

## [Error on test case](https://www.ruby-forum.com/t/error-on-test-case/192062)

<div class="topic-metadata">

**Author:** [@ngng](https://www.ruby-forum.com/u/ngng)\
**Replies:** 1\
**Last updated:** [July 23, 2010, 8:44am UTC](https://www.ruby-forum.com/t/error-on-test-case/192062 "2010-07-23T08:44:06Z")

</div>

On some of my test cases (that almost certainly fail anyway right now), I’m getting the following error message: NameError: uninitialized constant Test::Unit::Assertions::AssertionMessage::PP Has anyone else seen th…

---

## [Web-based code editor](https://www.ruby-forum.com/t/web-based-code-editor/150129)

<div class="topic-metadata">

**Author:** [@leveille](https://www.ruby-forum.com/u/leveille)\
**Replies:** 2\
**Last updated:** [July 23, 2010, 7:58am UTC](https://www.ruby-forum.com/t/web-based-code-editor/150129 "2010-07-23T07:58:27Z")

</div>

Does anyone know of a tool that is just like Scite but a web application? This is the closest thing I’ve found: http://www.april-child.com/amy/amy.php I’m not looking to deploy apps online like what you do with Herok…

---

## [RCR getch](https://www.ruby-forum.com/t/rcr-getch/191126)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 6\
**Last updated:** [July 23, 2010, 5:41am UTC](https://www.ruby-forum.com/t/rcr-getch/191126 "2010-07-23T05:41:50Z")

</div>

It would be quite convenient to have a getch method in Ruby. Any opposition to my suggesting its addition to core? -r

---

## [\[bug:trunk\] undefined symbol: strlcpy](https://www.ruby-forum.com/t/bug-trunk-undefined-symbol-strlcpy/192050)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [July 23, 2010, 2:07am UTC](https://www.ruby-forum.com/t/bug-trunk-undefined-symbol-strlcpy/192050 "2010-07-23T02:07:20Z")

</div>

e$B0J2\<$N$h$&$Ke(B test\_pty.rb e$B$Ge(B undefined symbol: strlcpy e$B$K$J$j$^$9!#e(B % ./ruby test/test\_pty.rb Loaded suite test/test\_pty Started ./ruby: symbol lookup error: /home/akr/chkbuild/tmp/build/ruby-trunk…

---

## [HowTo get ruby to report a sumbolic link?](https://www.ruby-forum.com/t/howto-get-ruby-to-report-a-sumbolic-link/192043)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 4\
**Last updated:** [July 23, 2010, 12:33am UTC](https://www.ruby-forum.com/t/howto-get-ruby-to-report-a-sumbolic-link/192043 "2010-07-23T00:33:59Z")

</div>

I am creating a series of symbolic links to target directories. I wish to check to see if the symbolic link exists or not. When I do this (using rspec): File.stat(@soft\_link\_target).ftype.should == ‘link’ I get thi…

---

## [Emacs Ruby mode bug](https://www.ruby-forum.com/t/emacs-ruby-mode-bug/192046)

<div class="topic-metadata">

**Author:** [@jnb](https://www.ruby-forum.com/u/jnb)\
**Replies:** 1\
**Last updated:** [July 23, 2010, 12:25am UTC](https://www.ruby-forum.com/t/emacs-ruby-mode-bug/192046 "2010-07-23T00:25:29Z")

</div>

Hi. Does anybody know where I am supposed to go to report a bug in this software extension?: http://www.emacswiki.org/emacs/RubyMode I found a case where ruby mode is not parsing the Ruby code correctly. Google searc…

---

## [Code Review: UnusedVariables](https://www.ruby-forum.com/t/code-review-unusedvariables/192045)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [July 22, 2010, 10:11pm UTC](https://www.ruby-forum.com/t/code-review-unusedvariables/192045 "2010-07-22T22:11:59Z")

</div>

tfpt review “/shelveset:UnusedVariables;REDMOND\\tomat” DLR: Removes unused variable definitions. Tomas

---

## [Finding last line in a file](https://www.ruby-forum.com/t/finding-last-line-in-a-file/191996)

<div class="topic-metadata">

**Author:** [@tedforte](https://www.ruby-forum.com/u/tedforte)\
**Replies:** 14\
**Last updated:** [July 22, 2010, 8:14pm UTC](https://www.ruby-forum.com/t/finding-last-line-in-a-file/191996 "2010-07-22T20:14:50Z")

</div>

Hi everyone, Is there a one line command to do this? I mean currently I use File.foreach(inFile) do |line| … done I could do this with a counter, but that is SO UGLY, and I want to do an operation on that very las…

---

## [Memory profiling with JRuby](https://www.ruby-forum.com/t/memory-profiling-with-jruby/191303)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 1\
**Last updated:** [July 22, 2010, 7:00pm UTC](https://www.ruby-forum.com/t/memory-profiling-with-jruby/191303 "2010-07-22T19:00:04Z")

</div>

Many of you have asked how to inspect a running JRuby instance’s memory layout, so I finally wrote up a blog post on the tools I use most often: jmap/jhat and VisualVM. I hope you’ll all play with the tools and writ…

---

## [Enumerators and generators](https://www.ruby-forum.com/t/enumerators-and-generators/191993)

<div class="topic-metadata">

**Author:** [@Hal\_F](https://www.ruby-forum.com/u/Hal_F)\
**Replies:** 7\
**Last updated:** [July 22, 2010, 6:28pm UTC](https://www.ruby-forum.com/t/enumerators-and-generators/191993 "2010-07-22T18:28:52Z")

</div>

Hi, all… I’m trying to grasp when/why one might use a generator instead of an enumerator (or vice versa). I’ve used generators, but enumerators are newer to me. I’ve heard one person’s take on this (thanks David!) bu…

---

## [Two Question](https://www.ruby-forum.com/t/two-question/192008)

<div class="topic-metadata">

**Author:** [@amiref](https://www.ruby-forum.com/u/amiref)\
**Replies:** 4\
**Last updated:** [July 22, 2010, 3:58pm UTC](https://www.ruby-forum.com/t/two-question/192008 "2010-07-22T15:58:59Z")

</div>

Hi everybody I have two question : 1 - What is the exact meaning of Literals in Ruby ? 2 - What is the use of “puts” in Ruby and what is diffrence between “puts” and “print” ?

---

## [Programming Ruby, PDF format](https://www.ruby-forum.com/t/programming-ruby-pdf-format/192003)

<div class="topic-metadata">

**Author:** [@marlon](https://www.ruby-forum.com/u/marlon)\
**Replies:** 2\
**Last updated:** [July 22, 2010, 3:46pm UTC](https://www.ruby-forum.com/t/programming-ruby-pdf-format/192003 "2010-07-22T15:46:41Z")

</div>

Is “Programming Ruby, The Pragmatic Programmer’s Guide” available in PDF format? I don’t have access to the net everyday. http://www.ruby-doc.org/docs/ProgrammingRuby/ Thanks!

---

## [How to make "gem install rmagick" work?](https://www.ruby-forum.com/t/how-to-make-gem-install-rmagick-work/191966)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 10\
**Last updated:** [July 22, 2010, 3:41pm UTC](https://www.ruby-forum.com/t/how-to-make-gem-install-rmagick-work/191966 "2010-07-22T15:41:42Z")

</div>

I wanted to install rmagick on Win7 but it can’t install: Is there any way to make it work? C:\\\>gem list -r rmagick \*\*\* REMOTE GEMS \*\*\* rmagick (2.13.1) rmagick4j (0.3.7, 0.3.4 java) C:\\\>gem install rmagick Buildin…

---

## [Syswrite changes from 1.8 to 1.9](https://www.ruby-forum.com/t/syswrite-changes-from-1-8-to-1-9/192023)

<div class="topic-metadata">

**Author:** [@virgin](https://www.ruby-forum.com/u/virgin)\
**Replies:** 2\
**Last updated:** [July 22, 2010, 3:16pm UTC](https://www.ruby-forum.com/t/syswrite-changes-from-1-8-to-1-9/192023 "2010-07-22T15:16:33Z")

</div>

Hi guys, I have a ruby script which is scraping a website with Hpricot. I am creating an xml and an sql file from data scraped. it was working well under 1.8, but I have upgraded to 1.9 (because of character encoding)…

---

## [\[patch\] building Microsoft.Scripting.Core on Mono](https://www.ruby-forum.com/t/patch-building-microsoft-scripting-core-on-mono/192024)

<div class="topic-metadata">

**Author:** [@Jb\_Evain](https://www.ruby-forum.com/u/Jb_Evain)\
**Replies:** 0\
**Last updated:** [July 22, 2010, 2:58pm UTC](https://www.ruby-forum.com/t/patch-building-microsoft-scripting-core-on-mono/192024 "2010-07-22T14:58:40Z")

</div>

Hey, In the same vein of the patch to build Microsoft.Scripting.Metadata on Mono, the attached patch shows unused variables, triggering a build failure as Microsoft.Scripting.Core is being built with warnaserror+.

---

## [Inspect](https://www.ruby-forum.com/t/inspect/192016)

<div class="topic-metadata">

**Author:** [@amiref](https://www.ruby-forum.com/u/amiref)\
**Replies:** 1\
**Last updated:** [July 22, 2010, 2:44pm UTC](https://www.ruby-forum.com/t/inspect/192016 "2010-07-22T14:44:02Z")

</div>

Hi What is the use of “inspect”? for example in this code: array = \[1,2,3,4,5\] =\> \[1, 2, 3, 4, 5\] array2 = \[1, “2”, 3.0, \[“a”, “b”\], “dog”\] =\> \[1, “2”, 3.0, \[“a”, “b”\], “dog”\] array.inspect =\> “\[1, 2, 3, 4, 5\]” arr…

---

## [Split](https://www.ruby-forum.com/t/split/192020)

<div class="topic-metadata">

**Author:** [@amiref](https://www.ruby-forum.com/u/amiref)\
**Replies:** 1\
**Last updated:** [July 22, 2010, 2:42pm UTC](https://www.ruby-forum.com/t/split/192020 "2010-07-22T14:42:16Z")

</div>

What is the use of “split”? for example if I have this variable : x=“1,2,3,4,5” , and I type r=x.splite(’,’) then type r , I will see \[“1”, “2”, “3”, “4”, “5”\]. And when I type t = x.split("-") ( or t=x.split("&") or…

---

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

<div class="topic-metadata">

**Author:** [@Song\_C](https://www.ruby-forum.com/u/Song_C)\
**Replies:** 0\
**Last updated:** [July 22, 2010, 1:44pm UTC](https://www.ruby-forum.com/t/unsubscribe/192019 "2010-07-22T13:44:52Z")

</div>

unsubscribe

---

## [Spanish payment solution](https://www.ruby-forum.com/t/spanish-payment-solution/192013)

<div class="topic-metadata">

**Author:** [@niklo](https://www.ruby-forum.com/u/niklo)\
**Replies:** 0\
**Last updated:** [July 22, 2010, 12:45pm UTC](https://www.ruby-forum.com/t/spanish-payment-solution/192013 "2010-07-22T12:45:06Z")

</div>

Hi, Im building a web site for a spanish company and we need to implement a payment solution. Im using Santander with Sistema 4b (Internet Pasat 5.3) atm. Does anyone know a better payment solution to work with or ev…

---

## [Method error](https://www.ruby-forum.com/t/method-error/226074)

<div class="topic-metadata">

**Author:** [@jochem](https://www.ruby-forum.com/u/jochem)\
**Replies:** 0\
**Last updated:** [July 22, 2010, 12:16pm UTC](https://www.ruby-forum.com/t/method-error/226074 "2010-07-22T12:16:50Z")

</div>

I use sipsorcery for my SIP-calls, which uses a ruby dialplan. The dialplan i got from My "One for All" Ruby plan \*\* Updated 08-Oct-08 - SIP Sorcery Community Forums raises an exception when I make an outgoing call. U…

---

## [Download button - how to get file with mechanize](https://www.ruby-forum.com/t/download-button-how-to-get-file-with-mechanize/192007)

<div class="topic-metadata">

**Author:** [@zak](https://www.ruby-forum.com/u/zak)\
**Replies:** 0\
**Last updated:** [July 22, 2010, 11:25am UTC](https://www.ruby-forum.com/t/download-button-how-to-get-file-with-mechanize/192007 "2010-07-22T11:25:30Z")

</div>

hi, i’m having problems to access the content of a (csv-)file behind a download-button inside a form: ... ... any idea how to read or download the file? form.click\_button(form.button\_with(‘ctl00$cphContent $btnDo…

---

## [Functions to escape and unescape strings in rails](https://www.ruby-forum.com/t/functions-to-escape-and-unescape-strings-in-rails/192002)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 0\
**Last updated:** [July 22, 2010, 9:02am UTC](https://www.ruby-forum.com/t/functions-to-escape-and-unescape-strings-in-rails/192002 "2010-07-22T09:02:01Z")

</div>

i have created an appliation to show the pie chart in pdf, now its showing properly, but the thing is that its not showing the labels correctly, can anyone help me, pdf of tht ia attached with this. also i …

---

## [Return nothing when looking outside the bounds of 2D array?](https://www.ruby-forum.com/t/return-nothing-when-looking-outside-the-bounds-of-2d-array/191592)

<div class="topic-metadata">

**Author:** [@b1\_S](https://www.ruby-forum.com/u/b1_S)\
**Replies:** 21\
**Last updated:** [July 22, 2010, 8:38am UTC](https://www.ruby-forum.com/t/return-nothing-when-looking-outside-the-bounds-of-2d-array/191592 "2010-07-22T08:38:03Z")

</div>

I have a 2D Array. I have written a method Array2D.adjacent(x,y,direction) that returns the adjacent cell to x,y in the direction given. How do I deal with the boundary conditions without receiving an error message. F…

---

## [File class documentation](https://www.ruby-forum.com/t/file-class-documentation/191957)

<div class="topic-metadata">

**Author:** [@James\_OSBrien](https://www.ruby-forum.com/u/James_OSBrien)\
**Replies:** 10\
**Last updated:** [July 22, 2010, 8:30am UTC](https://www.ruby-forum.com/t/file-class-documentation/191957 "2010-07-22T08:30:26Z")

</div>

Hi, I’ve been trying to learn about and use the ruby File class. when I look at the documentation: http://ruby-doc.org/core/classes/File.html I cant see any mention that File \< IO (it is a subclass and hence there a…

---

## [WARNING: YAML.add\_builtin\_type is not implemented](https://www.ruby-forum.com/t/warning-yaml-add-builtin-type-is-not-implemented/191875)

<div class="topic-metadata">

**Author:** [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Replies:** 2\
**Last updated:** [July 22, 2010, 3:04am UTC](https://www.ruby-forum.com/t/warning-yaml-add-builtin-type-is-not-implemented/191875 "2010-07-22T03:04:11Z")

</div>

Hi all: I have the following gems installed actionmailer (2.3.8) actionpack (2.3.8) activerecord (2.3.8) activerecord-sqlserver-adapter (2.3.8) activeresource (2.3.8) activesupport (2.3.8) dbi (0.4.3) deprecated …

---

## [Writing to file delay](https://www.ruby-forum.com/t/writing-to-file-delay/191991)

<div class="topic-metadata">

**Author:** [@maraby](https://www.ruby-forum.com/u/maraby)\
**Replies:** 5\
**Last updated:** [July 22, 2010, 2:55am UTC](https://www.ruby-forum.com/t/writing-to-file-delay/191991 "2010-07-22T02:55:58Z")

</div>

Hello All, I am having a very annoying issue. This is the situation: I am reading a file on one machine that is continuosly being written to and writing out to a socket. On another machine I am reading from the soc…

---

## [Ruby abstraction](https://www.ruby-forum.com/t/ruby-abstraction/191761)

<div class="topic-metadata">

**Author:** [@James\_OSBrien](https://www.ruby-forum.com/u/James_OSBrien)\
**Replies:** 16\
**Last updated:** [July 22, 2010, 2:25am UTC](https://www.ruby-forum.com/t/ruby-abstraction/191761 "2010-07-22T02:25:47Z")

</div>

Hi, I’m a newbie with a background in Java. I’ve just about finished working through an introductory ruby book and I didn’t see anything about abstract classes or indeed interfaces. I have found the concept of an in…

---

## [Error Compiling Ruby](https://www.ruby-forum.com/t/error-compiling-ruby/191870)

<div class="topic-metadata">

**Author:** [@kotakotakota](https://www.ruby-forum.com/u/kotakotakota)\
**Replies:** 5\
**Last updated:** [July 21, 2010, 11:55pm UTC](https://www.ruby-forum.com/t/error-compiling-ruby/191870 "2010-07-21T23:55:52Z")

</div>

Hello, I am new to Ruby, and I have played around a bit using a pre-built package of 1.8.7. I am running openSUSE 11.3 64-bit, and I am trying to compile 1.9.1. For some reason, I seem to keep running into this pro…

---

## [How to check if x is a multiple of y](https://www.ruby-forum.com/t/how-to-check-if-x-is-a-multiple-of-y/191964)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 8\
**Last updated:** [July 21, 2010, 8:50pm UTC](https://www.ruby-forum.com/t/how-to-check-if-x-is-a-multiple-of-y/191964 "2010-07-21T20:50:18Z")

</div>

Hi there, what’s the most simple solution in Ruby to check if value x is a multiple of y? “if x/y.integer?” …is obviously not the solution. Thanks a lot! Tom

---

## [Help in reading metastock files](https://www.ruby-forum.com/t/help-in-reading-metastock-files/191982)

<div class="topic-metadata">

**Author:** [@gabutz](https://www.ruby-forum.com/u/gabutz)\
**Replies:** 0\
**Last updated:** [July 21, 2010, 8:45pm UTC](https://www.ruby-forum.com/t/help-in-reading-metastock-files/191982 "2010-07-21T20:45:07Z")

</div>

Hi, does anyone know how to read metastock files using ruby ?

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

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