Ruby Saya Mana; Bukan Ruby Itu Apa

Posted: August 3, 2007 in ノート, Catatan Tercecer, RUBY, Technology

Dari Pak James nih

Sure:

Firefly:~/Desktop$ /usr/local/bin/ruby find_ruby.rb
/usr/local/bin/ruby
Firefly:~/Desktop$ /usr/bin/ruby find_ruby.rb
/usr/bin/ruby
Firefly:~/Desktop$ cat find_ruby.rb
#!/usr/bin/env ruby -wKU

require “rbconfig”

puts File.join(Config::CONFIG[“bindir”], Config::CONFIG[“ruby_install_name”])

__END__

Hope that helps.

James Edward Gray II

Sekarang cobain ah (di macosx)

id-ruby:~/Desktop arie$ /usr/bin/ruby find_ruby.rb
/usr/bin/ruby
id-ruby:~/Desktop arie$ ruby find_ruby.rb
/opt/local/bin/ruby
id-ruby:~/Desktop arie$ which rubys
no rubys in /usr/local/mysql/bin /opt/local/bin /Library/Frameworks/Python.framework/Versions/Current/bin /usr/local/bin /usr/local/sbin /bin /sbin /usr/bin /usr/sbin
id-ruby:~/Desktop arie$

Hehe .. yg terakhir kalo gak lupa naroh berarti lupa sudah dihapus to. Coba sekarang yang di Linux RedHat 9

[arie@localhost uncategorized]$ ruby -v
ruby 1.8.6 (2007-07-17 patchlevel 5000) [i686-linux]
[arie@localhost uncategorized]$ ruby find_ruby.rb
/usr/local/bin/ruby
[arie@localhost uncategorized]$

I love Ruby Community.-

tinggalkan feedback konstruktif atau lebih baik diam

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s