LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Edit the PATH variable (https://www.linuxquestions.org/questions/linux-newbie-8/edit-the-path-variable-855978/)

shashank86 01-12-2011 09:09 PM

Edit the PATH variable
 
Hi,

I am trying to setup Aptana, an eclipse based plugin for ruby on rails, on Windows XP. The plugin comes with a terminal from where i build/run and deploy my applications.

I have the ruby executable in a path on the c drive. I would like to update the PATH variable in the plugin so that i dont have to point to the ruby.exe everytime i want to run.

However, i am not able to do that. Any suggestion would help me a lot.

I did a 'uname -a' and got:
Code:


MINGW32_NT-5.1 BIO4054024 1.0.12(0.46/3/2) 2010-02-05 01:08 i686 unknown

and a '/bin/bash --version' returned:

Code:


GNU bash, version 3.1.0(3)-release (i686-pc-msys)
Copyright (C) 2005 Free Software Foundation, Inc.

Thanks a lot.

AlucardZero 01-12-2011 09:14 PM

What did you try and what happened when you tried it?

It should be as simple as
Code:

export PATH=$PATH:/cygdrive/c/pathto/rubys/folder

shashank86 01-13-2011 12:44 PM

Quote:

Originally Posted by AlucardZero (Post 4222422)
What did you try and what happened when you tried it?

It should be as simple as
Code:

export PATH=$PATH:/cygdrive/c/pathto/rubys/folder

Thanks AluCard. This works perfectly. Although, there is no persistance. I have to run the export command every time i get the terminal started. Anyway around this?

Thanks.

divyashree 01-13-2011 12:53 PM

Quote:

Originally Posted by shashank86 (Post 4223239)
Thanks AluCard. This works perfectly. Although, there is no persistance. I have to run the export command every time i get the terminal started. Anyway around this?

Thanks.

You can add this line to you .bash_profile exists in your home directory,so that it will be exported permanently.

PHP Code:

PATH=$PATH:/cygdrive/c/pathto/rubys/folder 


shashank86 01-13-2011 01:19 PM

Quote:

Originally Posted by divyashree (Post 4223256)
You can add this line to you .bash_profile exists in your home directory,so that it will be exported permanently.

PHP Code:

PATH=$PATH:/cygdrive/c/pathto/rubys/folder 


That is another problem. I am not able to find the .bash_profile file on the system i have.
I know it is in the root directory, i.e / . a 'vi .bash_profile' returns an empty page.

Any ideas?

Thanks

AlucardZero 01-13-2011 01:45 PM

It should be in your home folder (~ or $HOME), actually. And if it's not there, you can create it.

divyashree 01-14-2011 02:16 AM

Quote:

Originally Posted by shashank86 (Post 4223288)
That is another problem. I am not able to find the .bash_profile file on the system i have.
I know it is in the root directory, i.e / . a 'vi .bash_profile' returns an empty page.

Any ideas?

Thanks

You can create it or you can add it in .bashrc in your home directory.

shashank86 01-14-2011 03:38 PM

Thanks ALUCARD and DIVYASHREE. I will try that.


All times are GMT -5. The time now is 10:48 PM.