Archive for the ‘Ruby’ Category

h1

Ruby 1.9.0 - no such file to load — ubygems (LoadError)

May 15, 2007

Remember the old days when I ran Ruby 1.8.2 only, I got similar message from Ruby 1.9.0 (ruby-1.9.0-20060415-i386-mswin32.zip)

"C:\Ruby1.9\bin>irb
C:\Ruby1.9\bin\ruby: no such file to load -- ubygems (LoadError)

C:\Ruby1.9\bin>"

This the result from the last installation from Ruby 1.8.6, since the Distribution for Ruby 1.9.0 Does not include rubygems, so you must remove the Environment Variables that Ruby will lookup for the options.

RUBYOPT = -rubygems

h1

Ruby 1.8.6 and 1.9.0 Diff on Methods

May 15, 2007

I am waiting my friend install Oracle 10g on our Development Server in SLES 10, so I grab my intermediate file of my Ruby Doc Browser and Compare it with the Ruby 1.9, and this is the result (screen-shoot) in my Open Office

Ruby Diff 1.8.6 to 1.9.0 Kernel
Read the rest of this entry ?

h1

notepad++ my current editor

May 3, 2007

My Current editor for webdevelopment (check on Categories on this post)
NOTEPAD++
notepad.png

h1

Terbilang USD / IDR versi Indonesia

April 26, 2007

Is it Ruby-way ala coding…

def terbilang(angka)
satuan = [''] + %w{satu dua tiga empat lima enam tujuh delapan sembilan sepuluh sebelas}.collect{|x|x+’ ‘}
triple = [['puluh',10,20,100],['ratus',100,200,1000],['ribu',1000,2000,1000000],['juta',1000000,1000000,1000000000],['milyar',1000000000,1000000000,1000000000000]]
hasil = satuan[angka] if angka<12
hasil = terbilang(angka.divmod(10)[1]) +’belas ‘ if angka>=12 and angka<20
hasil = ’seratus ‘+terbilang(angka-100) if angka>=100 and angka<200
hasil = ’seribu ‘ +terbilang(angka-1000) if angka>=1000 and angka<2000
triple.each{|x|hasil=terbilang(angka.divmod(x[1])[0])+x[0]+’ ‘+terbilang(angka.divmod(x[1])[1]) if angka>=x[2] and angka<x[3]}
hasil
end

h1

Ruby Doc / Class Browser (methods, class / instance vars & constants)

April 23, 2007

Update ruby.doc.browser, this is the screen shoot…
arrayc.jpg
Read the rest of this entry ?

h1

Ruby Doc / Class Browser (methods for now :-)

April 16, 2007

my development in ruby using editor that not have auto complete or intelisense, so when i need to know some of the methods is little bit difficult, I am not bother with it but after I have read discussion in our ruby mailling-list, Iam sure not only me have trouble like this , so after digging the ruby quiz, i got simple browser to check methods object of the core / lib / module.scshoot.gif

this is html file and it contains 415 files, pretty big huh, this file can be browse using index / content and iframe. or pick the html file with classname on it.

anyway this not ready but for my need it ok.

*Update
you can download this file in rubyforge.org/rubydocbrowser