So the grunt-slim plugin calls the command-line slim utility. I was able to reproduce the error message you're getting by creating the two example files you gave and running:
slimrb --trace bar.slim
This error is happening because a bare render
method isn't part of the slim gem, it's part of rails. I was able to get the above command to work by changing bar.slim
to be:
= Slim::Template.new('_foo.slim').render
This is clearly more verbose, sorry. I'm not sure if there's a better way to integrate grunt and rails' templates that would get around this issue, but you could just let rails do the rendering.