Shouichi's answer is what you are looking for.
However, from your comment, I understand that you also want to redirect the output to a file (.html file). The way this can be done depends on the shell used. For example, in (ba) sh you can do it like this:
slimrb template.slim -l '{"message": "hello"}' > template.html
source
share