Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need the command 'rails' to be added permanently to the PATH variable. I'm not sure if this should be happening automatically, as every rails guide seem to assume doing 'rails something' will work right after installing it. The same happened with other programs, so I think I'm the problem.

I searched this but I found many options, not sure which is the most appropriate way:

option 1) edit ~/.bashrc

option 2) edit ~/.profile

option 3) put a script into /etc/profile.d/

I haven't tried them yet, I don't want to make a mess in the system.

Any suggestions?

ps. I'm on Ubuntu 11 server edition 64 bits

My final choice: I used ~/.bashrc for the sake of simplicity, I only needed to open a new terminal after adding the path

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

If you connect the machine remotely using console, then .bash_profile is used. But if you're already logged into the machine and just open a new terminal window, then .bashrc is used. You might also find some useful info here.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.