Hi.
I am new to linux and I am trying to install ruby on rails on my ubuntu computer.
At somne point it is asked to add /usr/local/bin to the PATH environment variable.
How do I achieve that?
Regards,
Jean-Philippe
| SitePoint Sponsor |
Hi.
I am new to linux and I am trying to install ruby on rails on my ubuntu computer.
At somne point it is asked to add /usr/local/bin to the PATH environment variable.
How do I achieve that?
Regards,
Jean-Philippe

JP,
I've never installed Ruby on Linux, unfortunately I have to develop on a windows machine (however setting up environment variables on Vista is super easy).
It doesn't look too difficult to do, here is a link showing you how to do it visually:
http://www.zolved.com/synapse/view_c...les_on_Ubuntu_
Also, here is another link that is RoR specific and shows the environment variables being set through the console about a third of the way down the page:
http://www.urbanpuddle.com/articles/...ls-hardy-heron
Basically the whole point of it is to be able to access Ruby from anywhere in your console instead of always having to run Ruby from it's installation directory.
Good Luck!
"Be kind, for everyone you meet is fighting a
hard battle." -Plato
JP,
first you should check if /usr/local/bin is already in your path. To do this open a terminal window and enter this command:
This will list all your environment variables and their values. PATH will be a list of paths, separated by ':'Code:printenv
If /usr/local/bin isn't there, you can add it by adding a command to your .bashrc file (assuming you're using bash as your shell), which is located at ~/.bashrc
Add this command to the file:
This is telling bash to take the value already assigned to $PATH and add '/usr/local/bin' to the end. You DON'T want to type something like 'export PATH=/usr/local/bin' since this would REPLACE your existing PATH with just that one specific PATH.Code:export PATH=$PATH:/usr/local/bin
You'll need to restart your terminal for the new variable to come into effect. Now when you use the 'printenv' command you should see your newly updated PATH.
Bookmarks