LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2011, 10:09 PM   #1
shashank86
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Rep: Reputation: 0
Exclamation 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.
 
Old 01-12-2011, 10:14 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
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
 
1 members found this post helpful.
Old 01-13-2011, 01:44 PM   #3
shashank86
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
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.
 
Old 01-13-2011, 01:53 PM   #4
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by shashank86 View Post
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 
 
Old 01-13-2011, 02:19 PM   #5
shashank86
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by divyashree View Post
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
 
Old 01-13-2011, 02:45 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
It should be in your home folder (~ or $HOME), actually. And if it's not there, you can create it.
 
1 members found this post helpful.
Old 01-14-2011, 03:16 AM   #7
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by shashank86 View Post
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.
 
1 members found this post helpful.
Old 01-14-2011, 04:38 PM   #8
shashank86
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks ALUCARD and DIVYASHREE. I will try that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add path to $PATH variable alaios SUSE / openSUSE 2 04-19-2009 09:41 AM
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 06:48 PM
edit path environment variable to include current working directory alb1954 Linux - Newbie 8 07-12-2004 12:26 AM
How to edit the value of $PATH? ICO Slackware 1 02-07-2004 05:38 AM
how do I edit the $PATH environment variable in RH7.3 needamiracle Linux - Software 3 07-02-2002 10:19 PM


All times are GMT -5. The time now is 11:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration