Re: Problem compiling first Cocoa app in Xcode 3.1
Re: Problem compiling first Cocoa app in Xcode 3.1
- Subject: Re: Problem compiling first Cocoa app in Xcode 3.1
- From: Thomas Wetmore <email@hidden>
- Date: Sun, 20 Jul 2008 16:56:15 -0400
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
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". 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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden