如何运行基本聊天 Scala/Lift 应用程序?
我正在关注这里的教程
http://simply.liftweb.net/index-Chapter- 2.html
到目前为止,我已经创建了一个目录,并将源代码粘贴到文本文件中。然后我将 sbt.bat 和 sbt-launcher.jar 复制到该目录中。运行
sbt update ~jetty-run
后,我收到以下错误消息
“不存在名为 'jetty-run' 的操作”
I'm following the tutorial here
http://simply.liftweb.net/index-Chapter-2.html
So far I have created a directory, and pasted the source code into text files. I then copied sbt.bat and sbt-launcher.jar into the directory. Upon running
sbt update ~jetty-run
I get the following error message
"No action named 'jetty-run' exists"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从来没有跑过Lift,所以没有资格回答这个问题。但是,我是 SBT 用户,所以......
尝试从 sbt 命令行运行这两个命令。首先进入sbt:
sbt <输入>
然后输入:
更新<回车>
这可能需要很长时间才能完成。完成后,输入
~jetty-run<输入>
它应该构建任何需要它的 Lift 并启动部署了 Lift 的 Jetty。如果一切顺利,就开始聊天。
Never having run Lift, I'm uniquely unqualified to answer this question. However, I am an SBT user, so....
Try running these two commands from the sbt command line. First get into sbt:
sbt <enter>
then type:
update<enter>
that will likely take a very long time to complete. When it finishes, type
~jetty-run<enter>
which should build any bits of Lift that need it and launch Jetty with Lift deployed. If all goes well, commence chatting.
听起来您的配置文件中没有 jetty 依赖项,或者未成功获取。
启动聊天应用程序的步骤:
从 github 克隆 sbt 项目
$git clone git://github.com/dpp/simply_lift.git
启动 sbt
$cd simple_lift/chat
$./sbt
将下载 Scala 库。
从 sbt 控制台
<代码>>更新
这将从 sbt 配置文件 (project/build/LiftProject.scala) 获取所有依赖项。确保所有依赖项均已成功下载。
最后
<代码>>码头运行
Sounds like you haven't jetty dependency in your config file or it wasn't successfully fetched.
Steps to launch chat app:
Clone sbt project from github
$git clone git://github.com/dpp/simply_lift.git
Launch sbt
$cd simply_lift/chat
$./sbt
Scala library will be downloaded.
From sbt console
> update
This will fetch all dependencies from sbt config file (project/build/LiftProject.scala). Make sure that all dependencies were downloaded successfully.
And finally
> jetty-run