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.
Eb71c362ddeda80c2668d2575e97bc70?d=identicon&s=25 winter heat (winterheat)
on 2009-05-24 21: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.
4375b4aca04b8d72482fd409fb6d0b47?d=identicon&s=25 Roderick van Domburg (roderickvd)
on 2009-05-24 22: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
Eb71c362ddeda80c2668d2575e97bc70?d=identicon&s=25 winter heat (winterheat)
on 2009-05-24 22: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 %>
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2009-05-24 22: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 <rails-mailing-list@andreas-s.net>
This topic is locked and can not be replied to.