Ask Your Question
0

syntax error unexpected kend expecting $end

asked 2015-01-27 07:59:27 -0500

wingZero gravatar image

updated 2015-01-27 22:09:58 -0500

GregLarkin gravatar image

Hi,

I am getting this error with the below syntax, any idea what I need to do to get this working?

The ruby I believe seems ok.

Details:

<% if definition == "someserver" -%>
$ModLoad imfile.so

<% i = exec( "date +%Y_%m_%d" ) -%>

$InputFileName /data/logs/weblogs/jetty-<%= i -%>.request.log

<% end -%>

 Log anything (except mail) of level info or higher.

Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local7.none     /var/log/messages

<% end -%>
edit retag flag offensive close merge delete

Comments

Is that all to your code? From that error it looks like it is expecting another <% end %> statement - any other loops/ifs/etc that aren't in the above snippet?

lorcutt gravatar imagelorcutt ( 2015-01-27 11:07:02 -0500 )edit

Hi, There are things further below, but nothing above that as its at the top of the file. If I remove this bit the template runs fine.

wingZero gravatar imagewingZero ( 2015-01-27 15:23:47 -0500 )edit
1

It looks like you have unbalanced end statements, but it would be helpful if you posted a link to a pastebin of the complete file. Otherwise, it may be difficult to tell exactly why the error occurs.

GregLarkin gravatar imageGregLarkin ( 2015-01-27 22:14:17 -0500 )edit

Hi, Added the full file. http://pastebin.com/tEv64qnV

wingZero gravatar imagewingZero ( 2015-01-28 01:53:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-01-28 11:11:45 -0500

GregLarkin gravatar image

Looking at your full source code, it appears that you have an unbalanced end statement in your Ruby code. Remove the unbalanced one, and you should be all set.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-27 07:59:27 -0500

Seen: 591 times

Last updated: Jan 28 '15