Install Swift 3: swiftenv
To install Vapor, you just need to have Swift 3 installed.
Swiftenv
Swiftenv allows you to easily maintain multiple versions of Swift 3 on your computer. Learn more at Swiftenv's GitHub.
Install with Homebrew
We will cover how to install Swiftenv with Homebrew, since that is the easiest method. If you would like to install it a different way, visit the Swiftenv README.
brew install kylef/formulae/swiftenv
Now add it to your PATH.
# OS X
echo 'if which swiftenv > /dev/null; then eval "$(swiftenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
# Ubuntu
echo 'if which swiftenv > /dev/null; then eval "$(swiftenv init -)"; fi' >> ~/.bashrc
source ~/.bashrc
This will make sure Swiftenv is enabled whenever you start a new terminal session. That way, when you type a command like swift build, it will automatically use the correct Swift version for the project you are working in.
Swift Version Files
Hidden files called
.swift-versionexist in many Swift 3 projects that indicate to Swiftenv which version of Swift should be used to compile.All Qutheory modules have this file.
Install Swift
Once you have the swiftenv command installed, install the appropriate version of Swift for Vapor 0.12.
swiftenv install DEVELOPMENT-SNAPSHOT-2016-06-20-a
swiftenv global DEVELOPMENT-SNAPSHOT-2016-06-20-a
This both installs the snapshot and sets it as the default installation of Swift 3 in case a .swift-version file is not present.
Updated less than a minute ago
