Installing

Lets set up scalate!

Requirements

To use Scalate you will need:

To run the sitegen sample you will need to install:

Scalate Tool

Windows 2000/XP

  1. Download a distribution such as 1.4.0 zip or tar.gz
  2. Unzip the distribution archive, i.e. scalate-1.4.0-windows-bin.zip to the directory you wish to install Scalate 1.4.0. These instructions assume you chose C:\Program Files\Scala. The subdirectory scalate-1.4.0 will be created from the archive.
  3. Add the C:\Program Files\Scala\scalate-1.4.0\bin directory to the PATH environment variable:
    1. Opening up the system properties using (WinKey + Pause).
    2. Selecting the Advanced tab.
    3. Click the Environment Variables button.
    4. Update/create the PATH variable in the user variables prepending the value C:\Program Files\Scala\scalate-1.4.0.
    5. Be sure to omit any quotation marks around the path even if it contains spaces.
  4. In the same dialog, make sure that JAVA\_HOME exists in your user variables or in the system variables and it is set to the location of your JDK (e.g. C:\Program Files\Java\jdk1.5.0\_02).
  5. Make sure that %JAVA\_HOME%\bin is in your PATH environment variable.
  6. Open a new command prompt:
    1. Click Winkey + R.
    2. Type cmd.
  7. Run the following to verify that it is correctly installed.

    scalate

Unix-based Operating Systems (Linux, Solaris and Mac OS X)

  1. Download a distribution such as 1.4.0 zip or tar.gz
  2. Extract the distribution archive, i.e. scalate-1.4.0-unix-bin.tar.gz to the directory you wish to install Scalate 1.4.0. These instructions assume you chose /usr/local/scala. The subdirectory scalate-1.4.0 will be created from the archive.
  3. In a command terminal, prepend the PATH variable with the bin directory in the scalate release.

    export PATH=/usr/local/scala/scalate-1.4.0/bin:$PATH
  4. Make sure that JAVA\_HOME is set to the location of your JDK.

    export JAVA_HOME=/usr/java/jdk1.5.0_02
  5. Make sure that $JAVA\_HOME/bin is in your PATH environment variable.

    export PATH=$JAVA_HOME/bin:$PATH
  6. Run the following to verify that it is installed correctly

    scalate

Mac OS X and Homebrew

If you use OS X then we highly recommend using Homebrew to manage installation of tools.

  1. If you have not done so already please Install Homebrew.
  2. Once you have Homebrew installed you can install Scalate via this command

    brew install scalate

    The scalate executable should now be available from any terminal.

  3. To verify this works try typing

    scalate

Maven

Scalate can be used as part of a Maven build by adding the following dependencies into your POM:

<dependencies>
    <dependency>
      <groupId>org.fusesource.scalate</groupId>
      <artifactId>scalate-wikitext</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.fusesource.scalate</groupId>
      <artifactId>scalate-page</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.fusesource.scalamd</groupId>
      <artifactId>scalamd</artifactId>
      <version>${scalamd-version}</version>
    </dependency>
    <!-- testing -->
    <dependency>
      <groupId>org.fusesource.scalate</groupId>
      <artifactId>scalate-test</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

Note: The path to your local Maven repository .m2 cannot have any spaces.

Diving deeper

Once you have the application working and you've played with the Console you might want to dive deeper into Scalate and understand how it works.