Ronald Fischer
2008-01-02 20:52:16 UTC
I would like to add the Rails script directory to my PATH, when opening
a Locomotive terminal window.
Right now I add it (in the Locomotive preferences) as relative path,
i.e.
I set the "additional path" in the preferences to
/usr/local/mysql/bin:script
Of course this breaks down if I do a cd in my terminal window. The
problem
is that I can not hard code the absolute path to the script directory,
because I have more than one Locomotive application, and each has of
course its own script directory.
I would ideally need an environment variable which gives the base
directory
of my Rails app, but as far I see, there is no such thing.
Does anyone know of a nice trick to achieve this goal?
In case my question is not clear, here an example: Say I have two
Rails applications managed by Locomotive: app1 based in /Users/ror/
foo/a1
and app2 based in /Users/ror/bar/a2. When I select app1 in Locomotive
and open a terminal window, I would like to have /Users/ror/foo/a1/
script
in my PATH, but when I select app2 in Locomotive and open a terminal
window, I would like to have /Users/ror/bar/a2/script in my PATH.
Ronald
a Locomotive terminal window.
Right now I add it (in the Locomotive preferences) as relative path,
i.e.
I set the "additional path" in the preferences to
/usr/local/mysql/bin:script
Of course this breaks down if I do a cd in my terminal window. The
problem
is that I can not hard code the absolute path to the script directory,
because I have more than one Locomotive application, and each has of
course its own script directory.
I would ideally need an environment variable which gives the base
directory
of my Rails app, but as far I see, there is no such thing.
Does anyone know of a nice trick to achieve this goal?
In case my question is not clear, here an example: Say I have two
Rails applications managed by Locomotive: app1 based in /Users/ror/
foo/a1
and app2 based in /Users/ror/bar/a2. When I select app1 in Locomotive
and open a terminal window, I would like to have /Users/ror/foo/a1/
script
in my PATH, but when I select app2 in Locomotive and open a terminal
window, I would like to have /Users/ror/bar/a2/script in my PATH.
Ronald
--
Ronald Fischer <ronald.fischer-***@public.gmane.org>
http://www.fusshuhn.de/
Ronald Fischer <ronald.fischer-***@public.gmane.org>
http://www.fusshuhn.de/