Short explanation.
After I've created .bash_profile file and added the line export PATH=/PATH/TO/YOUR/sbt/bin:$PATH into it, my terminal stopped working properly. Could you please help me to fix the problem?
Long explanation.
All I wanted and still want is to install Scala.
I followed this instruction:
Mac OS X If you use the homebrew package manager, simply type brew
update and then brew install sbt in a Terminal prompt.Otherwise, install sbt by following these steps:
- Download sbt from here: http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.tgz
- Unpack the archive to a directory of your choice
- Add the bin/ directory to the PATH environment variable. Open the file ~/.bash_profile in an editor (create it if it doesn't exist) and
add the following line export PATH=/PATH/TO/YOUR/sbt/bin:$PATHVerify that sbt is installed correctly: Open a new terminal (to apply
the changed .bash_profile) using the Terminal application in
/Applications/Utilities/ and type sbt -h, you should see a help
message from sbt.
First, I tried it with Homebrew and followed this instructions. It didn't work well, so I decided to go through the steps above. After I created the .bash_profile file and added the line export PATH=/PATH/TO/YOUR/sbt/bin:$PATH (with the valid path, of course), terminal went crazy. Your help is more than welcome!
EDIT:
Ina:sbt ps1$ echo $PATH
//Users/ps1/Documents/PS
Best Answer
If the path includes spaces, you're going to need to quote it.
Your line
export PATH=/Users/ps1/Documents/PS 1/whatever-else/:$PATH
causes Bash to interpret thePATH=/Users/ps1/Documents/PS
part as the full first argument to your PATH—tellingexport
to set the PATH to only the section before the space. If you useexport "PATH=/Users/ps1/Documents/PS 1/whatever-else/:$PATH"
, it will interpret the entirePATH=/Users/ps1/Documents/PS 1/whatever-else/:$PATH
as part of the first argument. By convention, most people only quote the right side of the equals sign, because it looks nicer, it's the only thing that needs quoted, and bash automatically concatenates strings with no spaces between them.