# Ruby

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

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

---

## [Syscall: string contains null byte](https://www.ruby-forum.com/t/syscall-string-contains-null-byte/193939)

<div class="topic-metadata">

**Author:** [@Hadmut\_D](https://www.ruby-forum.com/u/Hadmut_D)\
**Replies:** 0\
**Last updated:** [August 26, 2010, 9:13pm UTC](https://www.ruby-forum.com/t/syscall-string-contains-null-byte/193939 "2010-08-26T21:13:40Z")

</div>

Hi, is there any chance to ever have bug #20895 fixed? regards Hadmut

---

## [Idiom or method for determining where in the class hierarchy an object fits](https://www.ruby-forum.com/t/idiom-or-method-for-determining-where-in-the-class-hierarchy-an-object-fits/193934)

<div class="topic-metadata">

**Author:** [@Collins](https://www.ruby-forum.com/u/Collins)\
**Replies:** 2\
**Last updated:** [August 26, 2010, 8:40pm UTC](https://www.ruby-forum.com/t/idiom-or-method-for-determining-where-in-the-class-hierarchy-an-object-fits/193934 "2010-08-26T20:40:53Z")

</div>

I have a class hierachy that looks like this class A … end class B \< A … end class C \< A … end class D \< B … end class E \< C … end class F \< B … end Now class B has a method that expects either members…

---

## [Gem install RedCloth](https://www.ruby-forum.com/t/gem-install-redcloth/193927)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 6\
**Last updated:** [August 26, 2010, 8:36pm UTC](https://www.ruby-forum.com/t/gem-install-redcloth/193927 "2010-08-26T20:36:12Z")

</div>

I am just learning Ruby and have become somewhat frustrated on this issue. I am trying to install Redcloth and I keep getting an error back C:\>gem install RedCloth Building native extensions. This could take a while…

---

## [\#attr back to 1.8.6 an older behavior?](https://www.ruby-forum.com/t/attr-back-to-1-8-6-an-older-behavior/193799)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 2\
**Last updated:** [August 26, 2010, 6:38pm UTC](https://www.ruby-forum.com/t/attr-back-to-1-8-6-an-older-behavior/193799 "2010-08-26T18:38:31Z")

</div>

What happened to dropping the optional true/false parameter from #attr in 1.9? About a year or so ago, the method was changed to support multiple symbols, and if you wanted a writer you just add one with an ‘=’ on the…

---

## [Contribution wanted: test your code with 1.9.2-preview3](https://www.ruby-forum.com/t/contribution-wanted-test-your-code-with-1-9-2-preview3/189468)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 5\
**Last updated:** [August 26, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/contribution-wanted-test-your-code-with-1-9-2-preview3/189468 "2010-08-26T16:57:16Z")

</div>

Hi all – As Yugui announced in \[ruby-talk:363558\], we released Ruby-1.9.2- preview3. We are planning to release 1.9.2 in July. To improve that release, we expect your contribution; please test your product, your gem…

---

## [Quickbooks gem](https://www.ruby-forum.com/t/quickbooks-gem/193704)

<div class="topic-metadata">

**Author:** [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Replies:** 11\
**Last updated:** [August 26, 2010, 4:49pm UTC](https://www.ruby-forum.com/t/quickbooks-gem/193704 "2010-08-26T16:49:36Z")

</div>

Hi everyone, Has anyone have any recent notice about www.behindlogic.com - the author of the quickbooks gem? The gem seems to be a great tool for the job of comunicating with quickbooks from a ruby aplication. Howe…

---

## [Warning: method redefined](https://www.ruby-forum.com/t/warning-method-redefined/193813)

<div class="topic-metadata">

**Author:** [@tensaiji](https://www.ruby-forum.com/u/tensaiji)\
**Replies:** 3\
**Last updated:** [August 26, 2010, 4:47pm UTC](https://www.ruby-forum.com/t/warning-method-redefined/193813 "2010-08-26T16:47:16Z")

</div>

Hi, Any idea how to track down warning: method redefined errors? Is there a way to force errors to appear with irb when I load individual files? AFAICS I’ve not redefined anything. It’s all my own, very small library. …

---

## [Lock file while copying](https://www.ruby-forum.com/t/lock-file-while-copying/193804)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 1\
**Last updated:** [August 26, 2010, 3:59pm UTC](https://www.ruby-forum.com/t/lock-file-while-copying/193804 "2010-08-26T15:59:48Z")

</div>

Hi, Is it possible during File.copy to lock that file from any other process? Thanks Aidy

---

## [Ruby and selenium for a newbie](https://www.ruby-forum.com/t/ruby-and-selenium-for-a-newbie/193919)

<div class="topic-metadata">

**Author:** [@bskaggs](https://www.ruby-forum.com/u/bskaggs)\
**Replies:** 0\
**Last updated:** [August 26, 2010, 3:40pm UTC](https://www.ruby-forum.com/t/ruby-and-selenium-for-a-newbie/193919 "2010-08-26T15:40:45Z")

</div>

Hi I am looking at automation using selenium with the ruby api, and am having a little problem. im not sure other than making @selenium into a global variable how can i use it across multiple files. so i have three …

---

## [Math::atan2(0, 0) on ruby 1.9.2](https://www.ruby-forum.com/t/math-atan2-0-0-on-ruby-1-9-2/193688)

<div class="topic-metadata">

**Author:** [@kubo](https://www.ruby-forum.com/u/kubo)\
**Replies:** 17\
**Last updated:** [August 26, 2010, 2:29pm UTC](https://www.ruby-forum.com/t/math-atan2-0-0-on-ruby-1-9-2/193688 "2010-08-26T14:29:42Z")

</div>

e$B5WJ\]$G$9!#e(B ruby 1.9.2 e$B$G$Oe(B Math::atan2(0, 0) e$B$,Nc30$r\>e$2$k$h$&$KJQ99$5$l$F$$$^$9e(B e$B$,!“85$KLa$7$?$\[$&$,NI$/$”$j$^$;$s$+!)e(B e$B0J2\<!"@bL@!#e(B 1.9.1 e$B0JA0$G$Oe(B Math::atan2(0, 0) e$B$O0z?t$N…

---

## [Some odd ball optimization tricks](https://www.ruby-forum.com/t/some-odd-ball-optimization-tricks/193878)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 2\
**Last updated:** [August 26, 2010, 11:10am UTC](https://www.ruby-forum.com/t/some-odd-ball-optimization-tricks/193878 "2010-08-26T11:10:39Z")

</div>

Here are two idioms which you may find useful, or at least curious, when trying to optimize the heck out of a Ruby script… require ‘pp’ Similar to the “autosequence” facility in SQL. Useful for replacing a complex key…

---

## [Gems in a jar](https://www.ruby-forum.com/t/gems-in-a-jar/193898)

<div class="topic-metadata">

**Author:** [@jlandrei](https://www.ruby-forum.com/u/jlandrei)\
**Replies:** 0\
**Last updated:** [August 26, 2010, 10:48am UTC](https://www.ruby-forum.com/t/gems-in-a-jar/193898 "2010-08-26T10:48:16Z")

</div>

hello, i installed gems in mesgems.jar my jar is in the classpath of my application, but rubygem don-t see my gems i try to do Gem.clear\_all\_paths to reload gems how can i define the classpath as the gem\_path?

---

## [\[Bug #3742\] failed to allocate memory: /^()(?\>\\g\<1\>)\*$/ on x64-mswin64](https://www.ruby-forum.com/t/bug-3742-failed-to-allocate-memory-g-1-on-x64-mswin64/193826)

<div class="topic-metadata">

**Author:** [@shintaro\_kuwamoto](https://www.ruby-forum.com/u/shintaro_kuwamoto)\
**Replies:** 5\
**Last updated:** [August 26, 2010, 7:01am UTC](https://www.ruby-forum.com/t/bug-3742-failed-to-allocate-memory-g-1-on-x64-mswin64/193826 "2010-08-26T07:01:16Z")

</div>

Bug #3742: failed to allocate memory: /^()(?\>\\g\<1\>)\*$/ on x64-mswin64 http://redmine.ruby-lang.org/issues/show/3742 e$B5/I\<\<Te(B: shintaro kuwamoto e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: core, T…

---

## [Convert array of object to xml](https://www.ruby-forum.com/t/convert-array-of-object-to-xml/193772)

<div class="topic-metadata">

**Author:** [@Shyam\_Krishna\_K](https://www.ruby-forum.com/u/Shyam_Krishna_K)\
**Replies:** 4\
**Last updated:** [August 26, 2010, 5:08am UTC](https://www.ruby-forum.com/t/convert-array-of-object-to-xml/193772 "2010-08-26T05:08:38Z")

</div>

Hi all, I have an array containing objects of different classes.Each class is basically hash containing attribute/value pairs. Now how can we convert it to xml format? Any suggestions will be appreciated.

---

## [Getting HttpServletRequest from rails to Java class](https://www.ruby-forum.com/t/getting-httpservletrequest-from-rails-to-java-class/193852)

<div class="topic-metadata">

**Author:** [@yani\_engico](https://www.ruby-forum.com/u/yani_engico)\
**Replies:** 3\
**Last updated:** [August 25, 2010, 10:46pm UTC](https://www.ruby-forum.com/t/getting-httpservletrequest-from-rails-to-java-class/193852 "2010-08-25T22:46:03Z")

</div>

Hi, We have a rails app, from which i want to send the form post parameters to a java class. I am using request.env\[‘java.servlet\_request’\] to get the HttpServletRequest obj and pass it to the java class. However i…

---

## [Logging with Trinidad?](https://www.ruby-forum.com/t/logging-with-trinidad/193869)

<div class="topic-metadata">

**Author:** [@noagenda](https://www.ruby-forum.com/u/noagenda)\
**Replies:** 3\
**Last updated:** [August 25, 2010, 10:20pm UTC](https://www.ruby-forum.com/t/logging-with-trinidad/193869 "2010-08-25T22:20:17Z")

</div>

I’m starting to use Trinidad, and one of the first things I noticed is that it doesn’t write to the normal rails log at all. I don’t see anything in the doc about custom trindad logging, but it looks like I’m not the…

---

## [Configuration management tool](https://www.ruby-forum.com/t/configuration-management-tool/193842)

<div class="topic-metadata">

**Author:** [@beer](https://www.ruby-forum.com/u/beer)\
**Replies:** 1\
**Last updated:** [August 25, 2010, 9:00pm UTC](https://www.ruby-forum.com/t/configuration-management-tool/193842 "2010-08-25T21:00:39Z")

</div>

Hello all. I wanted to use Puppy to maintain configuration for some Windows servers, but apparently the port is not mature yet for Win32. So, I’m thinking of implementing it myself. My needs are simple: copy files …

---

## [getClass().getRessource('monFichier.txt')](https://www.ruby-forum.com/t/getclass-getressource-monfichier-txt/193816)

<div class="topic-metadata">

**Author:** [@jlandrei](https://www.ruby-forum.com/u/jlandrei)\
**Replies:** 3\
**Last updated:** [August 25, 2010, 7:26pm UTC](https://www.ruby-forum.com/t/getclass-getressource-monfichier-txt/193816 "2010-08-25T19:26:23Z")

</div>

Hello. I’m working with jruby (without rails). I need to get a ressource file in my jar. In java, I can do this with getClass().getRessource(‘monFichier.txt’) How can i do this with jRuby?

---

## [Configuration Management](https://www.ruby-forum.com/t/configuration-management/193847)

<div class="topic-metadata">

**Author:** [@beer](https://www.ruby-forum.com/u/beer)\
**Replies:** 2\
**Last updated:** [August 25, 2010, 3:46pm UTC](https://www.ruby-forum.com/t/configuration-management/193847 "2010-08-25T15:46:18Z")

</div>

Hello all. I wanted to use Puppy to maintain configuration for some Windows servers, but apparently the port is not mature yet on Win32. So, I’m thinking of implementing it myself. My needs are simple: copy files ov…

---

## [Mongrel1.1.6 Installation not working with Ruby 1.9.1 in Win](https://www.ruby-forum.com/t/mongrel1-1-6-installation-not-working-with-ruby-1-9-1-in-win/193692)

<div class="topic-metadata">

**Author:** [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Replies:** 8\
**Last updated:** [August 25, 2010, 12:32pm UTC](https://www.ruby-forum.com/t/mongrel1-1-6-installation-not-working-with-ruby-1-9-1-in-win/193692 "2010-08-25T12:32:22Z")

</div>

Hi There, I am facing with this problem where I am trying to install mongrel in my dev env having developed an application with Ruby 1.9.1, rails 2.3.5 and in Windows. When I use WeBrick the aplication works perfectly…

---

## [Character encoding problem](https://www.ruby-forum.com/t/character-encoding-problem/193831)

<div class="topic-metadata">

**Author:** [@dgaj](https://www.ruby-forum.com/u/dgaj)\
**Replies:** 2\
**Last updated:** [August 25, 2010, 12:25pm UTC](https://www.ruby-forum.com/t/character-encoding-problem/193831 "2010-08-25T12:25:27Z")

</div>

I am getting an encoding problem when trying to write an xml file out after it generated by a StringTemplater (http://github.com/starapor/slippers/tree/). I am using the templater to generate an xml file from within C…

---

## [HTTPClient Suddenly Fails - Cannot Verify Certificate File](https://www.ruby-forum.com/t/httpclient-suddenly-fails-cannot-verify-certificate-file/193821)

<div class="topic-metadata">

**Author:** [@mperham](https://www.ruby-forum.com/u/mperham)\
**Replies:** 3\
**Last updated:** [August 25, 2010, 8:12am UTC](https://www.ruby-forum.com/t/httpclient-suddenly-fails-cannot-verify-certificate-file/193821 "2010-08-25T08:12:57Z")

</div>

Today (Tues. Aug 24 2010) using HTTPClient for a SSL connection fails. It was working fine previously. The issue is not with the server at the other end but with httpclient reading its local cert. file. the error is: …

---

## [Gem list --remote does not work on windows running ruby 1.9.2p0](https://www.ruby-forum.com/t/gem-list-remote-does-not-work-on-windows-running-ruby-1-9-2p0/193791)

<div class="topic-metadata">

**Author:** [@botp](https://www.ruby-forum.com/u/botp)\
**Replies:** 8\
**Last updated:** [August 25, 2010, 7:39am UTC](https://www.ruby-forum.com/t/gem-list-remote-does-not-work-on-windows-running-ruby-1-9-2p0/193791 "2010-08-25T07:39:07Z")

</div>

Title says all. This q is mainly for LuisL, but maybe someone has encountered it already… I plan to modify gem.bat, but maybe there is a better way, so the q… many thanks to Luis for a great ruby package for windows. …

---

## [Vc9 x64$B$G(Btrunk dl$B$,%3%s%Q%$%k$G$-$J$$(B](https://www.ruby-forum.com/t/vc9-x64-b-g-btrunk-dl-b-3-s-q-k-g-j-b/193779)

<div class="topic-metadata">

**Author:** [@kuwamoto\_shintaro](https://www.ruby-forum.com/u/kuwamoto_shintaro)\
**Replies:** 5\
**Last updated:** [August 25, 2010, 5:29am UTC](https://www.ruby-forum.com/t/vc9-x64-b-g-btrunk-dl-b-3-s-q-k-g-j-b/193779 "2010-08-25T05:29:13Z")

</div>

e$B$3$s$K$A$oe(B trunke$B$re(BVC9 x64-mswin64e$B$G%S%k%I$7$h$&$H$9$k$He(Bdle$B$N%3%s%Q%$%k;~$KFbIt%(%i!\<$,H/@8$7%3%s%Q%$%k$G$-$^$;$s!#e(B compiling dl cl -nologo -I. -I…/…/.ext/include/x64-mswin64\_90 -I…/…/…/include…

---

## [Error with Rails and DBI::Date](https://www.ruby-forum.com/t/error-with-rails-and-dbi-date/188429)

<div class="topic-metadata">

**Author:** [@shayfriedman](https://www.ruby-forum.com/u/shayfriedman)\
**Replies:** 5\
**Last updated:** [August 25, 2010, 12:13am UTC](https://www.ruby-forum.com/t/error-with-rails-and-dbi-date/188429 "2010-08-25T00:13:46Z")

</div>

Hi guys, I’m on a new computer and I’m trying to run rails (via IronRuby) for the first time here. I have installed the rake, rails and activerecord-adonet-sqlserver gems, added the config.gem line to environment.rb …

---

## [Ruby Code Parsing](https://www.ruby-forum.com/t/ruby-code-parsing/193505)

<div class="topic-metadata">

**Author:** [@jnb](https://www.ruby-forum.com/u/jnb)\
**Replies:** 14\
**Last updated:** [August 24, 2010, 6:44pm UTC](https://www.ruby-forum.com/t/ruby-code-parsing/193505 "2010-08-24T18:44:34Z")

</div>

I have a Perl friend asking me questions about how ruby parses its code. Things like, how does it know where a statement ends and where can you and can’t you put new lines – basically trying to understand how Ruby dif…

---

## [Using fetch\_fields in MySQL for Windows](https://www.ruby-forum.com/t/using-fetch-fields-in-mysql-for-windows/193769)

<div class="topic-metadata">

**Author:** [@yuvalrooz](https://www.ruby-forum.com/u/yuvalrooz)\
**Replies:** 2\
**Last updated:** [August 24, 2010, 6:21pm UTC](https://www.ruby-forum.com/t/using-fetch-fields-in-mysql-for-windows/193769 "2010-08-24T18:21:54Z")

</div>

Hey, Kind of new to ruby. I installed 1.9.1 on windows with my sql server. I’m logging to the database and able to query the DB and get the results properly. When I try to get meta data from the query like fetch\_fie…

---

## [Static code analysis in Ruby 1.9](https://www.ruby-forum.com/t/static-code-analysis-in-ruby-1-9/193759)

<div class="topic-metadata">

**Author:** [@hubertlepicki](https://www.ruby-forum.com/u/hubertlepicki)\
**Replies:** 5\
**Last updated:** [August 24, 2010, 6:07pm UTC](https://www.ruby-forum.com/t/static-code-analysis-in-ruby-1-9/193759 "2010-08-24T18:07:33Z")

</div>

Hi guys, I am wondering if there is any way to perform sort of static code analysis for Ruby 1.9 based programs. I don’t need nothing fancy, just some sort of “code complexity” metric that I could analyse over time. …

---

## [Nokogiri SAX parser encoding problem](https://www.ruby-forum.com/t/nokogiri-sax-parser-encoding-problem/193788)

<div class="topic-metadata">

**Author:** [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Replies:** 7\
**Last updated:** [August 24, 2010, 3:49pm UTC](https://www.ruby-forum.com/t/nokogiri-sax-parser-encoding-problem/193788 "2010-08-24T15:49:30Z")

</div>

According to Nokogiri’s doc, it works internally in UTF-8. Running this : encoding: utf-8 require ‘nokogiri’ class MyDoc \< Nokogiri::XML::SAX::Document def characters(string) puts string.encoding puts string end …

---

## [Newbie question on file reading](https://www.ruby-forum.com/t/newbie-question-on-file-reading/193794)

<div class="topic-metadata">

**Author:** [@raj\_plays](https://www.ruby-forum.com/u/raj_plays)\
**Replies:** 8\
**Last updated:** [August 24, 2010, 3:41pm UTC](https://www.ruby-forum.com/t/newbie-question-on-file-reading/193794 "2010-08-24T15:41:26Z")

</div>

Hi, I have got the code to read a file line by line amd it works too but I don’t understand it. fp = File.open(dataFile, “r”) fp.each\_line do |line| puts line end My question is: the “open” method is not mentioned…

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

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