Forum: Ruby on Rails what is kENSURE and kEND in error message?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
winter h. (Guest)
on 2009-05-24 23:30
I sometimes get an error on the page as:

    compile error
    /Users/jian/ror/shov2/app/views/stories/index.html.erb:13: syntax
error, unexpected kENSURE, expecting ')'
    /Users/jian/ror/shov2/app/views/stories/index.html.erb:15: syntax
error, unexpected kEND, expecting ')'

the kEND, i can guess that it is End... so it means End of file but
unexpected, there should be a ')'.

how about the kENSURE ?  and... why the "k" attached in front?  thanks.
Roderick v. (Guest)
on 2009-05-25 00:33
SpringFlowers AutumnMoon wrote:
> how about the kENSURE ?  and... why the "k" attached in front?  thanks.

K is for keyword; the keyword ensure. It seems like you have a
ensure..end block without the appropriate "begin".

--
Roderick van Domburg
http://www.nedforce.com
winter h. (Guest)
on 2009-05-25 00:50
Roderick van Domburg wrote:
> SpringFlowers AutumnMoon wrote:
>> how about the kENSURE ?  and... why the "k" attached in front?  thanks.
>
> K is for keyword; the keyword ensure. It seems like you have a
> ensure..end block without the appropriate "begin".

ah, it actually happened with the <%= # some code %>
Colin L. (Guest)
on 2009-05-25 00:56
(Received via mailing list)
I think the problem is that seen with most languages, when you have a
syntax
error the message may appear to have little to do with the actual error
as
the parser has gone off down the wrong track but does not realise this
until
it is too late.  Admittedly ruby does seem particularly poor at
generating
useful messages.

Colin

2009/5/24 SpringFlowers AutumnMoon <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.