I have used Scala for about a year and now want to get into Lift. Following the official site, I got the guide at http://simply.liftweb.net/index-Chapter-2.html#toc-Chapter-2
However, the example does not work. Here is the error I get.
C:\Lift\hello>sbt update ~jetty-run
C:\Lift\hello>set SCRIPT_DIR=C:\scala\bin\
C:\Lift\hello>java -Xmx512M -jar "C:\scala\bin\sbt-launch.jar" update ~jetty-run
[info] Set current project to default-7944be (in build file:/C:/Lift/hello/)
[success] Total time: 0 s, completed 22 Feb, 2012 3:41:06 PM
[error] Not a valid command: jetty-run
[error] Not a valid project ID: jetty-run
[error] Not a valid configuration: jetty-run
[error] Not a valid key: jetty-run (similar: run)
[error] ~jetty-run
[error] ^
I have not used sbt before and prefer not to get sidetracked by having to learn sbt, maven or other stuff. I essentially want a "hello" world application (in this case, the chat application) to start up and running before I do any more digging into Lift.
It is unfortunate that the very first example in the official "getting started" guide is broken. Any ideas what the errors are. I tried the method suggested at http://groups.google.com/group/simple-build-tool/browse_thread/thread/60635edfadbcd816 without any luck
If what you want is just a "hello" world Lift application, I will suggest you download the official Lift 2.4 release here.
After you unzip that file, just cd scala_28\lift_blank
or cd scala_29\lift_blank
according to what Scala version you would like to use.
Then run sbt update ~jetty-run
, this release included correct version and SBT start script for windows.
After this, you should able to browse http://localhost:8080 and get a single web page that has current date and time displayed, a typical Hello World program for web framework.
It seems you are using SBT 0.11 but Simply Lift is using SBT 0.7.x.
SBT has been made a lot of changes from 0.7.x to 0.11, there is no jetty-run command in 0.11.
You should download old SBT version if you just want it work and do not care using a old version SBT.
http://code.google.com/p/simple-build-tool/downloads/list
I think 0.7.7 will work.
It seems like you don't have ./ on your path. I believe all you need to do is go into the chat folder and use the command "./sbt update ~jetty-run" instead of "sbt update ~jetty-run".
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