# Ruby

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

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

---

## [Printing columns](https://www.ruby-forum.com/t/printing-columns/143194)

<div class="topic-metadata">

**Author:** [@mariachi77](https://www.ruby-forum.com/u/mariachi77)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 7:11am UTC](https://www.ruby-forum.com/t/printing-columns/143194 "2008-07-16T07:11:17Z")

</div>

I’m trying to print some data to the terminal in columns and haven’t seen a way to do it properly. I’ve tried “fred”.center(80) to try and center the text at column 80 but when I start entering data before “fred” it …

---

## [ClassLoader to use](https://www.ruby-forum.com/t/classloader-to-use/143191)

<div class="topic-metadata">

**Author:** [@S\_SSS](https://www.ruby-forum.com/u/S_SSS)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 6:23am UTC](https://www.ruby-forum.com/t/classloader-to-use/143191 "2008-07-16T06:23:55Z")

</div>

Folks, In the class JavaSupport, the following method uses the JRubyClassLoader whose parent is the context classloader at the time of creation of JRubyClassloader (say A). This seems restrictive. Now at some later p…

---

## [Problems with win32 Process.kill](https://www.ruby-forum.com/t/problems-with-win32-process-kill/143164)

<div class="topic-metadata">

**Author:** [@syg6](https://www.ruby-forum.com/u/syg6)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 4:57am UTC](https://www.ruby-forum.com/t/problems-with-win32-process-kill/143164 "2008-07-16T04:57:56Z")

</div>

I have followed the discussion for getting the win32 methods Process.create and Process.kill to work that have been posted earlier on this forum. In an electronic signage project, I have no trouble getting Ruby to cre…

---

## [What was YOUR first Ruby Project](https://www.ruby-forum.com/t/what-was-your-first-ruby-project/140464)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 25\
**Last updated:** [July 16, 2008, 3:41am UTC](https://www.ruby-forum.com/t/what-was-your-first-ruby-project/140464 "2008-07-16T03:41:56Z")

</div>

I though it be cool to hear what your first experience with Ruby was. Was it a job, or just a fun (cough, cough) side project that you decided to take on? For me, Ruby is my entrance to the world of programming. My …

---

## [NullPointerException while trying to pass closure](https://www.ruby-forum.com/t/nullpointerexception-while-trying-to-pass-closure/143165)

<div class="topic-metadata">

**Author:** [@Bryan\_Castillo](https://www.ruby-forum.com/u/Bryan_Castillo)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/nullpointerexception-while-trying-to-pass-closure/143165 "2008-07-15T23:47:16Z")

</div>

I am getting this exception: each\_table\_path: s3bucket=bucket, domain=alpha Exception in thread “main” java.lang.NullPointerException at org.jruby.javasupport.util.RuntimeHelpers.processBlockArgument(RuntimeHelpers.j…

---

## [Immediately print a string on stdout without new line?](https://www.ruby-forum.com/t/immediately-print-a-string-on-stdout-without-new-line/143169)

<div class="topic-metadata">

**Author:** [@janus](https://www.ruby-forum.com/u/janus)\
**Replies:** 6\
**Last updated:** [July 15, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/immediately-print-a-string-on-stdout-without-new-line/143169 "2008-07-15T23:37:18Z")

</div>

Hi everyone! I’m trying to do something like this: print "Processing… " #some fancy code that takes ages, or maybe: sleep(3) print “done\\n” I was expecting to get the following output on my console: Processing… \[a…

---

## [Re: using ActiveRecord-jdbcmysql-adapter and rake db:drop:all doesn't work](https://www.ruby-forum.com/t/re-using-activerecord-jdbcmysql-adapter-and-rake-dball-doesnt-work/143156)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/re-using-activerecord-jdbcmysql-adapter-and-rake-dball-doesnt-work/143156 "2008-07-15T21:19:08Z")

</div>

Hi Nick, I got past my original problem but have stumbled accross something else. I have ActiveRecord-jdbcmysql-adapter installed. I have rails 2.1 I followed this little tutorial: http://blog.emptyway.com/2008/04/0…

---

## [Logging issue w/ JRuby 1.1.2 on Glassfish](https://www.ruby-forum.com/t/logging-issue-w-jruby-1-1-2-on-glassfish/143139)

<div class="topic-metadata">

**Author:** [@Joel\_ESWilson](https://www.ruby-forum.com/u/Joel_ESWilson)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/logging-issue-w-jruby-1-1-2-on-glassfish/143139 "2008-07-15T20:31:36Z")

</div>

All of the apps that I’m working to transition from pack-of-mongrels to JRuby on Glassfish (v2) have a context-root of / and in order to continue that tradition, I’ve decided to set up a virtual server for each one. T…

---

## [Shoes adding video support](https://www.ruby-forum.com/t/shoes-adding-video-support/143152)

<div class="topic-metadata">

**Author:** [@Edward\_R](https://www.ruby-forum.com/u/Edward_R)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/shoes-adding-video-support/143152 "2008-07-15T20:26:55Z")

</div>

I am running ubuntu 8.04 and when I try to run the mp3 player for shoes it says there is no video support. Can someone point me to where I can add the video support thanks

---

## [Code Review: TokenizerFixes](https://www.ruby-forum.com/t/code-review-tokenizerfixes/143161)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/code-review-tokenizerfixes/143161 "2008-07-15T20:25:45Z")

</div>

tfpt review “/shelveset:TokenizerFixes;REDMOND\\tomat” Refactors string terminators in Ruby tokenizer a bit. Removes unnecesary calls to newtok() method that allocated a new StringBuilder per each token. Fixes handlin…

---

## [Lone Star Ruby Conference 2008 - Registration Now Open](https://www.ruby-forum.com/t/lone-star-ruby-conference-2008-registration-now-open/143157)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/lone-star-ruby-conference-2008-registration-now-open/143157 "2008-07-15T20:14:37Z")

</div>

The second annual Lone Star Ruby Conference is heating up and right around the corner, running for three days, September 4-6 in Austin, TX. http://LoneStarRubyConf.com The Lone Star Ruby Conference is dedicated to pro…

---

## [Problem in rubygems installation](https://www.ruby-forum.com/t/problem-in-rubygems-installation/142692)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 8:02pm UTC](https://www.ruby-forum.com/t/problem-in-rubygems-installation/142692 "2008-07-15T20:02:19Z")

</div>

Dear all, while installing rubygems(1.2.0) in windows I am getting the below error. command used: ruby setup.rb ./lib/rubygems/spec\_fetcher.rb:1:in require': no such file to load -- zlib (Loa dError) from ./lib/rubyg…

---

## [Hoe dependencies](https://www.ruby-forum.com/t/hoe-dependencies/142930)

<div class="topic-metadata">

**Author:** [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Replies:** 5\
**Last updated:** [July 15, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/hoe-dependencies/142930 "2008-07-15T19:58:48Z")

</div>

Hello list, Is it possible to remove the dependency on Hoe from a gem that I’ve used Hoe to create? Far as I can tell, I only need Hoe to build the gem – the gem itself does not need Hoe to run so it shouldn’t inclu…

---

## [Help with Threads in Java2D](https://www.ruby-forum.com/t/help-with-threads-in-java2d/143138)

<div class="topic-metadata">

**Author:** [@paulf](https://www.ruby-forum.com/u/paulf)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 7:01pm UTC](https://www.ruby-forum.com/t/help-with-threads-in-java2d/143138 "2008-07-15T19:01:26Z")

</div>

Hi All, This code is from the Java2D line examples Conversion of most of the sample code has gone well, but the threads have thrown me into a state of confusion :slight\_smile: Any clues on how to code the followin…

---

## [Array ending syntax question](https://www.ruby-forum.com/t/array-ending-syntax-question/143098)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 3\
**Last updated:** [July 15, 2008, 6:57pm UTC](https://www.ruby-forum.com/t/array-ending-syntax-question/143098 "2008-07-15T18:57:54Z")

</div>

irb(main):001:0\> \[1,2\]\[2…2\] =\> \[\] irb(main):002:0\> \[1,2\]\[3…3\] =\> nil Is this expected? the ri says: Returns nil if the index (or starting index) are out of range. does the first example match this? Thanks! -R

---

## [Using ActiveRecord-jdbcmysql-adapter](https://www.ruby-forum.com/t/using-activerecord-jdbcmysql-adapter/143130)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 6:06pm UTC](https://www.ruby-forum.com/t/using-activerecord-jdbcmysql-adapter/143130 "2008-07-15T18:06:49Z")

</div>

Hi, I’m trying to understand which ActiveRecord jdbc adapter I should be using. When I install the activerecord-jdbcmysql-adapter I always see the following output when I am doing stuff: WARNING: You’re using the Ru…

---

## [Ruby 1.9.0/1.8.7/1.8.6/1.8.5 new releases (Security Fix)](https://www.ruby-forum.com/t/ruby-1-9-0-1-8-7-1-8-6-1-8-5-new-releases-security-fix/140987)

<div class="topic-metadata">

**Author:** [@Urabe\_S](https://www.ruby-forum.com/u/Urabe_S)\
**Replies:** 88\
**Last updated:** [July 15, 2008, 5:34pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-1-8-7-1-8-6-1-8-5-new-releases-security-fix/140987 "2008-07-15T17:34:15Z")

</div>

Hi all. Some vulnerabilities were found on Ruby, one of which allow attackers to execute arbitrary codes. These are releases to fix those problems. Also note this is the last official release of ruby 1.8.5. No suppo…

---

## [Re: ActiveRecord adapter](https://www.ruby-forum.com/t/re-activerecord-adapter/143136)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 4:12pm UTC](https://www.ruby-forum.com/t/re-activerecord-adapter/143136 "2008-07-15T16:12:57Z")

</div>

This was it. Apparently when I installed jdbcmysql I THOUGHT i changed the database.yml… but I didn’t change it right. User error… thanks! Jay On Tue, Jul 15, 2008 at 9:49 AM, Matthew W. wrote: My first guess wou…

---

## [ActiveRecord adapter](https://www.ruby-forum.com/t/activerecord-adapter/143131)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 3\
**Last updated:** [July 15, 2008, 3:39pm UTC](https://www.ruby-forum.com/t/activerecord-adapter/143131 "2008-07-15T15:39:30Z")

</div>

Sorry for the last post… send got hit indavertently (darn web based mail client) As I said I am trying to use the active record jdbc adapter. When I install and run the activerecord-jdbcmysql-adapter i get: WARNING: …

---

## [Extracting range of lines](https://www.ruby-forum.com/t/extracting-range-of-lines/143119)

<div class="topic-metadata">

**Author:** [@tmarc](https://www.ruby-forum.com/u/tmarc)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 2:00pm UTC](https://www.ruby-forum.com/t/extracting-range-of-lines/143119 "2008-07-15T14:00:03Z")

</div>

Hello, are there a ruby equivalents to perl’s /regex/ … /regex/ and / regex/ … /regex/ idioms, examples described at http://www.unix.com.ua/orelly/perl/cookbook/ch06\_09.htm? I’ve been googling around with no relevant…

---

## [Character-encodings gem with Ruby 1.9](https://www.ruby-forum.com/t/character-encodings-gem-with-ruby-1-9/142723)

<div class="topic-metadata">

**Author:** [@stefans](https://www.ruby-forum.com/u/stefans)\
**Replies:** 3\
**Last updated:** [July 15, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/character-encodings-gem-with-ruby-1-9/142723 "2008-07-15T12:41:00Z")

</div>

Hello, I tried to install Nikolai W.'s Ruby Character Encodings Library \[1\] with Ruby 1.9, but didn’t succeed. $ sudo gem1.9 install character-encodings Building native extensions. This could take a while… ERROR: …

---

## [Displaying array elements in order](https://www.ruby-forum.com/t/displaying-array-elements-in-order/143111)

<div class="topic-metadata">

**Author:** [@ganana\_srishti](https://www.ruby-forum.com/u/ganana_srishti)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 12:36pm UTC](https://www.ruby-forum.com/t/displaying-array-elements-in-order/143111 "2008-07-15T12:36:35Z")

</div>

Hi, for example a=\[12,354,633,68,85\] \<%for i in a%\> \<%z=Document.find(i)%\> \<%=z.name%\> \<%end%\> Here the result is displaying randomly in browser but i want to display the result in the array order i.e first 12 t…

---

## [The Regular exp read from file not matching!](https://www.ruby-forum.com/t/the-regular-exp-read-from-file-not-matching/142991)

<div class="topic-metadata">

**Author:** [@shambolic](https://www.ruby-forum.com/u/shambolic)\
**Replies:** 4\
**Last updated:** [July 15, 2008, 11:55am UTC](https://www.ruby-forum.com/t/the-regular-exp-read-from-file-not-matching/142991 "2008-07-15T11:55:53Z")

</div>

I am trying to read the syntax(here the regular expression) frpm a file. When I use /^\[0-1\]{1}$/ with “1” as subject it works but /^\[0-1\]{1}\[a-zA-Z\]{1,25}$/ syntax for “1,abcd” , I have checked out on the interpreter …

---

## [Regexp with gaps](https://www.ruby-forum.com/t/regexp-with-gaps/143019)

<div class="topic-metadata">

**Author:** [@egrasso](https://www.ruby-forum.com/u/egrasso)\
**Replies:** 3\
**Last updated:** [July 15, 2008, 11:16am UTC](https://www.ruby-forum.com/t/regexp-with-gaps/143019 "2008-07-15T11:16:02Z")

</div>

Hi, I need to find the position of some substrings inside of a long string. For this I’m using a loop that uses str.index(pattern, (last\_found\_position+1)) so I find all positions where the pattern matches. The patter…

---

## [\[Bug:trunk\] Thread#kill cannot break BLOCKING\_REGION() on windows](https://www.ruby-forum.com/t/bug-trunk-thread-kill-cannot-break-blocking-region-on-windows/142812)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 3\
**Last updated:** [July 15, 2008, 11:12am UTC](https://www.ruby-forum.com/t/bug-trunk-thread-kill-cannot-break-blocking-region-on-windows/142812 "2008-07-15T11:12:30Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B Windows(e$B=|e(Bcygwin)e$B$G$O!“30It$+$ie(BBLOCKING\_REGION()e$B$rCfCG$5$;$ke(B e$B$3$H$,$G$-$J$$$N$G!”$"$k%9%l%C%I$,e(BBLOCKING\_REGION()e$B$KF~$C$F$$e(B e$B$k\>l9g!"$=$N…

---

## [Reading Web Feeds (RSS, Atom) in Ruby - Pros and Cons of Web Feed Libraries](https://www.ruby-forum.com/t/reading-web-feeds-rss-atom-in-ruby-pros-and-cons-of-web-feed-libraries/143106)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 10:16am UTC](https://www.ruby-forum.com/t/reading-web-feeds-rss-atom-in-ruby-pros-and-cons-of-web-feed-libraries/143106 "2008-07-15T10:16:15Z")

</div>

Hello, I’ve published a mini tutorial on how to read web feeds (RSS, Atom) using the standard Ruby library. Full article @ http://rubybook.wordpress.com/2008/07/15/read-web-feeds-rss-atom I’ve also included a list o…

---

## [Proc argument names instead of arity](https://www.ruby-forum.com/t/proc-argument-names-instead-of-arity/143094)

<div class="topic-metadata">

**Author:** [@macario](https://www.ruby-forum.com/u/macario)\
**Replies:** 6\
**Last updated:** [July 15, 2008, 8:14am UTC](https://www.ruby-forum.com/t/proc-argument-names-instead-of-arity/143094 "2008-07-15T08:14:05Z")

</div>

Hi, i am trying to make a SuperCollider(http://www.audiosynth.com/) client for ruby and I want it to be as close as using SCLang. Both languages are very similar, although i find ruby more concise but SCLang function …

---

## [Date format](https://www.ruby-forum.com/t/date-format/142998)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 6\
**Last updated:** [July 15, 2008, 6:13am UTC](https://www.ruby-forum.com/t/date-format/142998 "2008-07-15T06:13:37Z")

</div>

Hi I have code sd\_ticket\_end\_date=Date.today This gives 07/14/2008 00:00 How can I format this to 2008-07-14 Thanks in advance Sijo

---

## [Warbler feedback](https://www.ruby-forum.com/t/warbler-feedback/143087)

<div class="topic-metadata">

**Author:** [@tma](https://www.ruby-forum.com/u/tma)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 5:49am UTC](https://www.ruby-forum.com/t/warbler-feedback/143087 "2008-07-15T05:49:06Z")

</div>

Hi, I don’t know if this is the correct place for this feedback, please let me know if not. We’ve recently released a Rails apps running under JRuby, and I’ve some feedback stemming from our experience using Warbler …

---

## [Introspection question](https://www.ruby-forum.com/t/introspection-question/143011)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 3\
**Last updated:** [July 15, 2008, 4:06am UTC](https://www.ruby-forum.com/t/introspection-question/143011 "2008-07-15T04:06:33Z")

</div>

Hello, Let us say we have a hash: a = Hash.new Can I do something of this sort: class Hash def who\_am\_i? “#{self.symbol}” end end Where self.symbol gives me “a”? I basically want the variable name. I looked a b…

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

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