Haml Syntax Error Unexpected $end Expecting Kend
Contents |
here for a quick overview of the site Help Center Detailed answers to any haml unexpected keyword_ensure expecting end-of-input questions you might have Meta Discuss the workings and policies
Unexpected End-of-input, Expecting Keyword_end Haml
of this site About Us Learn more about Stack Overflow the company Business Learn more
Syntax Error Unexpected Keyword_ensure Expecting Keyword_end Haml
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Haml Comment
Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Rails HAML conversion problems - unexpected kENSURE, expecting kEND up vote 5 down vote favorite I'm trying to switch over to using HAML for my views but I keep haml to html getting unexpected KENSURE messages. I've used html2haml to switch over working view files. First run through it told me I didn't need the end that html2haml had in its output so I removed it and now I get errors that look like it is complaining about the form not being ended. What am I doing wrong? error message: compile error app/views/sessions/new.html.haml:20: syntax error, unexpected kENSURE, expecting kEND app/views/sessions/new.html.haml:22: syntax error, unexpected $end, expecting kEND application.html.haml: !!! %html %head %title = APP_CONFIG[:site_name] + ': ' + @page_title == == == == == == = stylesheet_link_tag 'base' = javascript_include_tag :defaults %body #container #header - if logged_in? = link_to 'Logout', logout_path - else = link_to 'Login', login_path = link_to 'Signup', signup_path #content = flash_messages = yield :layout and sessions/new.html.haml = tit
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up syntax error, unexpected keyword_ensure, expecting $end, in HAML using form_tag up vote 2 down vote favorite Once http://stackoverflow.com/questions/971367/rails-haml-conversion-problems-unexpected-kensure-expecting-kend I replaced "form{:action => "/comments"}" with a "form_tag('/comments')" in the following code: =form_tag('/comments') %fieldset %input.comment_input{ :name => "comment[comment]", :size => 60, :type => "text" } %input{ :name => "comment[activity_id]", :type => 'hidden', :value => "#{activity.id}" } %button.post_coment_btn{ :type => "submit", :formmethod => "post"} Add Comment I then got the following error: syntax error, unexpected keyword_ensure, expecting $end . . on line 18, but the file containing the above only has 17 lines. http://stackoverflow.com/questions/9090096/syntax-error-unexpected-keyword-ensure-expecting-end-in-haml-using-form-tag Am I using the form_tag incorrectly? <-- Update --> Using the form_tag do as indicated by @Ben Zhang worked only I actually wanted to go to the 'create' action in the 'comments' controller: =form_tag :action => 'create', :controller => 'comments' do ruby-on-rails forms haml share|improve this question edited Feb 1 '12 at 3:25 asked Feb 1 '12 at 2:53 John 3,08693359 add a comment| 1 Answer 1 active oldest votes up vote 10 down vote accepted Try this one = form_tag :action => '/comments' do share|improve this answer answered Feb 1 '12 at 3:05 Ben Zhang 896813 Lost 15 minutes to this one...d'oh! –Nate Berkopec Mar 19 '12 at 18:43 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged ruby-on-rails forms haml or ask your own question. asked 4 years ago viewed 3419 times active 4 years ago Related 3Error: haml syntax error, unexpected keyword_ensure, expecting $end2HAML error, ruby 1.9.3 on rails 3.
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
& conditions Register Back to Login Reset Password Reset Password Return to Login Sign In Login Login Need an account? Register here! Forgot Password? Login with FacebookLogin with Google Register I agree with terms & conditions Register Back to Login Reset Password Reset Password Return to Login Buy Sell Mortgage Your search results Page not found We're sorry. Your page could not be found, But you can check our latest listings & articles Latest Listings 2327 Greenview Dr SW Latest Articles This is a test postHello world! Copyright © 2016 Rezider, Inc. All rights reserved. Fair Housing and Equal Opportunity. Have a Question? Visit our Help Center to find the answer. Contact Us Use the form below to contact us! Send