On Sun, Jul 20, 2008 at 1:56 PM, Thomas Wetmore <
email@hidden> wrote:
Paul,
I believe your problem is that Xcode is not using the right ruby because of your Macports installation.
I do not know how to change the path variable that Xcode uses to find the compilers and other tools that it runs. I looked through all the Xcode preferences panes and could find no mention of it. So it is probably buried more deeply in the Xcode properties. I hope there is an Xcode guru who can point out how to make the change.
You could try to change the path that you use in your own terminal sessions to see if this might impact the paths used by Xcode. I have no idea whether it will; it's just another something to try.
Try this. First run this command in the terminal:
echo $PATH
>>>/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/lib/postgresql83/bin:/usr/sbin:/usr/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/postgresql83/bin@./usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
This shows the list of locations that are searched (in order, left to right) when you ask for a command to be run when you are in the terminal. Take a look to see where /usr/bin is located in the list and where the macports bins, whatever they may be named, are located. This might give you a clue.
Now edit the file .profile (it starts with a dot) in your home directory. To see if it is already there run the command "ls -l".
>>> I don't see it. Should I use the "mkdir" command to create it? Here is the output I get:
ls -l
total 42285
drwxrwxr-x+ 30 root admin 1020 Jul 20 08:19 Applications
-rw-r--r--@ 1 pdenlinger admin 0 Jun 28 01:21 Applications alias
-rw-r--r--@ 1 root admin 63488 Jul 17 23:47 Desktop DB
-rw-r--r--@ 1 root admin 1602 Jan 10 2008 Desktop DF
drwxrwxr-x@ 18 root admin 612 Jul 20 08:10 Developer
drwxrwxr-t+ 61 root admin 2074 May 30 00:59 Library
drwxr-xr-x@ 2 root wheel 68 Sep 23 2007 Network
drwxr-xr-x 4 root wheel 136 Jun 11 06:54 System
lrwxr-xr-x 1 root admin 60 Jan 10 2008 User Guides And Information -> /Library/Documentation/User Guides and Information.localized
drwxr-xr-x 7 root admin 238 Jul 15 18:09 Users
drwxrwxrwt@ 8 root admin 272 Jul 20 11:01 Volumes
drwxr-xr-x@ 40 root wheel 1360 Jun 11 06:51 bin
drwxr-xr-x 8 pdenlinger admin 272 Jul 20 07:42 cocoaNotepad
drwxr-xr-x 8 pdenlinger admin 272 Jul 20 09:00 cocoaNotepad2
drwxrwxr-t@ 2 root admin 68 Sep 23 2007 cores
dr-xr-xr-x 2 root wheel 512 Jul 17 16:48 dev
lrwxr-xr-x@ 1 root admin 11 Jan 10 2008 etc -> private/etc
dr-xr-xr-x 2 root wheel 1 Jul 17 16:48 home
-rw-r--r--@ 1 root wheel 10293308 Jun 9 19:37 mach_kernel
-rw-r--r--@ 1 root wheel 10742313 Jun 9 19:37 mach_kernel.ctfsys
dr-xr-xr-x 2 root wheel 1 Jul 17 16:48 net
drwxr-xr-x 3 root admin 102 Jan 29 19:34 opt
drwxr-xr-x@ 6 root wheel 204 Jan 10 2008 private
drwxr-xr-x@ 66 root wheel 2244 Jun 11 06:51 sbin
lrwxr-xr-x@ 1 root admin 11 Jan 10 2008 tmp -> private/tmp
drwxr-xr-x@ 12 root wheel 408 Jan 24 22:47 usr
lrwxr-xr-x@ 1 root admin 11 Jan 10 2008 var -> private/var
It might already exist or it might not. Add the following line to the end of that file:
PATH=/usr/bin:$PATH
This forces the shell to look for commands in /usr/bin before it looks anywhere else (you don't have to worry about the fact that /usr/bin will now be in your path twice). If you run echo $PATH again you will see that the path /usr/bin has been prepended to the list so it is searched first. And since this is where the "right" ruby is it might help.
If this doesn't work, I would re-edit this file and get rid of this change.
I don't think these PATH changes take effect until you start a new terminal session after making the change. So quit your current session and start a new one. Then say "which ruby" and see what you get.
Tom Wetmore
On Jul 20, 2008, at 4:26 PM, Paul Denlinger wrote:
Just had a quick phone chat with a developer and mentioned the problem. Unfortunately, he is a Linux guy so he couldn't help me, but he suggested creating an alias in the command line so that it could find the Ruby interpreter.
He said that the problem may be that Xcode is looking for the Ruby interpreter in the default Apple directory, but since Macports changed it to the /opt/local directory and it is necessary to add /opt//ocal/bin and /opt/loca/sbin to the default paths.
I'm not a Unix guru, so what it the best way to create aliases and add these paths? And are these the right solutions?
TIA
Paul D