# Ruby

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

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

---

## [Checking if a specific Unix/Linux command exists](https://www.ruby-forum.com/t/checking-if-a-specific-unix-linux-command-exists/174237)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 3\
**Last updated:** [August 24, 2009, 11:39am UTC](https://www.ruby-forum.com/t/checking-if-a-specific-unix-linux-command-exists/174237 "2009-08-24T11:39:29Z")

</div>

I want to check if a command “port” is installed on Mac. Here is what I have now: File.open(“test.txt”, “w+”) do |f| if system(“port \> /dev/null 2\>&1”) f.puts %x(port installed) else f.puts “No MacPorts command was…

---

## [Retrieving Yahoo mail with Net::IMAP](https://www.ruby-forum.com/t/retrieving-yahoo-mail-with-net-imap/174232)

<div class="topic-metadata">

**Author:** [@tbochan](https://www.ruby-forum.com/u/tbochan)\
**Replies:** 10\
**Last updated:** [August 24, 2009, 2:51am UTC](https://www.ruby-forum.com/t/retrieving-yahoo-mail-with-net-imap/174232 "2009-08-24T02:51:59Z")

</div>

Hi, I’m trying read my email from BT Yahoo cos they seem to have withdrawn their archive facility recently. However, when I try the following, it just hangs forever : loginid=%w{myuserid mypass} pp (imap = Net::IMAP…

---

## [Interactive Commands](https://www.ruby-forum.com/t/interactive-commands/174227)

<div class="topic-metadata">

**Author:** [@norwat](https://www.ruby-forum.com/u/norwat)\
**Replies:** 3\
**Last updated:** [August 24, 2009, 12:34am UTC](https://www.ruby-forum.com/t/interactive-commands/174227 "2009-08-24T00:34:04Z")

</div>

Hey So im trying to write an irc bot for my clan but mostly just to train my ruby skills a bit more. Anyhow some of the functions of the bot require to execute commands on the server itself, managed to do fine using …

---

## [Amalgalite 0.11.0 Released](https://www.ruby-forum.com/t/amalgalite-0-11-0-released/174265)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 0\
**Last updated:** [August 24, 2009, 12:19am UTC](https://www.ruby-forum.com/t/amalgalite-0-11-0-released/174265 "2009-08-24T00:19:20Z")

</div>

amalgalite version 0.11.0 has been released. {{ Release notes for Version 0.11.0 }} === Bug Fixes Add compiletime vs. runtime library checking. Fix missing datatypes to typemap (reported by Jay Godse) === Enhancemen…

---

## [Ruby-prof on Ruby 1.9 woes](https://www.ruby-forum.com/t/ruby-prof-on-ruby-1-9-woes/174195)

<div class="topic-metadata">

**Author:** [@Shot\_SPiotr\_S.S](https://www.ruby-forum.com/u/Shot_SPiotr_S.S)\
**Replies:** 4\
**Last updated:** [August 23, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/ruby-prof-on-ruby-1-9-woes/174195 "2009-08-23T19:39:46Z")

</div>

Iâ€™m trying to use ruby-prof with Ruby 1.9.1p243 on 64-bit Ubuntu. The current released version doesnâ€™t work, but a gem built from the ruby-profâ€™s svn repoâ€™s trunk at least installs properly. Unfortunately, whe…

---

## [Want to get the latest 187 dll](https://www.ruby-forum.com/t/want-to-get-the-latest-187-dll/174255)

<div class="topic-metadata">

**Author:** [@jorgehrl](https://www.ruby-forum.com/u/jorgehrl)\
**Replies:** 0\
**Last updated:** [August 23, 2009, 7:04pm UTC](https://www.ruby-forum.com/t/want-to-get-the-latest-187-dll/174255 "2009-08-23T19:04:27Z")

</div>

hi there, From the Ruby web site I got the latest binary for 1.87 (release 72 on 2008-08-11) I noticed that in the repository the current version for 1.87 is 196 2009-08-09 This is 1 year difference. I would like to…

---

## [\[array & regexp\] Development - works, production not - why?](https://www.ruby-forum.com/t/array-regexp-development-works-production-not-why/174235)

<div class="topic-metadata">

**Author:** [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Replies:** 10\
**Last updated:** [August 23, 2009, 5:08pm UTC](https://www.ruby-forum.com/t/array-regexp-development-works-production-not-why/174235 "2009-08-23T17:08:36Z")

</div>

My development envrioment: ~% ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) \[i686-darwin9\] My production envrioment: x@x:~$ ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) \[i686-linux\] Ruby Enterprise Edition 200906…

---

## [Re: Parsing pdf files](https://www.ruby-forum.com/t/re-parsing-pdf-files/174247)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 4\
**Last updated:** [August 23, 2009, 4:51pm UTC](https://www.ruby-forum.com/t/re-parsing-pdf-files/174247 "2009-08-23T16:51:03Z")

</div>

Dear Arun, there is a command-line tool pdftotext, which you can use with encoding specifications and also with a “-layout” option, which will preserve line breaks. The list of possible encodings pdftotext -listenc …

---

## [\[ANN\] First release of Automations: XDo](https://www.ruby-forum.com/t/ann-first-release-of-automations-xdo/174246)

<div class="topic-metadata">

**Author:** [@quintus](https://www.ruby-forum.com/u/quintus)\
**Replies:** 0\
**Last updated:** [August 23, 2009, 11:25am UTC](https://www.ruby-forum.com/t/ann-first-release-of-automations-xdo/174246 "2009-08-23T11:25:14Z")

</div>

Hi folks, I’m happy to announce the first public release of the XDo library. It allows you to fake and automate (simulate) user input to a Linux X Server system like Ubuntu. Possibilities include mouse and keyboard …

---

## [D.size differ from d.send(:size) where d is SimpleDelegator.new(\[\])](https://www.ruby-forum.com/t/d-size-differ-from-d-send-size-where-d-is-simpledelegator-new/174242)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [August 23, 2009, 4:58am UTC](https://www.ruby-forum.com/t/d-size-differ-from-d-send-size-where-d-is-simpledelegator-new/174242 "2009-08-23T04:58:45Z")

</div>

e$B0J2\<$N$h$&$K!"e(Bsize e$B$H$$$&4X?t$,Dj5A$5$l$F$$$k$H$-!"e(B SimpleDelegator.new(\[\]) e$B$KBP$7!"e(Bd.size e$B$He(B d.send(:size) e$B$N7ke(B e$B2L$,0\[$J$j$^$9!#e(B % ./ruby -ve ’ require “delegate” d = SimpleDele…

---

## [Latest changes from mainline fast\_xs](https://www.ruby-forum.com/t/latest-changes-from-mainline-fast-xs/174225)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 0\
**Last updated:** [August 22, 2009, 10:25pm UTC](https://www.ruby-forum.com/t/latest-changes-from-mainline-fast-xs/174225 "2009-08-22T22:25:55Z")

</div>

Hi all, Hopefully the new maintainer of Hpricot will see this because I have no idea who to send it to now… I originally had a version of this patch posted in \_why’s Trac sometime in 2008 until he took Trac down. I’…

---

## [Ruby thread and gets](https://www.ruby-forum.com/t/ruby-thread-and-gets/174172)

<div class="topic-metadata">

**Author:** [@Im\_still](https://www.ruby-forum.com/u/Im_still)\
**Replies:** 5\
**Last updated:** [August 22, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/ruby-thread-and-gets/174172 "2009-08-22T18:27:05Z")

</div>

Hi all I’m trying to run two thread at one time in a program. And one of them will receive user inputting msgs by gets(). another one will do something else at the same time. they don’t communicate each other. like …

---

## [Redirected URL](https://www.ruby-forum.com/t/redirected-url/174181)

<div class="topic-metadata">

**Author:** [@novicetoruby](https://www.ruby-forum.com/u/novicetoruby)\
**Replies:** 2\
**Last updated:** [August 22, 2009, 6:02pm UTC](https://www.ruby-forum.com/t/redirected-url/174181 "2009-08-22T18:02:05Z")

</div>

Hi, I was trying to parse a web page where multiple hyper links exist. Each hyper link redirecting to a different server. I just want store first server it is redirecting the request too. I tried using ‘net/http’ to …

---

## [Where oh where is Enumerator? (1.9)](https://www.ruby-forum.com/t/where-oh-where-is-enumerator-1-9/174207)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 6\
**Last updated:** [August 22, 2009, 5:51pm UTC](https://www.ruby-forum.com/t/where-oh-where-is-enumerator-1-9/174207 "2009-08-22T17:51:23Z")

</div>

Err… in Ruby 1.9 is Enumerator at the toplevel or in the Enumerable namespace? Seems to me it was moved to the toplevel at one point, but now it looks like it’s in Enumerable again… then again I may have that all back…

---

## [Encoding::CompatibilityError](https://www.ruby-forum.com/t/encoding-compatibilityerror/174078)

<div class="topic-metadata">

**Author:** [@graycardinal](https://www.ruby-forum.com/u/graycardinal)\
**Replies:** 3\
**Last updated:** [August 22, 2009, 5:32pm UTC](https://www.ruby-forum.com/t/encoding-compatibilityerror/174078 "2009-08-22T17:32:00Z")

</div>

Hello ! line: res = main\_page.scan(/#{pr}:(.\*?)\</table\>/m).to\_s error: in \`scan’: incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError) How to fix ? Oleg.

---

## [\#\<Zlib::BufError: buffer error\>](https://www.ruby-forum.com/t/zlib-buffer-error/174210)

<div class="topic-metadata">

**Author:** [@graycardinal](https://www.ruby-forum.com/u/graycardinal)\
**Replies:** 2\
**Last updated:** [August 22, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/zlib-buffer-error/174210 "2009-08-22T17:15:59Z")

</div>

require “zlib” def inflate(string) zstream = Zlib::Inflate.new buf = zstream.inflate(string) zstream.finish zstream.close buf end Work fine with ruby 1.8, and do not work in ruby 1.9 #\<Zlib::BufError: buffer err…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/174148)

<div class="topic-metadata">

**Author:** [@Dennis\_H](https://www.ruby-forum.com/u/Dennis_H)\
**Replies:** 3\
**Last updated:** [August 22, 2009, 5:03pm UTC](https://www.ruby-forum.com/t/no-subject/174148 "2009-08-22T17:03:58Z")

</div>

unsubscribe

---

## [Ignore Iconv::IllegalSequence while using Ruby WWW::Mechaniz](https://www.ruby-forum.com/t/ignore-iconv-illegalsequence-while-using-ruby-www-mechaniz/174205)

<div class="topic-metadata">

**Author:** [@roddik](https://www.ruby-forum.com/u/roddik)\
**Replies:** 1\
**Last updated:** [August 22, 2009, 3:57pm UTC](https://www.ruby-forum.com/t/ignore-iconv-illegalsequence-while-using-ruby-www-mechaniz/174205 "2009-08-22T15:57:14Z")

</div>

Hello, I’ve encountered the Iconv::IllegalSequence error on some web pages when using mechanize lib. Is there a way to make mechanize just omit ill encoded characters and return the “cut” page? TIA

---

## [Exercise in DRY](https://www.ruby-forum.com/t/exercise-in-dry/173958)

<div class="topic-metadata">

**Author:** [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Replies:** 12\
**Last updated:** [August 22, 2009, 3:24pm UTC](https://www.ruby-forum.com/t/exercise-in-dry/173958 "2009-08-22T15:24:27Z")

</div>

I have some simple code for a thumbs up/thumbs down functionality. Clicking “agree” sends an ajax count to increase the agree field by one, clicking disagree increases the “disagree” count by one. The text returned i…

---

## [Connecting professionals through linkedin to know more Ruby professionals](https://www.ruby-forum.com/t/connecting-professionals-through-linkedin-to-know-more-ruby-professionals/174201)

<div class="topic-metadata">

**Author:** [@narayanan](https://www.ruby-forum.com/u/narayanan)\
**Replies:** 0\
**Last updated:** [August 22, 2009, 10:05am UTC](https://www.ruby-forum.com/t/connecting-professionals-through-linkedin-to-know-more-ruby-professionals/174201 "2009-08-22T10:05:28Z")

</div>

Hi, There are many Ruby Professionals and Engineers from various background joined together through LinkedIn for knowledge sharing and future job oppotunities. There are some certified specialists updates their lates…

---

## [Github and \_why](https://www.ruby-forum.com/t/github-and-why/174169)

<div class="topic-metadata">

**Author:** [@John\_W\_Higgins](https://www.ruby-forum.com/u/John_W_Higgins)\
**Replies:** 18\
**Last updated:** [August 22, 2009, 7:29am UTC](https://www.ruby-forum.com/t/github-and-why/174169 "2009-08-22T07:29:47Z")

</div>

I’m about to get very nasty responses but this absolutely is a very bad situation. Github nor anyone else has no business whatsoever touching one single byte of data that \_why deleted from his account. This would be …

---

## [Output Manipulation](https://www.ruby-forum.com/t/output-manipulation/174151)

<div class="topic-metadata">

**Author:** [@rookie\_core](https://www.ruby-forum.com/u/rookie_core)\
**Replies:** 6\
**Last updated:** [August 22, 2009, 6:31am UTC](https://www.ruby-forum.com/t/output-manipulation/174151 "2009-08-22T06:31:00Z")

</div>

puts “\\nMODULE : " Module.constants.sort.select { |x| eval(x.to\_s).instance\_of? Module } puts”\\nCLASSES : " puts Module.constants.sort.select { |x| c = eval(x.to\_s) c.is\_a? Class and not c.ancestors.include? Excepti…

---

## [Decentralizing \_why's projects (aka the ruby community is awesome)](https://www.ruby-forum.com/t/decentralizing-whys-projects-aka-the-ruby-community-is-awesome/174186)

<div class="topic-metadata">

**Author:** [@philipjkim](https://www.ruby-forum.com/u/philipjkim)\
**Replies:** 1\
**Last updated:** [August 22, 2009, 2:03am UTC](https://www.ruby-forum.com/t/decentralizing-whys-projects-aka-the-ruby-community-is-awesome/174186 "2009-08-22T02:03:43Z")

</div>

After hearing about \_why’s departure, in a foolish gust of barnraising I set up a central mirror of \_why’s projects on github (http:// whymirror (A mirror of \_why's executable poetry) · GitHub). Then I realized I coul…

---

## [Regarding RDoc](https://www.ruby-forum.com/t/regarding-rdoc/174142)

<div class="topic-metadata">

**Author:** [@prateekagarwal](https://www.ruby-forum.com/u/prateekagarwal)\
**Replies:** 4\
**Last updated:** [August 22, 2009, 1:05am UTC](https://www.ruby-forum.com/t/regarding-rdoc/174142 "2009-08-22T01:05:12Z")

</div>

How to install RDoc in windows? Also tell me, after installing what is the syntax for installing RDoc in our program. I searched the net for some resources, but did not find any. Please help.

---

## [Natrix - The Named Matrix](https://www.ruby-forum.com/t/natrix-the-named-matrix/174131)

<div class="topic-metadata">

**Author:** [@dbf](https://www.ruby-forum.com/u/dbf)\
**Replies:** 1\
**Last updated:** [August 22, 2009, 12:11am UTC](https://www.ruby-forum.com/t/natrix-the-named-matrix/174131 "2009-08-22T00:11:22Z")

</div>

Natrix is a class for making named matrix structures (more for text than math). It was designed to take rows of data and put the value of each row in a cell in the matrix. In other words, the row contains an x, y, and…

---

## [Constructing an (xml) request properly for http post to an api](https://www.ruby-forum.com/t/constructing-an-xml-request-properly-for-http-post-to-an-api/121581)

<div class="topic-metadata">

**Author:** [@scootiepuff](https://www.ruby-forum.com/u/scootiepuff)\
**Replies:** 4\
**Last updated:** [August 21, 2009, 9:47pm UTC](https://www.ruby-forum.com/t/constructing-an-xml-request-properly-for-http-post-to-an-api/121581 "2009-08-21T21:47:30Z")

</div>

hello, goal: send a request that includes xml syntax via http post to emaillabs’ api problem: would like help in constructing the (xml) request properly if one scrolls to the bottom of the emaillabs api overview doc…

---

## [Help : a scoping question](https://www.ruby-forum.com/t/help-a-scoping-question/174178)

<div class="topic-metadata">

**Author:** [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Replies:** 2\
**Last updated:** [August 21, 2009, 9:05pm UTC](https://www.ruby-forum.com/t/help-a-scoping-question/174178 "2009-08-21T21:05:57Z")

</div>

A meta-programming question. More precisely a scoping problem. In short, is there a ruby way to execute a parameter-less block with a given receiver ? Here below my example : I am manipulating a pattern of rectangular…

---

## [\[Bug #1963\] redo'ing deadlock causes \[BUG\]](https://www.ruby-forum.com/t/bug-1963-redoing-deadlock-causes-bug/174060)

<div class="topic-metadata">

**Author:** [@Usaku\_NAKAMURA](https://www.ruby-forum.com/u/Usaku_NAKAMURA)\
**Replies:** 1\
**Last updated:** [August 21, 2009, 5:18pm UTC](https://www.ruby-forum.com/t/bug-1963-redoing-deadlock-causes-bug/174060 "2009-08-21T17:18:05Z")

</div>

Bug #1963: redo’ing deadlock causes \[BUG\] http://redmine.ruby-lang.org/issues/show/1963 e$B5/I\<\<Te(B: Usaku NAKAMURA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: core, Target version: 1.9.x ruby -v: …

---

## [Windows ENV object being corrupted](https://www.ruby-forum.com/t/windows-env-object-being-corrupted/173605)

<div class="topic-metadata">

**Author:** [@hermans](https://www.ruby-forum.com/u/hermans)\
**Replies:** 8\
**Last updated:** [August 21, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/windows-env-object-being-corrupted/173605 "2009-08-21T17:13:20Z")

</div>

I am running in rake ( I have reproduced the problem with a straight ruby script ) and I read in a batch file that has a few hundred environment variables in it. At some magic point when 323 entries are made to the E…

---

## [Syntax for checking a textbox is in inactive state](https://www.ruby-forum.com/t/syntax-for-checking-a-textbox-is-in-inactive-state/174162)

<div class="topic-metadata">

**Author:** [@ravikanth](https://www.ruby-forum.com/u/ravikanth)\
**Replies:** 2\
**Last updated:** [August 21, 2009, 4:52pm UTC](https://www.ruby-forum.com/t/syntax-for-checking-a-textbox-is-in-inactive-state/174162 "2009-08-21T16:52:53Z")

</div>

I am testing a webpage in which i shd chk for a textbox is incative or not can any one tell me the syantax for it in ruby thnx in advance

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

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