dturnbull/closure-script — Issue #12: Rails 3.1 Setup
Author: robert-stuttaford
Created: 2011-10-30 15:01:06+00:00
State: open

So I did the following:

# config.ru
use Closure::Middleware

# Gemfile
gem 'closure'

#config/environments/development.rb
Closure.add_source '.', '/'
Closure.add_source :soy, '/soy'
Closure.add_source :docs, '/docs'

And then set up a controller with one action, compiler:

def compiler
@query_string = ''
@query_string = 'build' if params['build']
@query_string = 'debug' if params['debug']
end

And then I dropped in the compiler.js.erb, renaming 'query_string' to '@query_string'.

Tha's as far as I got. Now, I get:

undefined local variable or method `goog' for #<#:0x0000012c80c7f8>