Hi,
I’m following the https://www.railstutorial.org
I’m now at chapter 10. Since yesterday all my 42 tests are RED and reports the same error :
ERROR[“test_should_get_new”, UsersControllerTest, 0.274138782]
test_should_get_new#UsersControllerTest (0.27s)
SyntaxError: SyntaxError: (erb):36: syntax error, unexpected tLABEL
activated: true
^
(erb):37: syntax error, unexpected ‘:’, expecting ‘)’
activated_at: <%= Time.zone.now ).to_s); _erbout.concat “\n”
^
(erb):37: unterminated string meets end of file
The app is working great.
I’m on cloud9.
I have restarted the server etc… same errors. Everything was working great since yesterday.
Thx
Colin_Law
(Colin Law)
December 29, 2014, 8:27am
2
Hi,
I'm following the https://www.railstutorial.org
I'm now at chapter 10. Since yesterday all my 42 tests are RED and reports
the same error :
ERROR["test_should_get_new", UsersControllerTest, 0.274138782]
test_should_get_new#UsersControllerTest (0.27s)
SyntaxError: SyntaxError: (erb):36: syntax error, unexpected tLABEL
activated: true
The error says that you have got a syntax on line 36, but you have not
shown us the code which has the error. Show us that line (from
whichever file it says has the error) along with a few lines before it
as sometimes the error is actually on a preceding line, but it is not
obvious to Ruby that there is an error until it reads the next
line(s).
Which version of ruby are you using (ruby -v, run from the root folder
of the application). I assume you are running the test from that
folder.
^
(erb):37: syntax error, unexpected ':', expecting ')'
activated_at: <%= Time.zone.now ).to_s); _erbout.concat "\n"
^
(erb):37: unterminated string meets end of file
The app is working great.
I'm on cloud9.
I have restarted the server etc... same errors. Everything was working great
since yesterday.
When running tests it is not necessary to have the server running.
Colin
Ok thank you. I found the error, It is weird because all test where failing for 1 syntaxt error…
Colin_Law
(Colin Law)
December 29, 2014, 3:34pm
4
Ok thank you. I found the error, It is weird because all test where failing
for 1 syntaxt error...
A syntax error is detected when the code is loaded and the whole app
is loaded for any test.
Colin