I've installed locomotive and all seemed to be fine. The localhost
works and I can make a new project and generate controllers, views etc.
However as soon as I put some Ruby code in a view html page I get a
Syntax Error. Even just trying to use date won't work.
Anyone know where I'm going wrong? I'm keen to get coding!
Showing app/views/say/hello.rhtml where line #1 raised:
compile error
/Users/jim/Documents/work/demo/config/../app/views/say/hello.rhtml:1:
unknown regexp option - p
/Users/jim/Documents/work/demo/config/../app/views/say/hello.rhtml:1:
parse error, unexpected $undefined.
_erbout = ''; _erbout.concat "<html>\r <head>\r <title>Hello,
Rails!</title>\r </head>\r <body>\r <h1>Hello from Rails</h1>\r
<p>\r It is now "; /= @time ; _erbout.concat ".\r </p>\r
</body>\r</html>\r"; _erbout
^
/Users/jim/Documents/work/demo/config/../app/views/say/hello.rhtml:1:
unknown regexp options - htl
/Users/jim/Documents/work/demo/config/../app/views/say/hello.rhtml:1:
parse error, unexpected $undefined.
_erbout = ''; _erbout.concat "<html>\r <head>\r <title>Hello,
Rails!</title>\r </head>\r <body>\r <h1>Hello from Rails</h1>\r
<p>\r It is now "; /= @time ; _erbout.concat ".\r </p>\r
</body>\r</html>\r"; _erbout
^
/Users/jim/Documents/work/demo/config/../app/views/say/hello.rhtml:1:
unterminated string meets end of file
/Users/jim/Documents/work/demo/config/../app/views/say/hello.rhtml:1:
parse error, unexpected $, expecting kEND
Extracted source (around line #1):
1: <html>
<head>
<title>Hello, Rails!</title>
</head>
<body>
<h1>Hello from Rails</h1>
<p>
It is now <%/= @time %>.
</p>
</body>
</html>
Trace of template inclusion: /app/views/say/hello.rhtml
Seems to be a simple typeing error...
See the slash ( / ) you have in front of the " = " ? thats wrong ...
the parser seems to see it as ather start of a regular expression
pattern, which are usually ecapsulated in slashes .. /pattern/