Scalate tool 1.5.3 hanging

31 views
Skip to first unread message

Yang Zhang

unread,
Dec 7, 2011, 4:30:01 AM12/7/11
to sca...@googlegroups.com
On Ubuntu 10.04, running scalate commands directly from the command
line seems to never finish. It's not burning CPU or anything, though.

$ cat index.jade
!!!
html
head
title Price series browser
link(rel='stylesheet' type='text/css' href='main.css')
body
#canvas
script(src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js')
script(src='http://mbostock.github.com/d3/d3.js?2.6.0')
script(src='http://documentcloud.github.com/underscore/underscore-min.js')
script(src='http://epeli.github.com/underscore.string/dist/underscore.string.min.js')
script(src='main.js')

$ scalate run index.jade
(nothing happens; same thing with scalate 'run index.jade')
^C

But when I run 'run index.jade' from the scalate REPL, it spits out
the rendered template.

Also, may or may not be related, but 'exit' (or ^D) hangs as well.

--
Yang Zhang
http://yz.mit.edu/

Yang Zhang

unread,
Dec 8, 2011, 1:01:15 AM12/8/11
to sca...@googlegroups.com
Filed as a bug.

https://www.assembla.com/spaces/scalate/tickets/278-scalate-tool-1-5-3-hanging

Any workarounds? 'echo run index.jade | scalate' generates the output
to stdout but it too hangs on the exit. (Also not sure how to
redirect the output to a file.) In general I'm trying to make use of
scalate in a traditional process workflow (like in GNU make), so any
tips would be appreciated. Currently have to copy and paste the
output (or roll my own scalate tool!).

Yang Zhang

unread,
Dec 8, 2011, 1:52:55 AM12/8/11
to sca...@googlegroups.com
Here's a hack-around:

#!/usr/bin/env bash
classpath="$( echo
/opt/scalate-1.5.3/scalate-1.5.3/lib/{*.jar,*/*.jar} | sed 's/ /:/g'
)"
scala -classpath "$classpath" -e '
import org.fusesource.scalate._
println(new TemplateEngine().layout("index.jade"))
System.exit(0)
'

Reply all
Reply to author
Forward
0 new messages