# Rails tutorial

**URL:** <https://discuss.rubyonrails.org/t/rails-tutorial/70065>\
**Category:** rubyonrails-talk\
**Created:** [December 28, 2014, 10:09pm UTC](https://discuss.rubyonrails.org/t/rails-tutorial/70065 "2014-12-28T22:09:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Etienne\_Brunet](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Etienne\_Brunet](https://discuss.rubyonrails.org/u/Etienne_Brunet)\
**Post date:** [December 28, 2014, 10:09pm UTC](https://discuss.rubyonrails.org/t/rails-tutorial/70065/1 "2014-12-28T22:09:12Z")

</div>

Hi,

I’m following the [https://www.railstutorial.org](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

---

<div class="post-metadata">

**Author:** ![Colin\_Law](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@Colin\_Law](https://discuss.rubyonrails.org/u/Colin_Law)\
**Post date:** [December 29, 2014, 8:27am UTC](https://discuss.rubyonrails.org/t/rails-tutorial/70065/2 "2014-12-29T08:27:15Z")

</div>

> Hi,
> 
> I'm following the [https://www.railstutorial.org](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 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(erb):37: syntax error, unexpected ':', expecting ')' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activated\_at: \<%= Time.zone.now ).to\_s); \_erbout.concat "\n" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(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

---

<div class="post-metadata">

**Author:** ![Etienne\_Brunet](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Etienne\_Brunet](https://discuss.rubyonrails.org/u/Etienne_Brunet)\
**Post date:** [December 29, 2014, 2:49pm UTC](https://discuss.rubyonrails.org/t/rails-tutorial/70065/3 "2014-12-29T14:49:57Z")

</div>

Ok thank you. I found the error, It is weird because all test where failing for 1 syntaxt error…

---

<div class="post-metadata">

**Author:** ![Colin\_Law](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@Colin\_Law](https://discuss.rubyonrails.org/u/Colin_Law)\
**Post date:** [December 29, 2014, 3:34pm UTC](https://discuss.rubyonrails.org/t/rails-tutorial/70065/4 "2014-12-29T15:34:33Z")

</div>

> 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
