# Ruby

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

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

---

## [Disadvantages of Dependency Inversion?](https://www.ruby-forum.com/t/disadvantages-of-dependency-inversion/106349)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 9\
**Last updated:** [June 14, 2007, 2:53pm UTC](https://www.ruby-forum.com/t/disadvantages-of-dependency-inversion/106349 "2007-06-14T14:53:28Z")

</div>

Nowadays, DI (Dependency Inversion) is one of the widely used design pattern. It provides several benefits, such as (1) loose coupling between component (2) effective and easy testing (component testing or unit testi…

---

## [Mexican Blanket (#127)](https://www.ruby-forum.com/t/mexican-blanket-127/106834)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 2:16pm UTC](https://www.ruby-forum.com/t/mexican-blanket-127/106834 "2007-06-14T14:16:22Z")

</div>

Several solutions to this quiz called out to RMagick to draw pictures of their work. That made for some pretty output. One such solution was from Justin Ethier and I want to take a look at that code. Justin observ…

---

## [RAILS: problems loading fixtures](https://www.ruby-forum.com/t/rails-problems-loading-fixtures/106826)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 1:31pm UTC](https://www.ruby-forum.com/t/rails-problems-loading-fixtures/106826 "2007-06-14T13:31:14Z")

</div>

Hi, I’m having a bizarre problem getting my fixtures to load when running my tests using rake test, I get errors along the lines of ‘Error: Table ‘test.products’ doesn’t exist:…’ this , despite the fact that the fix…

---

## [REACH Technologies](https://www.ruby-forum.com/t/reach-technologies/106825)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 12:36pm UTC](https://www.ruby-forum.com/t/reach-technologies/106825 "2007-06-14T12:36:09Z")

</div>

REACH Technologies

---

## [Dir copy with rename](https://www.ruby-forum.com/t/dir-copy-with-rename/106801)

<div class="topic-metadata">

**Author:** [@RebhanS\_Gilbert](https://www.ruby-forum.com/u/RebhanS_Gilbert)\
**Replies:** 3\
**Last updated:** [June 14, 2007, 12:07pm UTC](https://www.ruby-forum.com/t/dir-copy-with-rename/106801 "2007-06-14T12:07:01Z")

</div>

Hi, i want to copy a dir recursive with all files included, but rename all dirnames that match a pattern, i.e. /srcdir /bla/foobar/blabla /bla/test/subtest/foobar /foobar/test /foobar should be /targetdir /bla/…

---

## [Problem using net/ftp om SunOS 5.8 - libgcc\_s.so.1 not found](https://www.ruby-forum.com/t/problem-using-net-ftp-om-sunos-5-8-libgcc-s-so-1-not-found/106811)

<div class="topic-metadata">

**Author:** [@benemson](https://www.ruby-forum.com/u/benemson)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 10:47am UTC](https://www.ruby-forum.com/t/problem-using-net-ftp-om-sunos-5-8-libgcc-s-so-1-not-found/106811 "2007-06-14T10:47:52Z")

</div>

When the script gets to require “net/ftp” I get the following error: /usr/local/lib/ruby/1.8/sparc-solaris2.8/socket.so: ld.so.1: compress\_n\_ftp.rb: fatal: libgcc\_s.so.1: open failed: No such file or directory - /usr/…

---

## [Raop-client 0.1.0 Released](https://www.ruby-forum.com/t/raop-client-0-1-0-released/106803)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 9:32am UTC](https://www.ruby-forum.com/t/raop-client-0-1-0-released/106803 "2007-06-14T09:32:41Z")

</div>

raop-client version 0.1.0 has been released! http://raop.rubyforge.org/ Net::RAOP::Client is an Airport Express client. It allows you to stream music to an Airport Express. Example: raop = Net::RAOP::Client.new(‘19…

---

## [Ruby chinese character encoding problem with SQL](https://www.ruby-forum.com/t/ruby-chinese-character-encoding-problem-with-sql/106788)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 9:25am UTC](https://www.ruby-forum.com/t/ruby-chinese-character-encoding-problem-with-sql/106788 "2007-06-14T09:25:41Z")

</div>

Hi, My SQL query has some chinese characters which are getting messed up. The SQL server uses gb2312(chinese) encoding and so in my Ruby script I use Iconv to convert from UTF-8 to gb2312. The conversion seems to work …

---

## [Mail Using SMTP Problem](https://www.ruby-forum.com/t/mail-using-smtp-problem/106799)

<div class="topic-metadata">

**Author:** [@dgirdhar](https://www.ruby-forum.com/u/dgirdhar)\
**Replies:** 2\
**Last updated:** [June 14, 2007, 9:08am UTC](https://www.ruby-forum.com/t/mail-using-smtp-problem/106799 "2007-06-14T09:08:24Z")

</div>

Hi, Please help me to resolve the following issue. When i am running following script after filling all required parameters like mail ID, SMTP server and port number etc. I am getting follwoing errors, please tell me…

---

## [How to functional test a action that render a partial](https://www.ruby-forum.com/t/how-to-functional-test-a-action-that-render-a-partial/106800)

<div class="topic-metadata">

**Author:** [@gao\_zhixin](https://www.ruby-forum.com/u/gao_zhixin)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 9:01am UTC](https://www.ruby-forum.com/t/how-to-functional-test-a-action-that-render-a-partial/106800 "2007-06-14T09:01:38Z")

</div>

or just update some doms, of cause using rails functional test

---

## [How to detach mail attachments with Net::IMAP](https://www.ruby-forum.com/t/how-to-detach-mail-attachments-with-net-imap/106796)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 7:49am UTC](https://www.ruby-forum.com/t/how-to-detach-mail-attachments-with-net-imap/106796 "2007-06-14T07:49:32Z")

</div>

Since documenattion on this topic is very “non existing” I thought I would share this with you: require ‘net/imap’ imap = Net::IMAP.new(‘my.mail.server’) imap.login(‘usr’, ‘pwd’) imap.select(‘Inbox’) All msgs in a…

---

## [Bug in String#unpack on windows or?](https://www.ruby-forum.com/t/bug-in-string-unpack-on-windows-or/106711)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 4\
**Last updated:** [June 14, 2007, 7:31am UTC](https://www.ruby-forum.com/t/bug-in-string-unpack-on-windows-or/106711 "2007-06-14T07:31:07Z")

</div>

I am trying to save attachment(s) from mail read with net/imap. Attachment is a tif file. att = imap.fetch(msgID, “BODY\[2\]”)\[0\].attr\[“BODY\[2\]”\].unpack(‘m’) File.new(‘att.tif’,‘w+’).write(att) I tried it on linux and …

---

## [Exceptions that Fiber#yield raises](https://www.ruby-forum.com/t/exceptions-that-fiber-yield-raises/106708)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 5:18am UTC](https://www.ruby-forum.com/t/exceptions-that-fiber-yield-raises/106708 "2007-06-14T05:18:20Z")

</div>

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B Fiber#yield e$B$,Ej$2$kNc30$,!"%P%C%/%H%l!\<%9$K\>pJs$r4^$s$G$J$$$N$Ge(B e$B%G%P%C%0$NLr$KN)$A$^$;$s!#$I$3$G%(%i!\<$,5/$-$?$+J,$+$k$h$&$K$G$-$J$$e(B e$B$G$7$g$&$+!#Nc$($P0J2\<$\_$?$$…

---

## [More mechanize](https://www.ruby-forum.com/t/more-mechanize/106784)

<div class="topic-metadata">

**Author:** [@banry](https://www.ruby-forum.com/u/banry)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 4:33am UTC](https://www.ruby-forum.com/t/more-mechanize/106784 "2007-06-14T04:33:18Z")

</div>

Okay, I managed to get mechanize to login for me. Now I am pulling down a vBulletin page which has a thread on it: pull down a thread puts “Thread:\\n” page = agent.get(‘http://dapo.org/forums/archive/index.php?t-229…

---

## [Finding entries in Windows Registry matching a RE](https://www.ruby-forum.com/t/finding-entries-in-windows-registry-matching-a-re/106081)

<div class="topic-metadata">

**Author:** [@richard](https://www.ruby-forum.com/u/richard)\
**Replies:** 6\
**Last updated:** [June 14, 2007, 4:06am UTC](https://www.ruby-forum.com/t/finding-entries-in-windows-registry-matching-a-re/106081 "2007-06-14T04:06:16Z")

</div>

Hi, I’d like to be able to search a named hive for keys whose names match a given regular expression. I found, for example: require ‘win32/registry’ Win32::Registry::HKEY\_CURRENT\_USER.open(‘SOFTWARE\\AdwareAlert \\Ad…

---

## [Dynamically referencing class constants?](https://www.ruby-forum.com/t/dynamically-referencing-class-constants/106786)

<div class="topic-metadata">

**Author:** [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Replies:** 4\
**Last updated:** [June 14, 2007, 3:28am UTC](https://www.ruby-forum.com/t/dynamically-referencing-class-constants/106786 "2007-06-14T03:28:09Z")

</div>

How can I do this? Socket.constants.each {|i| puts Socket::#{i} ##does not work of course } ################################# Futile attempts: irb(main):023:0\> puts Socket::SEEK\_CUR ##works of co…

---

## [Twain and sane](https://www.ruby-forum.com/t/twain-and-sane/106780)

<div class="topic-metadata">

**Author:** [@khaoz](https://www.ruby-forum.com/u/khaoz)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 1:05am UTC](https://www.ruby-forum.com/t/twain-and-sane/106780 "2007-06-14T01:05:04Z")

</div>

How to access a scanner using ruby through twain and sane ?

---

## [Ruby/eclipse in a mixed language project](https://www.ruby-forum.com/t/ruby-eclipse-in-a-mixed-language-project/106777)

<div class="topic-metadata">

**Author:** [@jfry](https://www.ruby-forum.com/u/jfry)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 12:41am UTC](https://www.ruby-forum.com/t/ruby-eclipse-in-a-mixed-language-project/106777 "2007-06-14T00:41:51Z")

</div>

The shop I’m working for has a bunch of (non-GUI) test automation written in Python, to which I’ll be adding some GUI scripts written in Ruby/Watir. There is an existing svn repository like https://OurSVNrepository.c…

---

## [FileUtils.ln cross platform?](https://www.ruby-forum.com/t/fileutils-ln-cross-platform/106650)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 4\
**Last updated:** [June 14, 2007, 12:33am UTC](https://www.ruby-forum.com/t/fileutils-ln-cross-platform/106650 "2007-06-14T00:33:51Z")

</div>

What happens when you use FileUtils.ln on a Windows system. Does it fail? Is that why Jim W. uses #safe\_ln, eg. LINKING\_SUPPORTED = \[true\] Attempt to do a normal file link, but fall back to a copy if the link fails. d…

---

## [Manual Garbage Collection](https://www.ruby-forum.com/t/manual-garbage-collection/106746)

<div class="topic-metadata">

**Author:** [@conan](https://www.ruby-forum.com/u/conan)\
**Replies:** 4\
**Last updated:** [June 13, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/manual-garbage-collection/106746 "2007-06-13T23:22:12Z")

</div>

Hi. I’m having a problem with a Ruby-Gnome2 application I’ve been building. For some reason(which I haven’t identified but I suspect is ruby-gnome problem) my program randomly segfaults. I fixed this by disabling g…

---

## [Labrador-0.0.1 pre alpha released](https://www.ruby-forum.com/t/labrador-0-0-1-pre-alpha-released/106769)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 1\
**Last updated:** [June 13, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/labrador-0-0-1-pre-alpha-released/106769 "2007-06-13T23:14:39Z")

</div>

Hi list the very diligent folks from RubyForge have approved my request early so I can thankfully pronounce the first release of Labrador. Strange name for a strange package :slight\_smile: Here you go: Labrador is a …

---

## [Has any one created a FaceBook app in Rails](https://www.ruby-forum.com/t/has-any-one-created-a-facebook-app-in-rails/156158)

<div class="topic-metadata">

**Author:** [@arjun\_ghosh](https://www.ruby-forum.com/u/arjun_ghosh)\
**Replies:** 1\
**Last updated:** [June 13, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/has-any-one-created-a-facebook-app-in-rails/156158 "2007-06-13T23:08:37Z")

</div>

Hi, Has any one created a Face Book app in Rails? If yes can we get some pointer or link on information on How To. Thanks and Regards AG

---

## [Remindre of Ruby User Group Meeting for Milwaukee tonight at](https://www.ruby-forum.com/t/remindre-of-ruby-user-group-meeting-for-milwaukee-tonight-at/106764)

<div class="topic-metadata">

**Author:** [@tomjerry](https://www.ruby-forum.com/u/tomjerry)\
**Replies:** 0\
**Last updated:** [June 13, 2007, 10:38pm UTC](https://www.ruby-forum.com/t/remindre-of-ruby-user-group-meeting-for-milwaukee-tonight-at/106764 "2007-06-13T22:38:32Z")

</div>

http://www.mkerb.org/index.php/Meeting\_6/13/2007 – “Nothing will ever be attempted, if all possible objections must first be overcome.” - Samuel Johnson “Luck is what happens when preparation meets opportunity.” - …

---

## [Ruby consultants in los angeles?](https://www.ruby-forum.com/t/ruby-consultants-in-los-angeles/106763)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 0\
**Last updated:** [June 13, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/ruby-consultants-in-los-angeles/106763 "2007-06-13T22:23:30Z")

</div>

Hi all, pardon the spam. Need a Ruby programmer in the LA area with skill in Rails, as well as setting up things like Subversion, Capistrano, Mongrel, and Apache. If you’re up for some consulting work over the next fe…

---

## [A matter of style](https://www.ruby-forum.com/t/a-matter-of-style/106541)

<div class="topic-metadata">

**Author:** [@Bas\_van\_Gils](https://www.ruby-forum.com/u/Bas_van_Gils)\
**Replies:** 21\
**Last updated:** [June 13, 2007, 10:03pm UTC](https://www.ruby-forum.com/t/a-matter-of-style/106541 "2007-06-13T22:03:27Z")

</div>

All, A little while ago I picked up a copy of the pickaxe book and got hooked to Ruby. Never had a \`real’ project to work on though (that’s what you get when you don’t hack for a living I suppose :-). Either way, a …

---

## [Querying MySQL from a select box form](https://www.ruby-forum.com/t/querying-mysql-from-a-select-box-form/106671)

<div class="topic-metadata">

**Author:** [@Brandon\_Robison](https://www.ruby-forum.com/u/Brandon_Robison)\
**Replies:** 2\
**Last updated:** [June 13, 2007, 9:54pm UTC](https://www.ruby-forum.com/t/querying-mysql-from-a-select-box-form/106671 "2007-06-13T21:54:26Z")

</div>

I don’t even know how to explain the weirdness of this one except to show the query it’s making when it displays the error Scroll down to the yellow “Materials search too” box and try selecting, say… black AND black…

---

## [Executing sudo from ruby](https://www.ruby-forum.com/t/executing-sudo-from-ruby/106700)

<div class="topic-metadata">

**Author:** [@anansi](https://www.ruby-forum.com/u/anansi)\
**Replies:** 12\
**Last updated:** [June 13, 2007, 9:44pm UTC](https://www.ruby-forum.com/t/executing-sudo-from-ruby/106700 "2007-06-13T21:44:48Z")

</div>

hi, I wanna execute in a script of mine commands like: “sudo apt-get clean” or “sudo nano /etc/X11/xorg.conf”. The difference is: The first command needs to be executed without influence to the main process of the ru…

---

## [Getting Ruby](https://www.ruby-forum.com/t/getting-ruby/106721)

<div class="topic-metadata">

**Author:** [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Replies:** 8\
**Last updated:** [June 13, 2007, 8:49pm UTC](https://www.ruby-forum.com/t/getting-ruby/106721 "2007-06-13T20:49:11Z")

</div>

Given that Debian and UBUNTU break ruby up into a multitude of sub installs, I think the comment below from Download Ruby can be misleading to new users. However, on some platforms, there are package management …

---

## [Ruby Hash Querying](https://www.ruby-forum.com/t/ruby-hash-querying/106753)

<div class="topic-metadata">

**Author:** [@kwest](https://www.ruby-forum.com/u/kwest)\
**Replies:** 4\
**Last updated:** [June 13, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/ruby-hash-querying/106753 "2007-06-13T20:47:10Z")

</div>

Hello, I am new to Ruby and have run into a small snag. I have a hash like so: @documentnames = { :finance\_whitepaper =\> ‘whitepaper one’, :ecommerce\_whitepaper =\> ‘whitepaper two’, :integratedsvs\_datasheet =\> ‘whi…

---

## [Practical ruby console on windows?](https://www.ruby-forum.com/t/practical-ruby-console-on-windows/106313)

<div class="topic-metadata">

**Author:** [@Kiripolszky\_KSSSSro](https://www.ruby-forum.com/u/Kiripolszky_KSSSSro)\
**Replies:** 4\
**Last updated:** [June 13, 2007, 8:38pm UTC](https://www.ruby-forum.com/t/practical-ruby-console-on-windows/106313 "2007-06-13T20:38:08Z")

</div>

Ehlo, I’m just wondering if there’s any good console for Ruby on Windows? Mine is a Hungarian system and when I use irb from the win console I just can’t enter asterisks and some other chars, on the other hand fxri i…

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

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