• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble running ruby code in Run Script build phase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble running ruby code in Run Script build phase


  • Subject: Re: Trouble running ruby code in Run Script build phase
  • From: Tommy Nordgren <email@hidden>
  • Date: Thu, 14 Aug 2008 01:01:30 +0200


On 14 aug 2008, at 00.39, Tommy Nordgren wrote:


On 14 aug 2008, at 00.36, Tommy Nordgren wrote:


On 14 aug 2008, at 00.00, Abizer Nasir wrote:

I've got the following ruby code which works fine when run as a script, but doesn't run correctly when run as a script in an Xcode buld phase:

I've got the shell correctly pointing to /usr/bin/ruby

sha = `/usr/local/git/bin/git rev-parse --short HEAD`.chomp
puts sha
# This works fine

output = `which git`
puts output
# THIS RESULTS IN A nil

info_file = ENV['BUILT_PRODUCTS_DIR'] + "/" + ENV['INFOPLIST_PATH']
puts info_file
# This works fine.
.

The /usr/local/git/bin directory is not in the PATH when launched from Xcode.
You can however provide bindings for environment variables used by Apps started from finder in the file:
~/.MacOSX/environment.plist

One more thing: There exists an "Environment Variables" control Panel for editing this file

You will find a link to the panel at versiontracker. The file name is RCEnvironment
----------------------------------
Skinheads are so tired of immigration, that they are going to move to a country that don't accept immigrants!
Tommy Nordgren
email@hidden




_______________________________________________
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


References: 
 >Trouble running ruby code in Run Script build phase (From: Abizer Nasir <email@hidden>)
 >Re: Trouble running ruby code in Run Script build phase (From: Tommy Nordgren <email@hidden>)
 >Re: Trouble running ruby code in Run Script build phase (From: Tommy Nordgren <email@hidden>)

  • Prev by Date: Re: build script access
  • Next by Date: Re: IB3 Plugin - Editing Textual Labels
  • Previous by thread: Re: Trouble running ruby code in Run Script build phase
  • Next by thread: Re: Trouble running ruby code in Run Script build phase
  • Index(es):
    • Date
    • Thread