John N. Alegre [email protected] wrote:
Do you use any other ports? How many?
no, only those related to ruby.
/opt/local is ONLY used by DP so you have the option of blowing
away /opt/local (sudo rm -rf /opt/local) reinstalling ports and then
reinstalling any ports you use.
yes i know.
On the issue of your scripts still finding /usr/bin/ruby, it is necessary to
put in your .pofile in your home
i think you mean .profile ?
-------------------^-----
or, does exist a .portfile file ?
--------------------^^----
i think this has been done automatically by the Darwinports pkg :
cat .profile
Your previous .profile (if any) is saved as .profile.dpsaved
Setting the path for DarwinPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
directrory “export
PATH=/opt/local/bin:/opt/local/sbin:$path”
This will make ports found first. If you use fink too do this AFTER you
call the fink script.
no i don’t use fink.
BUT, i wonder about the useness of .profile, is this used by XCode ?
i don’t think so.
also, i’m using zsh instead of bash as a shell.
my $PATH is obviously starting by /opt/local/bin :
echo $PATH
/opt/local/bin:/usr/local/bin:/usr/local/mysql/bin:/bin:/usr/bin:/sbin:/
usr/sbin:/usr/X11R6/bin:/Users/yvon/bin:/Developer/qt/bin:/usr/local/pgs
ql/bin:/Users/yvon/bin/groovy/bin
my ruby scripts does have a shebang like that :
#!/usr/bin/env ruby -w
then, when launching a ruby script from Terminal i get the right ruby
according to the $PATH
all of those scripts are working correctly, from Terminal.
again, i don’t think XCode nor RubyCocoa use this way to find ruby (thru
$PATH)
Jonathan Paisley (on RubyCocoa-talk mail-list) said something like “ruby
cocoa don’t use /opt/local/bin/ruby” it finds that by $LOAD_PATH, which
is correct.
Finally may be it is MY way to print-out which ruby is in under use
being WRONG (from XCode /RubyCocoa) :
which_ruby=which ruby
.chomp
p “#{which_ruby}”
p #{which_ruby} --version
p $LOAD_PATH
because i don’t know, in the XCpde/RubyCocoa context, what’s the SHELL
in use (i’ve set the $SHELL to /usr/local/bin/zsh.
to finish with, adding this line (after p $LOAD_PATH) in my rb_main.rb :
p ruby --version
i get :
“ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]\n”
now, i’ll try, before (re)+ installing ruby and co, try a libxml binder
install by gem.