Rails tutorial

34 views
Skip to first unread message

Etienne Brunet

unread,
Dec 28, 2014, 5:09:12 PM12/28/14
to rubyonra...@googlegroups.com
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

unread,
Dec 29, 2014, 3:28:04 AM12/29/14
to rubyonra...@googlegroups.com
On 28 December 2014 at 22:09, Etienne Brunet <etienn...@gmail.com> wrote:
> 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

Etienne Brunet

unread,
Dec 29, 2014, 9:49:57 AM12/29/14
to rubyonra...@googlegroups.com
Ok thank you. I found the error, It is weird because all test where failing for 1 syntaxt error...

Colin Law

unread,
Dec 29, 2014, 10:35:21 AM12/29/14
to rubyonra...@googlegroups.com
On 29 December 2014 at 14:49, Etienne Brunet <etienn...@gmail.com> wrote:
> 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

>
>
> On Sunday, December 28, 2014 5:09:12 PM UTC-5, Etienne Brunet wrote:
>>
>> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/17fe74d8-448c-4092-ba47-57d0d2cc3c65%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages