I have just installed ruby.1.8.6 on Ubuntu 12.0.4.
I am learning ruby out of a book and after the installation process it says
"Once it's completed, you should add /usr/local/bin to your PATH environment variable. I'll assume that, being a Linux user"
And I'm stuck as the guy has a wrong assumption.
How do I add usr/local/bin to the path environment variable?
Open the . bash_profile file in your home directory (for example, /Users/your-user-name/. bash_profile ) in a text editor. Add export PATH="your-dir:$PATH" to the last line of the file, where your-dir is the directory you want to add.
To add a path to the PATH environment variableIn the System dialog box, click Advanced system settings. On the Advanced tab of the System Properties dialog box, click Environment Variables. In the System Variables box of the Environment Variables dialog box, scroll to Path and select it.
You can add this to your ~/.bashrc
file:
PATH=$PATH:/usr/local/bin
If you don't know how, you can just execute this line in a Terminal:
echo "PATH=\$PATH:/usr/local/bin" >> ~/.bashrc
You can also check what's in your PATH
by typing in the Terminal
echo $PATH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With