# Ruby

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

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

---

## [Image upload using ajax](https://www.ruby-forum.com/t/image-upload-using-ajax/136388)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/image-upload-using-ajax/136388 "2008-05-01T16:30:46Z")

</div>

Hi is it possible to upload images using ajax in ruby on rails,If any one knows please help me With regards, Lostwarrior

---

## [How to create "def method(item)= (value)"?](https://www.ruby-forum.com/t/how-to-create-def-method-item-value/136291)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 27\
**Last updated:** [May 1, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/how-to-create-def-method-item-value/136291 "2008-05-01T16:14:27Z")

</div>

Hi, is it not possible to create a method to use in this way? my\_object.param(“tag”) = “new\_value” How to define that method? I’ve tryed something as: def param(name)= (value) @params\[name\] = value end but obviousl…

---

## [Where and how is defined "attr\_accessor"?](https://www.ruby-forum.com/t/where-and-how-is-defined-attr-accessor/136238)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 3\
**Last updated:** [May 1, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/where-and-how-is-defined-attr-accessor/136238 "2008-05-01T16:10:56Z")

</div>

Hi, I’ve done some custom “field\_accessor” (similar to “attr\_accessor” but with some neccessary difference). It works perfectly if I defined “field\_accessor” in the same class: class Header def self.field\_accessor(n…

---

## [UTF-8 in Ruby](https://www.ruby-forum.com/t/utf-8-in-ruby/133794)

<div class="topic-metadata">

**Author:** [@vaibhav](https://www.ruby-forum.com/u/vaibhav)\
**Replies:** 3\
**Last updated:** [May 1, 2008, 4:03pm UTC](https://www.ruby-forum.com/t/utf-8-in-ruby/133794 "2008-05-01T16:03:23Z")

</div>

hi all - Whats the recommended way to ensure that a string sent over the wire is UTF-8. I want to do a post to a web-service and the content needs to be UTF-8. Whats the best way to do - “content”.encoding(‘UTF-8’) …

---

## [Why can't I rescue OLE Exceptions?](https://www.ruby-forum.com/t/why-cant-i-rescue-ole-exceptions/136325)

<div class="topic-metadata">

**Author:** [@nilezparker](https://www.ruby-forum.com/u/nilezparker)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 2:59pm UTC](https://www.ruby-forum.com/t/why-cant-i-rescue-ole-exceptions/136325 "2008-05-01T14:59:41Z")

</div>

I’ve had this problem consistently over the past year and just now I actually DO need to find the fix if it is AT ALL possible. WIN32OLE raises an Exception when there are simple problems in OLE operations. I put in a…

---

## [CANNOT get Ruby to work with SQL](https://www.ruby-forum.com/t/cannot-get-ruby-to-work-with-sql/136383)

<div class="topic-metadata">

**Author:** [@cornelombaard](https://www.ruby-forum.com/u/cornelombaard)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/cannot-get-ruby-to-work-with-sql/136383 "2008-05-01T14:21:22Z")

</div>

Please can someone help me? I get the following error message when I start the rails server and I click on About your application environment. Errno::ENOENT in Rails/infoController#properties No such file or director…

---

## [Search string for occurneces of words stored in array](https://www.ruby-forum.com/t/search-string-for-occurneces-of-words-stored-in-array/136299)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 14\
**Last updated:** [May 1, 2008, 1:50pm UTC](https://www.ruby-forum.com/t/search-string-for-occurneces-of-words-stored-in-array/136299 "2008-05-01T13:50:51Z")

</div>

Hi, I have a sentence “This is my test sentence” and an array\[“is”, “the”, “my”\] and what i need to do is find the occurence of any of thearray words in the sentence. I have this working in a loop but i was wondering…

---

## [1.div(0.0) is -2147483648](https://www.ruby-forum.com/t/1-div-0-0-is-2147483648/136374)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 10:44am UTC](https://www.ruby-forum.com/t/1-div-0-0-is-2147483648/136374 "2008-05-01T10:44:02Z")

</div>

e$B0J2\<$N$h$&$K!"e(B1.div(0.0) e$B$,e(B -2147483648 e$B$K$J$k$N$OJQ$J$s$8$ce(B e$B$J$$$G$7$g$&$+!#e(B % ./ruby -ve ‘p 1.div(0.0)’ ruby 1.9.0 (2008-05-01 revision 16250) \[i686-linux\] -2147483648

---

## [(0..4).step(obj with to\_int)](https://www.ruby-forum.com/t/0-4-step-obj-with-to-int/136371)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 10:18am UTC](https://www.ruby-forum.com/t/0-4-step-obj-with-to-int/136371 "2008-05-01T10:18:16Z")

</div>

e$B0J2\<$N$h$&$K!"e(Bstep e$B$N0z?t$Ke(B to\_int e$B$r$b$D@0?t$b$I$-$rM?$($ke(B e$B$HNc30$K$J$j$^$9!#e(B % ./ruby -ve ‘o=Object.new; def o.to\_int() 1 end; (0…4).step(o) {|v| p v }’ ruby 1.9.0 (2008-05-01 revision 1625…

---

## [Step can't be 0 by (0..10).step(0.9)](https://www.ruby-forum.com/t/step-cant-be-0-by-0-10-step-0-9/136367)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 9:36am UTC](https://www.ruby-forum.com/t/step-cant-be-0-by-0-10-step-0-9/136367 "2008-05-01T09:36:00Z")

</div>

e$B0J2\<$N$h$&$K!"e(B(0…10).step(0.9) {|x| p x } e$B$,Nc30$K$J$j$^$9!#e(B % ./ruby -ve ‘(0…10).step(0.9) {|x| p x }’ ruby 1.9.0 (2008-05-01 revision 16250) \[i686-linux\] -e:1:in step': step can't be 0 (ArgumentError) f…

---

## [O = Object.new; def o.to\_hash() {1=\>2} end; p Hash\[o\]](https://www.ruby-forum.com/t/o-object-new-def-o-to-hash-1-2-end-p-hash-o/136363)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 9:06am UTC](https://www.ruby-forum.com/t/o-object-new-def-o-to-hash-1-2-end-p-hash-o/136363 "2008-05-01T09:06:10Z")

</div>

e$B0J2\<$N7k2L$,e(B {} e$B$K$J$k$N$OJQ$8$c$J$$$G$7$g$&$+!#e(B % ./ruby -ve ‘o = Object.new; def o.to\_hash() {1=\>2} end; p Hash\[o\]’ ruby 1.9.0 (2008-05-01 revision 16248) \[i686-linux\] {}

---

## [Rdoc link question](https://www.ruby-forum.com/t/rdoc-link-question/136362)

<div class="topic-metadata">

**Author:** [@calande](https://www.ruby-forum.com/u/calande)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 9:04am UTC](https://www.ruby-forum.com/t/rdoc-link-question/136362 "2008-05-01T09:04:20Z")

</div>

Does anyone know how to have a named link in Rdoc simple markup with a space in it? Ie: linklabel\[link:linkdestination.html\] Where linklabel can have a space?

---

## [ENV.delete\_if](https://www.ruby-forum.com/t/env-delete-if/136361)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 8:12am UTC](https://www.ruby-forum.com/t/env-delete-if/136361 "2008-05-01T08:12:23Z")

</div>

ENV.delete\_if e$B$,e(B ENV e$B\<+?H$rJV$9$N$OJQ$J$s$8$c$J$$$G$7$g$&$+!#e(B % ./ruby -ve ‘p ENV.delete\_if.equal?(ENV)’ ruby 1.9.0 (2008-05-01 revision 16248) \[i686-linux\] true

---

## [0x3fffffff.div(2.0) and 0x40000001.div(2.0)](https://www.ruby-forum.com/t/0x3fffffff-div-2-0-and-0x40000001-div-2-0/136359)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 6:49am UTC](https://www.ruby-forum.com/t/0x3fffffff-div-2-0-and-0x40000001-div-2-0/136359 "2008-05-01T06:49:23Z")

</div>

e$B0J2\<$N$h$&$K!"e(B0x3fffffff.div(2.0) e$B$He(B 0x40000001.div(2.0) e$B$Ge(B e$B\>.?tE@0J2\<$,$D$/$+$I$&$+$,0c$$$^$9!#e(B % ./ruby -e ‘p 0x3fffffff.div(2.0)’ 536870911 % ./ruby -e ‘p 0x40000001.div(2.0)’ 536870912.5 …

---

## [Ruby 1.8.6 (i486-linux)](https://www.ruby-forum.com/t/ruby-1-8-6-i486-linux/136350)

<div class="topic-metadata">

**Author:** [@mamboze](https://www.ruby-forum.com/u/mamboze)\
**Replies:** 5\
**Last updated:** [May 1, 2008, 6:45am UTC](https://www.ruby-forum.com/t/ruby-1-8-6-i486-linux/136350 "2008-05-01T06:45:18Z")

</div>

First post here, I hope this is the right forum :slight\_smile: I’ve installed Ruby on a Ubuntu Gutsy box - Pentium 4 2.8Ghz, but when I check the version with the Rails splash screen (localhost:3000) it shows Ruby ve…

---

## [Ruby program for sql query](https://www.ruby-forum.com/t/ruby-program-for-sql-query/136357)

<div class="topic-metadata">

**Author:** [@ron](https://www.ruby-forum.com/u/ron)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 6:39am UTC](https://www.ruby-forum.com/t/ruby-program-for-sql-query/136357 "2008-05-01T06:39:27Z")

</div>

Hi everybody, I am currently working on a database system that utilizes ruby on rails with a oracle database. Here’s the situation: the ruby on rails web application is up and running; my oracle database is full of …

---

## [What is attr\_accessor?](https://www.ruby-forum.com/t/what-is-attr-accessor/136262)

<div class="topic-metadata">

**Author:** [@tenxian](https://www.ruby-forum.com/u/tenxian)\
**Replies:** 5\
**Last updated:** [May 1, 2008, 6:08am UTC](https://www.ruby-forum.com/t/what-is-attr-accessor/136262 "2008-05-01T06:08:26Z")

</div>

I even don’t know what attr\_accessor is.

---

## [Gems and superuser rights](https://www.ruby-forum.com/t/gems-and-superuser-rights/136335)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 4:46am UTC](https://www.ruby-forum.com/t/gems-and-superuser-rights/136335 "2008-05-01T04:46:35Z")

</div>

Dear all, several gems I’ve recently installed can only be used if executed as superuser (gsl and rmagick) on Ubuntu Gutsy (7.10). What could be the reason for this ? Thank you very much. Best regards, Axel

---

## [Typed ruby](https://www.ruby-forum.com/t/typed-ruby/135953)

<div class="topic-metadata">

**Author:** [@Joe\_K](https://www.ruby-forum.com/u/Joe_K)\
**Replies:** 14\
**Last updated:** [May 1, 2008, 4:07am UTC](https://www.ruby-forum.com/t/typed-ruby/135953 "2008-05-01T04:07:22Z")

</div>

I realize there is a holy war attached to this subject, but it would be nice to see a standard notation or library that would give ‘types’ to variables and methods, thereby potentially useful for IDE auto-completion;…

---

## [Rails is a mess!](https://www.ruby-forum.com/t/rails-is-a-mess/136214)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 14\
**Last updated:** [May 1, 2008, 3:45am UTC](https://www.ruby-forum.com/t/rails-is-a-mess/136214 "2008-05-01T03:45:08Z")

</div>

I have to say that rails is such a mess right now. Notta working and it sucks. I would prefer slower build out to failed stuff. Oniguruma does not work on ruby v1.8.6 and gem install oniguruma fails, and compile wo…

---

## [Nebular Gauntlet 0.6](https://www.ruby-forum.com/t/nebular-gauntlet-0-6/136346)

<div class="topic-metadata">

**Author:** [@S-redyck](https://www.ruby-forum.com/u/S-redyck)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 1:20am UTC](https://www.ruby-forum.com/t/nebular-gauntlet-0-6/136346 "2008-05-01T01:20:34Z")

</div>

A new release for Nebular Gauntlet for the first time in quite a while. Not too much has changed, sadly life has gotten in the way. However, there are a couple big ones. Ruby 1.9 compatibility allows much greater spee…

---

## [Question on Procs](https://www.ruby-forum.com/t/question-on-procs/136258)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 12:05am UTC](https://www.ruby-forum.com/t/question-on-procs/136258 "2008-05-01T00:05:33Z")

</div>

What is the difference between this: list = \[1, 2, 3, 4, 5, 6, 7, 8, 9, 10\] def make\_filter(predicate, list) result = \[\] list.each do |element| result \<\< element if predicate.call(element) end result end require…

---

## [Re: Opening up our tree to external committers](https://www.ruby-forum.com/t/re-opening-up-our-tree-to-external-committers/136340)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 0\
**Last updated:** [April 30, 2008, 10:53pm UTC](https://www.ruby-forum.com/t/re-opening-up-our-tree-to-external-committers/136340 "2008-04-30T22:53:56Z")

</div>

I have been coding in C# for quite a while, I would love to chip in… Thanks. ----- Original Message ---- From: Michael L. removed\_email\_address@domain.invalid To: removed\_email\_address@domain.invalid Sent: Wednesday…

---

## [Leak stuff](https://www.ruby-forum.com/t/leak-stuff/136213)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 6\
**Last updated:** [April 30, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/leak-stuff/136213 "2008-04-30T22:14:34Z")

</div>

Has anything being done on these? def leak “name”.split(/::/) end loop {leak} # leaks loop do rand(10000000).to\_s.to\_sym # leaks end ? -R

---

## [Using ruby libraries with IronRuby](https://www.ruby-forum.com/t/using-ruby-libraries-with-ironruby/136310)

<div class="topic-metadata">

**Author:** [@stenzer](https://www.ruby-forum.com/u/stenzer)\
**Replies:** 1\
**Last updated:** [April 30, 2008, 9:16pm UTC](https://www.ruby-forum.com/t/using-ruby-libraries-with-ironruby/136310 "2008-04-30T21:16:18Z")

</div>

I have a bunch of things running around in my head that I’m curious about regarding IronRuby and I’m not sure where to find the answer. I figure my best bet is to drop my questions here. The first question I have i…

---

## [Array#first is not Array#](https://www.ruby-forum.com/t/array-first-is-not-array/136134)

<div class="topic-metadata">

**Author:** [@Fredrik](https://www.ruby-forum.com/u/Fredrik)\
**Replies:** 18\
**Last updated:** [April 30, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/array-first-is-not-array/136134 "2008-04-30T21:10:16Z")

</div>

I made a class that is a subclass of Array : class MyClass \< Array def “Here you go: #{super(i)}” end end and I thought that Array#first and Array#last was just syntactic sugar that would translate to Array#\[0\] a…

---

## [Xmlrpc and 64bit systems](https://www.ruby-forum.com/t/xmlrpc-and-64bit-systems/136307)

<div class="topic-metadata">

**Author:** [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Replies:** 0\
**Last updated:** [April 30, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/xmlrpc-and-64bit-systems/136307 "2008-04-30T18:31:03Z")

</div>

e$B@.@%$G$9!#e(B xmlrpc e$B$K$Oe(B 32bit e$B0J\>e$N@0?t$r;}$F$J$$$h$&$K$9$k@\_Dj$,$"$j$^$9!#e(B config.rb # allows integers greater than 32-bit if true ENABLE\_BIGINT = false e$B$7$+$7!"3:EvItJ,$N%3!\<%I$,0J2\<$N…

---

## [Determing what os is running](https://www.ruby-forum.com/t/determing-what-os-is-running/135858)

<div class="topic-metadata">

**Author:** [@cbcbcb](https://www.ruby-forum.com/u/cbcbcb)\
**Replies:** 6\
**Last updated:** [April 30, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/determing-what-os-is-running/135858 "2008-04-30T17:41:39Z")

</div>

I need to execute commands differently based on the underlying platform. I don’t need it down to the patch level or anything like that – just basic stuff. How do I test whether I’m runnnig on Windows, Linux, or Mac? …

---

## [Forkoff - parallel processing for ruby enumerables](https://www.ruby-forum.com/t/forkoff-parallel-processing-for-ruby-enumerables/135119)

<div class="topic-metadata">

**Author:** [@ara\_howard](https://www.ruby-forum.com/u/ara_howard)\
**Replies:** 22\
**Last updated:** [April 30, 2008, 5:33pm UTC](https://www.ruby-forum.com/t/forkoff-parallel-processing-for-ruby-enumerables/135119 "2008-04-30T17:33:25Z")

</div>

NAME forkoff SYNOPSIS brain-dead simple parallel processing for ruby URI http://rubyforge.org/projects/codeforpeople INSTALL gem install forkoff DESCRIPTION forkoff works for any enumerable object, iterating a c…

---

## [0\*\*-1 == 0?](https://www.ruby-forum.com/t/0-1-0/136266)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 9\
**Last updated:** [April 30, 2008, 5:27pm UTC](https://www.ruby-forum.com/t/0-1-0/136266 "2008-04-30T17:27:34Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B r14005 e$B$Ge(B 14005 ko1 assert\_equal(0\*\*-1 == 0, false) e$B$H$$$&%F%9%H$,2C$($i$l$F$$$^$9$,!"e(B0\*\*-1e$B$C$FK\\Ev$K%\<%m$J$s$G$7$ge(B e$B$&$+!)e(B e$B\<j85$N=hM}7O$Ge(B0e$B…

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

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