-
-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slim templates throwing syntax errors in rails 3 #61
Comments
One problem in your gist template: It is not allowed to indent the html tag below the directive. Can you please post the template code generated by slim? You get it by executing the slim binary
|
Hi minad. Where's the bin folder? The gem only has lib? |
you don't have the newest version |
ah - 0.7.0 - ok getting it now... |
got it. here's the output: slim jpage.html.slim --trace |
you have to use --compile |
Magic. 0.7.0 nailed it. Sorry for the disturbance, so many gems, so little time! |
Great to hear! I can continue on the vim syntax file. :) |
Thanks guys. Sorry, my bad, should have upgraded to 0.7.0 in the first place. |
No worries at all. :) |
The template is here: http://gist.github.com/647523.
I have also tried using the syntax at http://slim-lang.com/docs.html where you specify:
== render :partial, 'user'
...no joy
The error:
/Users/buddha/Sites/jl/app/views/layouts/jpage.html.slim:1: syntax error, unexpected tLABEL, expecting keyword_do or '{' or '('
...s";_buf << render partial: 'layouts/nav';_buf << "</div...
... ^
/Users/buddha/Sites/jl/app/views/layouts/jpage.html.slim:1: syntax error, unexpected tLABEL, expecting keyword_do or '{' or '('
...(yield);_buf << render partial: 'layouts/footer';_buf << ren...
... ^
/Users/buddha/Sites/jl/app/views/layouts/jpage.html.slim:1: syntax error, unexpected tLABEL, expecting keyword_do or '{' or '('
...footer';_buf << render partial: 'layouts/madeby';_buf << "</...
...
and the stack trace:
actionpack (3.0.0) lib/action_view/template.rb:255:in
module_eval' actionpack (3.0.0) lib/action_view/template.rb:255:in
compile'actionpack (3.0.0) lib/action_view/template.rb:134:in
block in render' activesupport (3.0.0) lib/active_support/notifications.rb:54:in
instrument'actionpack (3.0.0) lib/action_view/template.rb:127:in
render' actionpack (3.0.0) lib/action_view/render/layouts.rb:80:in
_render_layout'actionpack (3.0.0) lib/action_view/render/rendering.rb:62:in
block in _render_template' activesupport (3.0.0) lib/active_support/notifications.rb:52:in
block in instrument'activesupport (3.0.0) lib/active_support/notifications/instrumenter.rb:21:in
instrument' activesupport (3.0.0) lib/active_support/notifications.rb:52:in
instrument'actionpack (3.0.0) lib/action_view/render/rendering.rb:56:in
_render_template' actionpack (3.0.0) lib/action_view/render/rendering.rb:26:in
render'actionpack (3.0.0) lib/abstract_controller/rendering.rb:114:in
_render_template' actionpack (3.0.0) lib/abstract_controller/rendering.rb:108:in
render_to_body'actionpack (3.0.0) lib/action_controller/metal/renderers.rb:47:in
render_to_body' actionpack (3.0.0) lib/action_controller/metal/compatibility.rb:55:in
render_to_body'actionpack (3.0.0) lib/abstract_controller/rendering.rb:101:in
render_to_string' actionpack (3.0.0) lib/abstract_controller/rendering.rb:92:in
render'actionpack (3.0.0) lib/action_controller/metal/rendering.rb:17:in
render' actionpack (3.0.0) lib/action_controller/metal/instrumentation.rb:40:in
block (2 levels) in render'activesupport (3.0.0) lib/active_support/core_ext/benchmark.rb:5:in
block in ms' /Users/buddha/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/benchmark.rb:309:in
realtime'activesupport (3.0.0) lib/active_support/core_ext/benchmark.rb:5:in
ms' actionpack (3.0.0) lib/action_controller/metal/instrumentation.rb:40:in
block in render'actionpack (3.0.0) lib/action_controller/metal/instrumentation.rb:78:in
cleanup_view_runtime' activerecord (3.0.0) lib/active_record/railties/controller_runtime.rb:15:in
cleanup_view_runtime'actionpack (3.0.0) lib/action_controller/metal/instrumentation.rb:39:in
render' actionpack (3.0.0) lib/action_controller/metal/implicit_render.rb:10:in
default_render'actionpack (3.0.0) lib/action_controller/metal/implicit_render.rb:5:in
send_action' actionpack (3.0.0) lib/abstract_controller/base.rb:150:in
process_action'actionpack (3.0.0) lib/action_controller/metal/rendering.rb:11:in
process_action' actionpack (3.0.0) lib/abstract_controller/callbacks.rb:18:in
block in process_action'activesupport (3.0.0) lib/active_support/callbacks.rb:435:in
_run__192140777088512817__process_action__2373947522437712861__callbacks' activesupport (3.0.0) lib/active_support/callbacks.rb:409:in
_run_process_action_callbacks'activesupport (3.0.0) lib/active_support/callbacks.rb:93:in
run_callbacks' actionpack (3.0.0) lib/abstract_controller/callbacks.rb:17:in
process_action'actionpack (3.0.0) lib/action_controller/metal/instrumentation.rb:30:in
block in process_action' activesupport (3.0.0) lib/active_support/notifications.rb:52:in
block in instrument'activesupport (3.0.0) lib/active_support/notifications/instrumenter.rb:21:in
instrument' activesupport (3.0.0) lib/active_support/notifications.rb:52:in
instrument'actionpack (3.0.0) lib/action_controller/metal/instrumentation.rb:29:in
process_action' actionpack (3.0.0) lib/action_controller/metal/rescue.rb:17:in
process_action'actionpack (3.0.0) lib/abstract_controller/base.rb:119:in
process' actionpack (3.0.0) lib/abstract_controller/rendering.rb:40:in
process'actionpack (3.0.0) lib/action_controller/metal.rb:133:in
dispatch' actionpack (3.0.0) lib/action_controller/metal/rack_delegation.rb:14:in
dispatch'actionpack (3.0.0) lib/action_controller/metal.rb:173:in
block in action' actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:62:in
call'actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:62:in
dispatch' actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:27:in
call'rack-mount (0.6.13) lib/rack/mount/route_set.rb:148:in
block in call' rack-mount (0.6.13) lib/rack/mount/code_generation.rb:93:in
block in recognize'rack-mount (0.6.13) lib/rack/mount/code_generation.rb:68:in
optimized_each' rack-mount (0.6.13) lib/rack/mount/code_generation.rb:92:in
recognize'rack-mount (0.6.13) lib/rack/mount/route_set.rb:139:in
call' actionpack (3.0.0) lib/action_dispatch/routing/route_set.rb:492:in
call'actionpack (3.0.0) lib/action_dispatch/middleware/best_standards_support.rb:17:in
call' actionpack (3.0.0) lib/action_dispatch/middleware/head.rb:14:in
call'rack (1.2.1) lib/rack/methodoverride.rb:24:in
call' actionpack (3.0.0) lib/action_dispatch/middleware/params_parser.rb:21:in
call'actionpack (3.0.0) lib/action_dispatch/middleware/flash.rb:182:in
call' actionpack (3.0.0) lib/action_dispatch/middleware/session/abstract_store.rb:149:in
call'actionpack (3.0.0) lib/action_dispatch/middleware/cookies.rb:287:in
call' activerecord (3.0.0) lib/active_record/query_cache.rb:32:in
block in call'activerecord (3.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in
cache' activerecord (3.0.0) lib/active_record/query_cache.rb:12:in
cache'activerecord (3.0.0) lib/active_record/query_cache.rb:31:in
call' activerecord (3.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in
call'actionpack (3.0.0) lib/action_dispatch/middleware/callbacks.rb:46:in
block in call' activesupport (3.0.0) lib/active_support/callbacks.rb:415:in
_run_call_callbacks'actionpack (3.0.0) lib/action_dispatch/middleware/callbacks.rb:44:in
call' rack (1.2.1) lib/rack/sendfile.rb:107:in
call'actionpack (3.0.0) lib/action_dispatch/middleware/remote_ip.rb:48:in
call' actionpack (3.0.0) lib/action_dispatch/middleware/show_exceptions.rb:46:in
call'railties (3.0.0) lib/rails/rack/logger.rb:13:in
call' rack (1.2.1) lib/rack/runtime.rb:17:in
call'activesupport (3.0.0) lib/active_support/cache/strategy/local_cache.rb:72:in
call' rack (1.2.1) lib/rack/lock.rb:11:in
block in call'internal:prelude:10:in
synchronize' rack (1.2.1) lib/rack/lock.rb:11:in
call'actionpack (3.0.0) lib/action_dispatch/middleware/static.rb:30:in
call' railties (3.0.0) lib/rails/application.rb:168:in
call'railties (3.0.0) lib/rails/application.rb:77:in
method_missing' railties (3.0.0) lib/rails/rack/log_tailer.rb:14:in
call'rack (1.2.1) lib/rack/content_length.rb:13:in
call' rack (1.2.1) lib/rack/handler/webrick.rb:52:in
service'/Users/buddha/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:111:in
service' /Users/buddha/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:70:in
run'/Users/buddha/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
The text was updated successfully, but these errors were encountered: