Compile Error Syntax Error Unexpected Kensure Expecting $end
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 Compile error, unexpected kENSURE, expecting $end error in Rails 3 project up vote 0 down vote favorite Can someone please tell me what I'm doing wrong here? I get the following error when I try to load my form (/posts/show): SyntaxError in Posts#show Showing /Users/fkhalid2008/loand/app/views/posts/show.html.erb where line #10 raised: compile error /Users/fkhalid2008/loand/app/views/posts/show.html.erb:10: syntax error, unexpected kENSURE, expecting $end Extracted source (around line #10): 7: 8: 9: <% end %> Here is the relevant code: POSTS/SHOW <%= form_remote_tag( :update => 'message', :url => {:controller => 'main', :action => 'send_message', :user_id => @post.user.id }) %>
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 http://stackoverflow.com/questions/10271809/compile-error-unexpected-kensure-expecting-end-error-in-rails-3-project a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Compile error, unexpected kENSURE, expecting $end error in Rails 3 project up vote 0 down vote favorite Can someone please tell me what I'm doing wrong here? I get the following error http://stackoverflow.com/a/10271952 when I try to load my form (/posts/show): SyntaxError in Posts#show Showing /Users/fkhalid2008/loand/app/views/posts/show.html.erb where line #10 raised: compile error /Users/fkhalid2008/loand/app/views/posts/show.html.erb:10: syntax error, unexpected kENSURE, expecting $end Extracted source (around line #10): 7: 8: 9: <% end %> Here is the relevant code: POSTS/SHOW <%= form_remote_tag( :update => 'message', :url => {:controller => 'main', :action => 'send_message', :user_id => @post.user.id }) %>
Support Search GitHub This repository Watch 197 Star 5,409 Fork 545 middleman/middleman Code Issues 129 Pull requests 8 Projects 0 Pulse Graphs New issue Syntax for https://github.com/middleman/middleman/issues/881 a link_to with class and data-* attributes? #881 Closed benfrain opened this https://groups.google.com/d/topic/slim-template/q0FZYMPuD9M Issue May 2, 2013 · 9 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 4 participants benfrain commented May 2, 2013 Sorry, basic question but if I'm constructing a link and want both classes and data- attributes, what's the correct syntax. I've been stack-overflowing for compile error the last 30 mins, tried umpteen syntax's and still not got it. For example (non-worky): <% link_to 'My Link', '/link.html', :class => 'main-link', data: { icon: => 'd' } do %> <% end %> ?? Do I have to make a new helper? Middleman member tdreyno commented May 2, 2013 Does neither work? :class seems right, for hyphenated: :"data-icon" => for 1.8.x, data-icon: for compile error syntax 1.9+ benfrain commented May 3, 2013 Mr Reynolds, neither of those seem to work but I'm probably doing something obviously stupid. I'm running 3.0.1* of MM. If I use: <% link_to 'Source Code', '/downloads.html', :class => 'main-link color-five' :"data-icon" => 'd' do %><% end %> Here is the error (truncated the paths slightly for brevity): compile error /.../source/layouts/partials/_header.erb:13: syntax error, unexpected ':', expecting kEND ...ss => 'main-link color-five' :"data-icon" => 'd' do ; @_out_... ^ /.../source/layouts/partials/_header.erb:13: syntax error, unexpected tASSOC, expecting kEND ...nk color-five' :"data-icon" => 'd' do ; @_out_buf.concat "\n... ^ /.../source/layouts/partials/_header.erb:13: syntax error, unexpected kDO, expecting kEND ...r-five' :"data-icon" => 'd' do ; @_out_buf.concat "\n" ^ /.../source/layouts/partials/_header.erb:21: syntax error, unexpected kENSURE, expecting kEND /.../source/layouts/partials/_header.erb:25: syntax error, unexpected kEND, expecting $end end;end;end;end ^ If I try the second method: <% link_to 'Source Code', '/downloads.html', :class => 'main-link color-five' data-icon: => 'd' do %><% end %> Here is the error (truncated the paths slightly for brevity): syntax error, unexpected tIDENTIFIER, expecting kEND ...=> 'main-link color-five' data-icon: => 'd' do ; @_out_buf.c... ^ /.../source/layouts/partials/_header.erb:13: syntax error, unexpected ':', expecting kEND ...in-link color-five' data-icon: => 'd' do ; @_out_buf.concat ... ^ /.../source/layouts/partials/_header.erb:
van GoogleInloggenVerborgen veldenZoeken naar groepen of berichten