# Ruby

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

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

---

## [Editing Image](https://www.ruby-forum.com/t/editing-image/68544)

<div class="topic-metadata">

**Author:** [@Naga\_harish\_K](https://www.ruby-forum.com/u/Naga_harish_K)\
**Replies:** 2\
**Last updated:** [September 13, 2006, 2:55pm UTC](https://www.ruby-forum.com/t/editing-image/68544 "2006-09-13T14:55:15Z")

</div>

Hi all, I have one stuff called image upload. in which if i upload the image it’ll be stored in the database. Its working cool. So can i also edit the image?? means instead of that image i should be stored a new image…

---

## [Using Net::HTTP to prod google adwords api](https://www.ruby-forum.com/t/using-net-http-to-prod-google-adwords-api/68535)

<div class="topic-metadata">

**Author:** [@crenner](https://www.ruby-forum.com/u/crenner)\
**Replies:** 0\
**Last updated:** [September 13, 2006, 1:47pm UTC](https://www.ruby-forum.com/t/using-net-http-to-prod-google-adwords-api/68535 "2006-09-13T13:47:05Z")

</div>

Hi, I’ve been trying to use Net::HTTP with a SOAP (xml) document to query google adwords api. The reason for wanting to do this, is that I’ve stumbled across a problem with one of the methods when using adwords4r. …

---

## [Inheritance and super function](https://www.ruby-forum.com/t/inheritance-and-super-function/68447)

<div class="topic-metadata">

**Author:** [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Replies:** 2\
**Last updated:** [September 13, 2006, 1:05pm UTC](https://www.ruby-forum.com/t/inheritance-and-super-function/68447 "2006-09-13T13:05:02Z")

</div>

hello, Say I have the following Ruby code. Class A def test puts “I am A” end end Class B \< A def test puts “I am B” end end Class C \< B def test puts “I am C” end end Now, in the function test in Class …

---

## [Merge\_sort problem](https://www.ruby-forum.com/t/merge-sort-problem/68529)

<div class="topic-metadata">

**Author:** [@Haofei](https://www.ruby-forum.com/u/Haofei)\
**Replies:** 1\
**Last updated:** [September 13, 2006, 12:59pm UTC](https://www.ruby-forum.com/t/merge-sort-problem/68529 "2006-09-13T12:59:02Z")

</div>

here is the merge\_sort i write in ruby. but it doesn’t produce the right answer, i can’t find where the problem is . thanks in advance def merge(a, p, q, r) a1=a\[0…(q-p)\] a2=a\[(q-p+1)…r\] a1\<\<99999999 a2\<\<99999999 …

---

## [Naming parameters in the method calls](https://www.ruby-forum.com/t/naming-parameters-in-the-method-calls/68528)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 1\
**Last updated:** [September 13, 2006, 12:10pm UTC](https://www.ruby-forum.com/t/naming-parameters-in-the-method-calls/68528 "2006-09-13T12:10:52Z")

</div>

Hi, In BASIC, it is possible to name the parameters in the method calls call: test\_info(test\_description := “Check that window displayed is correct”, expected\_result := "Correct image is displayed") method sub …

---

## [Base64.decode different behaviour](https://www.ruby-forum.com/t/base64-decode-different-behaviour/68518)

<div class="topic-metadata">

**Author:** [@filipk](https://www.ruby-forum.com/u/filipk)\
**Replies:** 0\
**Last updated:** [September 13, 2006, 10:41am UTC](https://www.ruby-forum.com/t/base64-decode-different-behaviour/68518 "2006-09-13T10:41:26Z")

</div>

I am trying to read a value stored in an encrypted cookie in Ruby. The cookie value is 3DES-encrypted and then Base64-encoded. First, I stored the value of a cookie in a file. And then I managed to decode and decrypt …

---

## [Ruby Weekly News 4th - 10th September 2006](https://www.ruby-forum.com/t/ruby-weekly-news-4th-10th-september-2006/68517)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 0\
**Last updated:** [September 13, 2006, 10:34am UTC](https://www.ruby-forum.com/t/ruby-weekly-news-4th-10th-september-2006/68517 "2006-09-13T10:34:39Z")

</div>

http://www.rubyweeklynews.org/20060910.html Ruby Weekly News 4th - 10th September 2006 Ruby Weekly News is a summary of the week’s activity on the ruby-talk mailing list / the comp.lang.ruby newsgroup / Ruby forum, br…

---

## [Rails mysql db:migrate etc](https://www.ruby-forum.com/t/rails-mysql-db-migrate-etc/68468)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 2\
**Last updated:** [September 13, 2006, 7:40am UTC](https://www.ruby-forum.com/t/rails-mysql-db-migrate-etc/68468 "2006-09-13T07:40:27Z")

</div>

Rubies: Examine this command line: ruby /usr/local/bin/rake db:migrate --trace First, a digression about the silly command line, before the actual question: I switched from Ubuntu to Mandriva because the former’s Ru…

---

## [Newbie Alert](https://www.ruby-forum.com/t/newbie-alert/68499)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 4\
**Last updated:** [September 13, 2006, 6:13am UTC](https://www.ruby-forum.com/t/newbie-alert/68499 "2006-09-13T06:13:10Z")

</div>

I am a brand new Ruby beginner, and I have what is undoubtedly a painfully simple newbie question. I’m starting my learning by using the online “Programming Ruby, HTML Help Edition (v0.3a)”, and I’m having trouble get…

---

## [Noob ?: application design](https://www.ruby-forum.com/t/noob-application-design/68498)

<div class="topic-metadata">

**Author:** [@Wendy\_Putler](https://www.ruby-forum.com/u/Wendy_Putler)\
**Replies:** 1\
**Last updated:** [September 13, 2006, 5:36am UTC](https://www.ruby-forum.com/t/noob-application-design/68498 "2006-09-13T05:36:09Z")

</div>

I am trying to write my first ruby on rails app and I am having a little trouble with the design. I can see 2 ways to do it , but I’m sure that I’m not entirely understanding the whole controller/action/layout/view t…

---

## [Variable after when](https://www.ruby-forum.com/t/variable-after-when/68487)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 1\
**Last updated:** [September 13, 2006, 4:28am UTC](https://www.ruby-forum.com/t/variable-after-when/68487 "2006-09-13T04:28:33Z")

</div>

e$B$J$+$@$G$9!#e(B e$B0JA0$A$g$C$HDs0F$7$?3P$($,$"$j$^$9$,!"e(Brescuee$BF1MMe(Bwhene$B$NHf3S7k2Le(B e$B$rJQ?t$KBeF~$9$k9=J8$O$I$&$G$7$g$&$+!#e(BRegexp#===e$B$NLa$jCM$be(B MatchDatae$B$K$9$k$3$H$G!"e(B$~e$B$r;H$&I,MW$r…

---

## [Can't install gems with sudo](https://www.ruby-forum.com/t/cant-install-gems-with-sudo/68485)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 4\
**Last updated:** [September 13, 2006, 4:28am UTC](https://www.ruby-forum.com/t/cant-install-gems-with-sudo/68485 "2006-09-13T04:28:33Z")

</div>

I just built ruby 1.8.5 myself, and now rubygems can’t find remote gems when I run it with sudo privs. It can find the gems when I run it as myself, but then it doesn’t have priviliges needed to install the gem. Did I…

---

## [The economics of a slow but productive Ruby](https://www.ruby-forum.com/t/the-economics-of-a-slow-but-productive-ruby/68367)

<div class="topic-metadata">

**Author:** [@lukfugl](https://www.ruby-forum.com/u/lukfugl)\
**Replies:** 34\
**Last updated:** [September 13, 2006, 4:02am UTC](https://www.ruby-forum.com/t/the-economics-of-a-slow-but-productive-ruby/68367 "2006-09-13T04:02:26Z")

</div>

\[NOTE: I’m trying to present the facts and be objective in this post. I love Ruby, and would choose it any day when economics didn’t matter. But in the sense of the “Real World”, this is what I discovered. And of cour…

---

## [Filtering files while copying/moving](https://www.ruby-forum.com/t/filtering-files-while-copying-moving/68306)

<div class="topic-metadata">

**Author:** [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Replies:** 1\
**Last updated:** [September 13, 2006, 2:48am UTC](https://www.ruby-forum.com/t/filtering-files-while-copying-moving/68306 "2006-09-13T02:48:20Z")

</div>

Hi, I have the need to filter files, replacing in-place-tokens with variables during the copy. I would like to be able to do something like this: FileUtils.filter\_cp\_r from\_dir, to\_dir, { “SERVER1” =\> “s1.example.com”…

---

## [Getting the last word in each line](https://www.ruby-forum.com/t/getting-the-last-word-in-each-line/68474)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 6\
**Last updated:** [September 13, 2006, 1:34am UTC](https://www.ruby-forum.com/t/getting-the-last-word-in-each-line/68474 "2006-09-13T01:34:15Z")

</div>

Is there a prettier way to read a file and return the last word in each line? Here’s my go: File.read(some\_file).to\_a.map { |l| line.split.last } What if I wanted to search the lines (based on a regex) and return the …

---

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

<div class="topic-metadata">

**Author:** [@Fred\_So](https://www.ruby-forum.com/u/Fred_So)\
**Replies:** 0\
**Last updated:** [September 13, 2006, 1:08am UTC](https://www.ruby-forum.com/t/no-subject/68480 "2006-09-13T01:08:14Z")

</div>

matome 17

---

## [Re: removing spaces between single characters with regual ex](https://www.ruby-forum.com/t/re-removing-spaces-between-single-characters-with-regual-ex/68443)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 2\
**Last updated:** [September 13, 2006, 12:26am UTC](https://www.ruby-forum.com/t/re-removing-spaces-between-single-characters-with-regual-ex/68443 "2006-09-13T00:26:11Z")

</div>

From: ciapecki \[mailto:removed\_email\_address@domain.invalid\] ‘A B C’ → ‘ABC’ ‘AB C’ → ‘AB C’ (no change) ‘Teddy Bear A B’ → ‘Teddy Bear AB’ irb(main):005:0\> s = ‘A long cat and a quick mouse met o j…

---

## [Cgi scripts and external css](https://www.ruby-forum.com/t/cgi-scripts-and-external-css/68391)

<div class="topic-metadata">

**Author:** [@splattael](https://www.ruby-forum.com/u/splattael)\
**Replies:** 7\
**Last updated:** [September 12, 2006, 10:25pm UTC](https://www.ruby-forum.com/t/cgi-scripts-and-external-css/68391 "2006-09-12T22:25:57Z")

</div>

Consider this CGI script: #!ruby require “cgi” cgi = CGI.new(“html4”) cgi.out { CGI.pretty( cgi.html { cgi.head { cgi.title{“Example”}+"\<link rel=“stylesheet” type=“text/css” href=“example.css”\>" } + cgi.body{“T…

---

## [Re: removing spaces between single characters with regual ex](https://www.ruby-forum.com/t/re-removing-spaces-between-single-characters-with-regual-ex/68465)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [September 12, 2006, 10:01pm UTC](https://www.ruby-forum.com/t/re-removing-spaces-between-single-characters-with-regual-ex/68465 "2006-09-12T22:01:56Z")

</div>

From: ciapecki \[mailto:removed\_email\_address@domain.invalid\] irb(main):006:0\> s.gsub( /\\b(\[a-z\]) (?=\[a-z\]\\b)/i, ‘\\1’ ) =\> “A long cat and a quick mouse met oj simpson on the tcp stack” this is exactly what I need. …

---

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

<div class="topic-metadata">

**Author:** [@art](https://www.ruby-forum.com/u/art)\
**Replies:** 0\
**Last updated:** [September 12, 2006, 8:27pm UTC](https://www.ruby-forum.com/t/no-subject/68454 "2006-09-12T20:27:43Z")

</div>

unsubscribe

---

## [Re: Reflection and files](https://www.ruby-forum.com/t/re-reflection-and-files/68356)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 5\
**Last updated:** [September 12, 2006, 8:11pm UTC](https://www.ruby-forum.com/t/re-reflection-and-files/68356 "2006-09-12T20:11:38Z")

</div>

Suppose I have a ruby file with a single class. Is it possible to write a ruby script that can extract the class name from the file? \[…\] Is it possible to extract the class name via reflection? Well, here’s one te…

---

## [Removing spaces between single characters with regual expres](https://www.ruby-forum.com/t/removing-spaces-between-single-characters-with-regual-expres/68442)

<div class="topic-metadata">

**Author:** [@ciapecki](https://www.ruby-forum.com/u/ciapecki)\
**Replies:** 1\
**Last updated:** [September 12, 2006, 8:07pm UTC](https://www.ruby-forum.com/t/removing-spaces-between-single-characters-with-regual-expres/68442 "2006-09-12T20:07:38Z")

</div>

I want to remove the spaces in the string only then when they stand between 2 single characters. for example: O J Simpson should be translated into OJ Simpson ‘A B C’ -\> ‘ABC’ ‘AB C’ -\> ‘AB C’ (no cha…

---

## [Newbie: yaml array of arrays](https://www.ruby-forum.com/t/newbie-yaml-array-of-arrays/68386)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 9\
**Last updated:** [September 12, 2006, 7:51pm UTC](https://www.ruby-forum.com/t/newbie-yaml-array-of-arrays/68386 "2006-09-12T19:51:36Z")

</div>

Hello, I’m new to yaml, and yaml in Ruby. I’m trying to create a yaml file in a text editor, one part of which will consist of an array of of arrays. The data structure I’m trying to represent is: \[\[‘a’, ‘b’, ‘c’\],…

---

## [Fetching an URL using cookies](https://www.ruby-forum.com/t/fetching-an-url-using-cookies/68398)

<div class="topic-metadata">

**Author:** [@Zouplaz](https://www.ruby-forum.com/u/Zouplaz)\
**Replies:** 5\
**Last updated:** [September 12, 2006, 6:39pm UTC](https://www.ruby-forum.com/t/fetching-an-url-using-cookies/68398 "2006-09-12T18:39:28Z")

</div>

I’m trying to fetch an url which needs several cookies to be set in order to properly return a result. I’ve found a page in the website from which I can get the session cookies (instead of posting cookies set by mysel…

---

## [Duplication from a Subclass, Object#become](https://www.ruby-forum.com/t/duplication-from-a-subclass-object-become/68436)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [September 12, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/duplication-from-a-subclass-object-become/68436 "2006-09-12T18:31:27Z")

</div>

I know that this has been discussed before, but searching has not turned up the definitive answers I had hoped for. I’m stuck in a situation like this: class Foo def dup # strange, magical, important things happen h…

---

## [Strongtalk VM now open source](https://www.ruby-forum.com/t/strongtalk-vm-now-open-source/68369)

<div class="topic-metadata">

**Author:** [@philthompson](https://www.ruby-forum.com/u/philthompson)\
**Replies:** 4\
**Last updated:** [September 12, 2006, 5:49pm UTC](https://www.ruby-forum.com/t/strongtalk-vm-now-open-source/68369 "2006-09-12T17:49:21Z")

</div>

The Strongtalk is supposedly a very fast VM for Smalltalk. Now it’s been released as open source. Perhaps it would be possible to run Ruby on it? Or perhaps some ideas can be borrowed to make YARV faster? http://w…

---

## [Ruby and rails just hangs -- Help!](https://www.ruby-forum.com/t/ruby-and-rails-just-hangs-help/68427)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [September 12, 2006, 5:39pm UTC](https://www.ruby-forum.com/t/ruby-and-rails-just-hangs-help/68427 "2006-09-12T17:39:19Z")

</div>

if i do gem update rails --include-dependencies it just sits there for hours if i run Webrick it just hangs Ctrl-C does nothing after i do the Webrick command and i go to http://localhost:3000/ i get nothing… …

---

## [Apress' ablog getting more Ruby content](https://www.ruby-forum.com/t/apress-ablog-getting-more-ruby-content/68431)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [September 12, 2006, 5:27pm UTC](https://www.ruby-forum.com/t/apress-ablog-getting-more-ruby-content/68431 "2006-09-12T17:27:18Z")

</div>

I used to feel like the odd bird over their posting about Ruby (an still do on occassion – see http://ablog.apress.com/?p=1263 for an example.) But, there are other bloggers there catching the Ruby vision. Cory Foy …

---

## [What is the best non-rails web/ruby development environment](https://www.ruby-forum.com/t/what-is-the-best-non-rails-web-ruby-development-environment/67961)

<div class="topic-metadata">

**Author:** [@edward](https://www.ruby-forum.com/u/edward)\
**Replies:** 14\
**Last updated:** [September 12, 2006, 5:21pm UTC](https://www.ruby-forum.com/t/what-is-the-best-non-rails-web-ruby-development-environment/67961 "2006-09-12T17:21:17Z")

</div>

So I want to develop ruby sites locally like I do PHP5 sites. For PHP I use locally Apache to view and ZendPHPEclipse as my editor. How do most of your develop non-rails ruby webs locally? (I’ll get into rails later, …

---

## [Net::FTP questions](https://www.ruby-forum.com/t/net-ftp-questions/68354)

<div class="topic-metadata">

**Author:** [@Lincoln\_Anderson](https://www.ruby-forum.com/u/Lincoln_Anderson)\
**Replies:** 5\
**Last updated:** [September 12, 2006, 5:17pm UTC](https://www.ruby-forum.com/t/net-ftp-questions/68354 "2006-09-12T17:17:16Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello… I am attempting to write a client side script that mirrors a user’s /home/\* on a remote server. Granted, I could use ftpmirror in my Ubuntu distribution, but I’d…

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

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