Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Why is Scala cool? Lab prep pre-steps...

View gist:6214944

Please try and run these steps before the talk (if possible) - they will predownload a bunch of misc build dependancies. If you encounter problems with these instructions, feel free to email me. -kevin

Check that you have java (at least 1.6 or later)... ~/development/scalatalk$ javac -version

javac 1.7.0_21

Download some template tools that that makes it easy to install this sample code...

~/development/scalatalk$ curl https://raw.github.com/n8han/conscript/master/setup.sh | sh

...
conscript installed to /home/kevinh/bin/cs

~/development/scalatalk$ ~/bin/cs n8han/giter8

...
Conscripted n8han/giter8 to /home/kevinh/bin/g8

Now make your shell of an app (we'll edit and run this during the talk)

kevinh@kevin-xeralaptop:~/development/scalatalk$ g8 scalatra/scalatra-sbt

organization [com.example]: com.theboxjelly
package [com.example.app]: com.theboxjelly.scalalab
name [My Scalatra Web App]: Little Lab App
scalatra_version [2.2.1]: 
servlet_name [MyScalatraServlet]: 
scala_version [2.10.2]: 
version [0.1.0-SNAPSHOT]: 

Template applied in ./little-lab-app

~/development/scalatalk$ cd little-lab-app/

~/development/scalatalk/little-lab-app$ chmod a+x sbt

~/development/scalatalk/little-lab-app$ ./sbt

Detected sbt version 0.12.3
Starting sbt: invoke with -help for other options
Downloading sbt launcher 0.12.3:
  From  http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.12.3/sbt-launch.jar
    To  ./.lib/0.12.3/sbt-launch.jar
Using /home/kevinh/.sbt/0.12.3 as sbt dir, -sbt-dir to override.
...

Now run the following sbt command to build and run the example shell...

container:start

...
Started SelectChannelConnector@0.0.0.0:8080

I just finished this on Mac OSX, w/ javac 1.6.0_51. The only thing that seemed like a warning was:

container:start
...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

But, I was able to see the default page on 0.0.0.0:8080

So, I'm assuming I'm good to go.

Owner

yep - that's all good - you can ignore that warning (it is a long story which we can discuss at our gathering if you want)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.