Unexpected, Expected

Okay I got ther error below in figure-1, so I added an end then I got
figure-2
figure-1
expecting tCOLON2 or ‘[’ or ‘.’
figure-2
unexpected ‘;’, expecting tCOLON2 or ‘[’ or ‘.’
end ; _erbout

Mohammad wrote:

Okay I got ther error below in figure-1, so I added an end then I got
figure-2
figure-1
expecting tCOLON2 or ‘[’ or ‘.’
figure-2
unexpected ‘;’, expecting tCOLON2 or ‘[’ or ‘.’
end ; _erbout

This rather unhelpful error message indicates that you’ve got a syntax
error
somewhere. You’ll just have to track it down.

Dan

This communication is the property of Qwest and may contain confidential
or
privileged information. Unauthorized use of this communication is
strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and
destroy
all copies of the communication and any attachments.

Panel for <%= @user.login %>

Army

<% for @army_types.each do |running| %> <% if @user.running != nil %> <%= @army_names[@cell1] %>: <%= @user.running %>
<% end %> <% @cell1 += 1 %> <% end %> thats the code

Mohammad wrote:

Panel for <%= @user.login %>

Army

<% for @army_types.each do |running| %> <% if @user.running != nil %> <%= @army_names[@cell1] %>: <%= @user.running %>
<% end %> <% @cell1 += 1 %> <% end %> thats the code

Check your .each line.

Alex Y. wrote:

Mohammad wrote:

Panel for <%= @user.login %>

Army

<% for @army_types.each do |running| %> <% if @user.running != nil %> <%= @army_names[@cell1] %>: <%= @user.running %>
<% end %> <% @cell1 += 1 %> <% end %> thats the code

Check your .each line.
thats not the error, I really want to know whats going down, this has
been staling me for weeks now

Panel for <%= @user.login %>

Army

<% @army_types.each do |running| %> <% if @user.running != nil %> <%= @army_names[@cell1] %>: <%= @user.running %>
<% end %> <% @cell1 += 1 %> <% end %> thats the code

it’s the “for” above is the code now but, I can’t do @user.running is
there a way to do somthing like that?

Mohammad wrote:

<% @cell1 += 1 %>
<% end %>
thats the code

Check your .each line.

thats not the error, I really want to know whats going down, this has
been staling me for weeks now
Check it again.

irb(main):001:0> l = [1,2,3]
=> [1, 2, 3]
irb(main):002:0> for l.each do |line|
irb(main):003:1* puts line
irb(main):004:1> end
SyntaxError: compile error
(irb):4: parse error, unexpected ‘\n’, expecting tCOLON2 or ‘[’ or ‘.’
from (irb):4

Mohammad wrote:

it’s the “for” above is the code now but, I can’t do @user.running is
there a way to do somthing like that?
What are your models? What is the schema? What are you expecting
@user.running to return?