Env

Mac OS X example scripts have the command (directive/statement/?)...
ENV['BRIDGE_SUPPORT_PATH'] = '/Volumes/Data/src/svn-rubycocoa-apple/
framework/bridge-support'

I can't find any write-up of this line anywhere. It's in
RSSPhotoViewer in Developer/Examples/Ruby/RubyCocoa/RSSPhotoViewer/
rb_main.rb

Can someone please explain what this is, what it does, and where it is
documented?

I've never worked on a Mac, but the ENV hash en ruby is a mechanism
for accessing environment variables.

This:

# in ruby
ENV['PATH'] = '/usr/bin'

is equivalent to this:

/* in csh */
setenv PATH "/usr/bin"

···

On Feb 7, 9:52 am, RVC planning <mcintosh80...@gmail.com> wrote:

Mac OS X example scripts have the command (directive/statement/?)...
ENV['BRIDGE_SUPPORT_PATH'] = '/Volumes/Data/src/svn-rubycocoa-apple/
framework/bridge-support'

I can't find any write-up of this line anywhere. It's in
RSSPhotoViewer in Developer/Examples/Ruby/RubyCocoa/RSSPhotoViewer/
rb_main.rb

Can someone please explain what this is, what it does, and where it is
documented?

RVC planning wrote:

ENV['BRIDGE_SUPPORT_PATH'] = '/Volumes/Data/src/svn-rubycocoa-apple/
framework/bridge-support'
[...]
Can someone please explain what this is, what it does, and where it is
documented?

ENV is a Hash-like object (but not a hash) that contains the environment
variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...' sets the
environment variable BRIDGE_SUPPORT_PATH to '...' for you and all processes
inheriting your environment.

HTH,
Sebastian

···

--
NP: Nevermore - Narcosynthesis
Jabber: sepp2k@jabber.org
ICQ: 205544826

indeed,
all this is doing is setting the path to the rubycocoa bridge, they're setting that based on the location of the bridge as it is with the shipped version of Leopard (10.5)

···

On Feb 7, 2008, at 10:05 AM, Sebastian Hungerecker wrote:

RVC planning wrote:

ENV['BRIDGE_SUPPORT_PATH'] = '/Volumes/Data/src/svn-rubycocoa-apple/
framework/bridge-support'
[...]
Can someone please explain what this is, what it does, and where it is
documented?

ENV is a Hash-like object (but not a hash) that contains the environment
variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...' sets the
environment variable BRIDGE_SUPPORT_PATH to '...' for you and all processes
inheriting your environment.

HTH,
Sebastian
--
NP: Nevermore - Narcosynthesis
Jabber: sepp2k@jabber.org
ICQ: 205544826

John Joyce wrote:

···

On Feb 7, 2008, at 10:05 AM, Sebastian Hungerecker wrote:

variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...'
ICQ: 205544826

indeed,
all this is doing is setting the path to the rubycocoa bridge,
they're setting that based on the location of the bridge as it is
with the shipped version of Leopard (10.5)

Actually, that was the developer’s path. You can (and should) safely
remove this line to use it on your machine, or set the path to a custom
version of BridgeSupport if you have one.
--
Posted via http://www.ruby-forum.com/\.

These lines were unfortunately left by error after a debugging
session, I just removed them :slight_smile:

Laurent

···

On Feb 7, 2008 1:56 PM, Benjamin Stiglitz <ben@tanjero.com> wrote:

John Joyce wrote:
> On Feb 7, 2008, at 10:05 AM, Sebastian Hungerecker wrote:
>
>> variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...'
>> ICQ: 205544826
>>
> indeed,
> all this is doing is setting the path to the rubycocoa bridge,
> they're setting that based on the location of the bridge as it is
> with the shipped version of Leopard (10.5)

Actually, that was the developer's path. You can (and should) safely
remove this line to use it on your machine, or set the path to a custom
version of BridgeSupport if you have one.

Thanks Laurent!
It's great to know that people at Apple are paying attention to things outside of Apple!

···

On Feb 7, 2008, at 5:25 PM, Laurent Sansonetti wrote:

On Feb 7, 2008 1:56 PM, Benjamin Stiglitz <ben@tanjero.com> wrote:

John Joyce wrote:

On Feb 7, 2008, at 10:05 AM, Sebastian Hungerecker wrote:

variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...'
ICQ: 205544826

indeed,
all this is doing is setting the path to the rubycocoa bridge,
they're setting that based on the location of the bridge as it is
with the shipped version of Leopard (10.5)

Actually, that was the developer's path. You can (and should) safely
remove this line to use it on your machine, or set the path to a custom
version of BridgeSupport if you have one.

These lines were unfortunately left by error after a debugging
session, I just removed them :slight_smile:

Laurent