Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an ubuntu server, with a rails application. When I access directly that server, I have no problem with the setting of the path for my rails commands, but when I log trough ssh for my iMac, I got differents setting, so, for example, the

wich rails



but from ubuntu return


who is the correct one.

Anyone knows how to set correctly those values for ssh?

Thanks in advance

share|improve this question
up vote 2 down vote accepted

SSH is not the problem, and does not need to be further configured, what you're seeing is symptomatic of not having the path correctly setup. Try this: echo $PATH both at local machine and using ssh.

When you installed rails by hand, where did you extend the path to include /usr/local/bin ? You need to make sure your terminal is sourcing that file, which it obviously is not.

EDIT: There are many places where you can add things the path, that is why I was asking you where did you added it, in .profile? Knowing that it would be easy to fix. I would personally do it in .bashrc:

export PATH=$PATH:/usr/local/bin

just realize that this only makes sense if bash is your terminal.

share|improve this answer
effectively, the PATH are differents, how can I make sure that my terminal is sourcing that file correctly? – Nisanio Aug 5 '12 at 22:41
@Nisanio: I've edited my answer a little bit. – carlosdc Aug 5 '12 at 22:57
Thanks @carlosdc!! – Nisanio Aug 5 '12 at 22:58

Your Answer


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.