# Ruby

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

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

---

## [Affine math library](https://www.ruby-forum.com/t/affine-math-library/151953)

<div class="topic-metadata">

**Author:** [@ol1barn3s](https://www.ruby-forum.com/u/ol1barn3s)\
**Replies:** 1\
**Last updated:** [October 28, 2008, 8:44pm UTC](https://www.ruby-forum.com/t/affine-math-library/151953 "2008-10-28T20:44:20Z")

</div>

Hey, I am looking for a math library for doing affine maths like interscting some primitives (point, line, halfspace, convex polyedron etc) I want to rasterize a triangle over a rectangular grid and it does not have…

---

## [OSX: Can't install RMagick. Can't find the ImageMagick lib](https://www.ruby-forum.com/t/osx-cant-install-rmagick-cant-find-the-imagemagick-lib/151991)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 5\
**Last updated:** [October 28, 2008, 7:48pm UTC](https://www.ruby-forum.com/t/osx-cant-install-rmagick-cant-find-the-imagemagick-lib/151991 "2008-10-28T19:48:36Z")

</div>

Hi all I’m trying to install RMagick because one of my used plugins for RoR needs it. But I have no idea how to do this. So I just tried sudo gem install rmagick But I’m getting the following error: Building native …

---

## [SIGSEGV in ld-linux.so when compiling recent JRuby versions (\> rev #7907) \[SOLVED\]](https://www.ruby-forum.com/t/sigsegv-in-ld-linux-so-when-compiling-recent-jruby-versions-rev-7907-solved/151934)

<div class="topic-metadata">

**Author:** [@RaphaSSSSl\_Valyi](https://www.ruby-forum.com/u/RaphaSSSSl_Valyi)\
**Replies:** 1\
**Last updated:** [October 28, 2008, 7:29pm UTC](https://www.ruby-forum.com/t/sigsegv-in-ld-linux-so-when-compiling-recent-jruby-versions-rev-7907-solved/151934 "2008-10-28T19:29:13Z")

</div>

Hi, just in case, to help the average googler: Since commit #7907, I had a strange bug when compiling JRuby with ant jar-complete: jar-complete: \[mkdir\] Created dir: /home/rvalyi/DEV/jruby\_old/build/jar-complete/MET…

---

## [Captcha](https://www.ruby-forum.com/t/captcha/137598)

<div class="topic-metadata">

**Author:** [@shweta\_kadam](https://www.ruby-forum.com/u/shweta_kadam)\
**Replies:** 2\
**Last updated:** [October 28, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/captcha/137598 "2008-10-28T19:02:06Z")

</div>

Hello everyone, I’m trying to implement Captcha in my program. I m using 'Captcha gem' for the same but while executing it i got error regarding GD. I've installed gd-2 still the same error . Ca…

---

## [Download files from mail](https://www.ruby-forum.com/t/download-files-from-mail/151959)

<div class="topic-metadata">

**Author:** [@neia](https://www.ruby-forum.com/u/neia)\
**Replies:** 3\
**Last updated:** [October 28, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/download-files-from-mail/151959 "2008-10-28T18:34:50Z")

</div>

Hi, I’m trying to download a file with net::IMAP from mail count. I can download plain texts files using fetch method and unpack’m’, but when i try it with an excel file (vnd.ms-excel), the downloaded excel is corrup…

---

## [Manual Testing](https://www.ruby-forum.com/t/manual-testing/151402)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 2\
**Last updated:** [October 28, 2008, 6:30pm UTC](https://www.ruby-forum.com/t/manual-testing/151402 "2008-10-28T18:30:51Z")

</div>

I’m trying to figure out a good way to incorporate manual testing into automated testing. I have a little snippet of what I’ve been working on at 7901’s gists · GitHub It basically assumes a manual test has a descript…

---

## [Warbler 0.9.11 Accesses DB?](https://www.ruby-forum.com/t/warbler-0-9-11-accesses-db/151938)

<div class="topic-metadata">

**Author:** [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Replies:** 2\
**Last updated:** [October 28, 2008, 4:02pm UTC](https://www.ruby-forum.com/t/warbler-0-9-11-accesses-db/151938 "2008-10-28T16:02:23Z")

</div>

One of our build environments failed when I upgraded Warbler to 0.9.11. When it the task initializes, its apparently trying to access the database (it doesn’t have access): /usr/bin/ruby18 -S warble war:clean (in /va…

---

## [\[Bug:1.9\] nkf with --numchar-input dumps core](https://www.ruby-forum.com/t/bug-1-9-nkf-with-numchar-input-dumps-core/151879)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [October 28, 2008, 3:38pm UTC](https://www.ruby-forum.com/t/bug-1-9-nkf-with-numchar-input-dumps-core/151879 "2008-10-28T15:38:20Z")

</div>

e$B1sF#$G$9!#e(B nkf e$B$N%S%k%ICf$Ke(B gcc -I. -I…/…/.ext/include/i686-linux -I…/…/./include -I…/…/./ext/nkf -DRUBY\_EXTCONF\_H=“extconf.h” -D\_FILE\_OFFSET\_BITS=64 -fPIC -O3 -g -Wall -Wno-parentheses -o nkf.o -c nk…

---

## [XDG v0.5.0 released](https://www.ruby-forum.com/t/xdg-v0-5-0-released/151967)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 28, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/xdg-v0-5-0-released/151967 "2008-10-28T15:25:24Z")

</div>

= XDG 0.5 http://xdg.rubyforge.org XDG provides a module for supporting the XDG Base Directory Standard\[1\]. If your program utilizes user or system-wide support files (eg. configuration files), you owe it to yourself…

---

## [LDAP authentication in Windows 2003 AD](https://www.ruby-forum.com/t/ldap-authentication-in-windows-2003-ad/151688)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 7\
**Last updated:** [October 28, 2008, 2:57pm UTC](https://www.ruby-forum.com/t/ldap-authentication-in-windows-2003-ad/151688 "2008-10-28T14:57:47Z")

</div>

I am trying to authenticate user against Windows 2003 AD. This is what I have found so far, but what ever I do I get error: #\<LDAP::ResultError: Invalid credentials\> This is my source code, which I picked sowhere on n…

---

## [Format an integer](https://www.ruby-forum.com/t/format-an-integer/151893)

<div class="topic-metadata">

**Author:** [@melmoth](https://www.ruby-forum.com/u/melmoth)\
**Replies:** 8\
**Last updated:** [October 28, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/format-an-integer/151893 "2008-10-28T14:54:51Z")

</div>

Hi, this is a pretty silly question but I cannot figure it how to do. I need to format an integer in order to have always two digits: ex: 1 =\> 01 22 =\> 22 How can I do that in the shortest way possible? Thanks in …

---

## [Days in a year](https://www.ruby-forum.com/t/days-in-a-year/151884)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 10\
**Last updated:** [October 28, 2008, 1:26pm UTC](https://www.ruby-forum.com/t/days-in-a-year/151884 "2008-10-28T13:26:04Z")

</div>

How do I get number of days in a year?

---

## [Exchange 2007 Imap from Ruby](https://www.ruby-forum.com/t/exchange-2007-imap-from-ruby/151955)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 0\
**Last updated:** [October 28, 2008, 11:37am UTC](https://www.ruby-forum.com/t/exchange-2007-imap-from-ruby/151955 "2008-10-28T11:37:47Z")

</div>

Has anybody had any luck accessing Microsoft Exchange 2007 Calendar items. Some time back I was doing some test with Exchange 2000 and everything went smooth. I could access calendar items, convert them to iCalendar f…

---

## ["yield" in a virgin CRUD produces no logged info - why?](https://www.ruby-forum.com/t/yield-in-a-virgin-crud-produces-no-logged-info-why/151899)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 1\
**Last updated:** [October 28, 2008, 11:26am UTC](https://www.ruby-forum.com/t/yield-in-a-virgin-crud-produces-no-logged-info-why/151899 "2008-10-28T11:26:37Z")

</div>

Hi, I’m running Rails 2.0.2 over Ruby 1.8.6 on WinXP-Pro/SP3. I created a CRUD Rails app using scaffolding. The app runs fine. In order to understand the flow of control in the app, I inserted about a half-dozen “…

---

## [How to invoke Windows program with a Ruby command](https://www.ruby-forum.com/t/how-to-invoke-windows-program-with-a-ruby-command/151813)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 3\
**Last updated:** [October 28, 2008, 9:25am UTC](https://www.ruby-forum.com/t/how-to-invoke-windows-program-with-a-ruby-command/151813 "2008-10-28T09:25:11Z")

</div>

Hi, I’ve got a command that works in the Command Window of WinXP-Pro/SP3: F:\\Docume~1\\AllUse~1\\StartM~1\\Programs\_Microsoft \\Micros~3\\Micros~2.lnk K:\_Projects\\Ruby\_Rails\_Apps\\PayrollLoader\\TestSheet.xls As I write th…

---

## [Initial value of $](https://www.ruby-forum.com/t/initial-value-of/151829)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 11\
**Last updated:** [October 28, 2008, 9:07am UTC](https://www.ruby-forum.com/t/initial-value-of/151829 "2008-10-28T09:07:30Z")

</div>

Yuguie$B$G$9!#e(B e$B8=:\_$Ne(Btrunk(r19950) e$B$Ge(B ruby -e ‘p $.’ e$B$9$k$He(B89e$B$,JV$j$^$9!#e(B gem\_prelude.rbe$BFb$Ge(Bgeme$B$N=i4|2=%U%!%$%k$re(Brequiree$B$7$F$$$k$?$a$G$9!#e(B e$B2?$+e(BARGVe$B$+$iB\>$N$b$N$rF…

---

## [Access module's anonymous parent](https://www.ruby-forum.com/t/access-modules-anonymous-parent/151867)

<div class="topic-metadata">

**Author:** [@xavier](https://www.ruby-forum.com/u/xavier)\
**Replies:** 4\
**Last updated:** [October 28, 2008, 8:43am UTC](https://www.ruby-forum.com/t/access-modules-anonymous-parent/151867 "2008-10-28T08:43:57Z")

</div>

I want the following eval to output “Foo called”, without having a named constant, since in leaks in to the calling scope: m = Module.new m.instance\_eval do def foo puts “Foo called” end ParentSelf = self class s…

---

## [Connection error in webrick server](https://www.ruby-forum.com/t/connection-error-in-webrick-server/151864)

<div class="topic-metadata">

**Author:** [@xedric](https://www.ruby-forum.com/u/xedric)\
**Replies:** 5\
**Last updated:** [October 28, 2008, 7:40am UTC](https://www.ruby-forum.com/t/connection-error-in-webrick-server/151864 "2008-10-28T07:40:53Z")

</div>

I did a simple server in ruby using webrick as shown in the tutorial. My problem is that when I tested it with several client connection, a number of connections were refused. I can’t find the reason why this happens,…

---

## [\[ANN\] Ruby 1.9.1 preview 1$B%j%j!\<%9(B](https://www.ruby-forum.com/t/ann-ruby-1-9-1-preview-1-b-j-j-9-b/151943)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 0\
**Last updated:** [October 28, 2008, 7:19am UTC](https://www.ruby-forum.com/t/ann-ruby-1-9-1-preview-1-b-j-j-9-b/151943 "2008-10-28T07:19:50Z")

</div>

Yuguie$B$G$9!#e(BRuby 1.9.1 preview 1e$B$r%j%j!\<%9$7$^$7$?!#8e=R$N\>l=j$+$i\<hF@$Ge(B e$B$-$^$9!#e(B e$B$3$l$O!"e(B1.9e$B7OE}=i$N0BDjHG$H$J$ke(BRuby 1.9.1e$B$N%W%l%S%e!\<%j%j!\<%9$G$9!#e(B e$B@'Hs$\*;n$7$K$J$C$F!"B.EY!"J…

---

## [Uninitialized constant UsersController::User](https://www.ruby-forum.com/t/uninitialized-constant-userscontroller-user/151901)

<div class="topic-metadata">

**Author:** [@maxer](https://www.ruby-forum.com/u/maxer)\
**Replies:** 1\
**Last updated:** [October 28, 2008, 7:02am UTC](https://www.ruby-forum.com/t/uninitialized-constant-userscontroller-user/151901 "2008-10-28T07:02:17Z")

</div>

hi there I am new to ruby. I got the following error when creating a registation page. NameError in UsersController#new uninitialized constant UsersController::User here is the trace: C:/opt/InstantRails/ruby/lib/r…

---

## [Prefix math\_\* funcs](https://www.ruby-forum.com/t/prefix-math-funcs/151717)

<div class="topic-metadata">

**Author:** [@sugie](https://www.ruby-forum.com/u/sugie)\
**Replies:** 7\
**Last updated:** [October 28, 2008, 5:31am UTC](https://www.ruby-forum.com/t/prefix-math-funcs/151717 "2008-10-28T05:31:03Z")

</div>

e$B:XF#$H?=$7$^$9!#e(B complex.ce$B$G;H$&$?$a$K!"$$$/$D$+?t3X4X?t$+$ie(Bstatice$B$,$H$l$?$h$&$G$9$,!"e(B e$B30It$K=P$9$J$i$Pe(B rb\_ e$B@\\F,\<-$rIU$1$F$\[$7$$$G$9!#e(B Index: complex.c — complex.c (revision 19925) +++ …

---

## [Recession Proof Credit](https://www.ruby-forum.com/t/recession-proof-credit/151933)

<div class="topic-metadata">

**Author:** [@nucmedmike](https://www.ruby-forum.com/u/nucmedmike)\
**Replies:** 0\
**Last updated:** [October 28, 2008, 2:50am UTC](https://www.ruby-forum.com/t/recession-proof-credit/151933 "2008-10-28T02:50:48Z")

</div>

Everyone can have a credit card…Good credit, Bad credit or Slow credit, you can be approved today…To find a card that suits your needs, please visit: www.BankCardsNow.com

---

## [Bj gem/plugin](https://www.ruby-forum.com/t/bj-gem-plugin/141570)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 8\
**Last updated:** [October 28, 2008, 2:25am UTC](https://www.ruby-forum.com/t/bj-gem-plugin/141570 "2008-10-28T02:25:39Z")

</div>

Has anyone successfully used the Bj (http://agilewebdevelopment.com/plugins/bj) gem or plugin using JRuby? If not, what’s everyone in JRuby land using for background processes? Rich ÆƒuÉlÉuÉÉ¯ É¥É”Ä±É¹

---

## [Pass def to eval](https://www.ruby-forum.com/t/pass-def-to-eval/151921)

<div class="topic-metadata">

**Author:** [@omgitsads](https://www.ruby-forum.com/u/omgitsads)\
**Replies:** 3\
**Last updated:** [October 28, 2008, 2:03am UTC](https://www.ruby-forum.com/t/pass-def-to-eval/151921 "2008-10-28T02:03:41Z")

</div>

Hello, My plan is to have a ruby class with a variety of functions in it and I want to be able to call functions from this class using AJAX. I think the easiest way to do this then is to pass a cgi parameter named fu…

---

## [String Comparison Problems](https://www.ruby-forum.com/t/string-comparison-problems/151912)

<div class="topic-metadata">

**Author:** [@mdrisser](https://www.ruby-forum.com/u/mdrisser)\
**Replies:** 2\
**Last updated:** [October 28, 2008, 1:57am UTC](https://www.ruby-forum.com/t/string-comparison-problems/151912 "2008-10-28T01:57:35Z")

</div>

Hi All, I’m having a baffling problem with string comparisons in Ruby. The following code just does not act as expected. measures\_full = {‘PROP 1A’=\>‘Safe, Reliable High-Speed Train Bond Act’, ‘PROP 2’ =\>‘Standards …

---

## [Alphanumeric data clean up](https://www.ruby-forum.com/t/alphanumeric-data-clean-up/151787)

<div class="topic-metadata">

**Author:** [@Charles\_LSSnyder](https://www.ruby-forum.com/u/Charles_LSSnyder)\
**Replies:** 4\
**Last updated:** [October 28, 2008, 1:35am UTC](https://www.ruby-forum.com/t/alphanumeric-data-clean-up/151787 "2008-10-28T01:35:55Z")

</div>

Hi I have a .csv file with terrible mixed text and numeric data: Case ID,DATE,SERIAL,NAME,Gender,Code1,Code2 A822DEA04BA7814B011074A096C687B7,2008-09-05 10:28:38.47,1013726,Smith,Male,550.92 RED INGUINAL HERNIA,49500 …

---

## [Failure in bootstraptest/test\_thread.rb](https://www.ruby-forum.com/t/failure-in-bootstraptest-test-thread-rb/151863)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 2\
**Last updated:** [October 28, 2008, 1:32am UTC](https://www.ruby-forum.com/t/failure-in-bootstraptest-test-thread-rb/151863 "2008-10-28T01:32:24Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B e$B\<j85$N4D6-e(B(mswin32 on 32bit Vista)e$B$G$O:G6ae(Bbootstraptest/test\_thread.rb e$B$N:G8e$N%F%9%H$,$A$g$/$A$g$/\<:GT$9$k$h$&$K$J$j$^$7$?!#e(B Thread.newe$B$Ge(BNoMem…

---

## [JRuby Rack Q's](https://www.ruby-forum.com/t/jruby-rack-qs/151783)

<div class="topic-metadata">

**Author:** [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Replies:** 13\
**Last updated:** [October 27, 2008, 11:50pm UTC](https://www.ruby-forum.com/t/jruby-rack-qs/151783 "2008-10-27T23:50:39Z")

</div>

I took a very brief perusal through the JRuby Rack code: http://wiki.jruby.org/wiki/JRuby\_Rack From reading the code, it doesn’t look like min runtimes is used anywhere. I do see some code that appears to reference it…

---

## [How to update gem to a version that's not the latest?](https://www.ruby-forum.com/t/how-to-update-gem-to-a-version-thats-not-the-latest/151895)

<div class="topic-metadata">

**Author:** [@gaudimila](https://www.ruby-forum.com/u/gaudimila)\
**Replies:** 2\
**Last updated:** [October 27, 2008, 11:28pm UTC](https://www.ruby-forum.com/t/how-to-update-gem-to-a-version-thats-not-the-latest/151895 "2008-10-27T23:28:32Z")

</div>

I posted an earlier question but am amending it with this question instead which hopefully gets to the heart of the matter: I’m trying to get from rubygems version 0.9.5 to version 1.2.0 because I believe that 1.3.0 h…

---

## [Why hash not being passed into method?](https://www.ruby-forum.com/t/why-hash-not-being-passed-into-method/151907)

<div class="topic-metadata">

**Author:** [@marfarma](https://www.ruby-forum.com/u/marfarma)\
**Replies:** 1\
**Last updated:** [October 27, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/why-hash-not-being-passed-into-method/151907 "2008-10-27T23:00:41Z")

</div>

A rails plugin I’m trying to use has the following pattern of failing tests: — unit test file for editor def setup create\_editor!(:role =\> ‘author’) end — “test factory” method meant to simplify test writing def c…

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

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