title: Rails ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template:)
body: <p>My rails app runs fine in development. but when I deploy it to production on VPS, the page does not load.</p>
  <p>when i load the paige while running a tail on the log</p>
  <pre><code>tail -f /var/www/myapp/code/log/production.log
  </code></pre>
  <p>I get below error</p>
  <pre><code>INFO -- : [1c740360-49a5-4920-9dfd-47673fbd4eee] Started GET &quot;/&quot; for 27.0.0.1 at 2021-01-04 14:45:11 +0000
  INFO -- : [1c740360-49a5-4920-9dfd-47673fbd4eee] Processing by DashboardController#index as HTML
  INFO -- : [1c740360-49a5-4920-9dfd-47673fbd4eee]   Rendering dashboard/index.html.erb within layouts/application
  INFO -- : [1c740360-49a5-4920-9dfd-47673fbd4eee]   Rendered dashboard/index.html.erb within layouts/application (Duration: 1.0ms | Allocations: 394)
  INFO -- : [1c740360-49a5-4920-9dfd-47673fbd4eee] Completed 500 Internal Server Error in 3ms (Allocations: 710)
  FATAL -- : [1c740360-49a5-4920-9dfd-47673fbd4eee] ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template: check
  </code></pre>
  <p>Rails points me to the code for app/view/dashboard/index.html.erb which is shown below.</p>
  <pre><code>    &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
  
  &lt;section&gt;
  
  &lt;div class=&quot;block center-text&quot;&gt;
    &lt;header class=&quot;header-group&quot;&gt;
      &lt;h3&gt;Welcome to Igbo Progressive Union, Connecting Igbo's, around the world.&lt;/h3&gt;
    &lt;/header&gt;
    &lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;col-md-12&quot;&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/section&gt;
  &lt;%= flash_messages %&gt;
  
  &lt;section id=&quot;welcome&quot;&gt;
      &lt;!-- ======= Top banner ======= --&gt;
    &lt;div  class=&quot;jumbotron img-centre&quot;&gt;
      &lt;div background: url(&quot;../images/welcomeimage.jpeg&quot;) &gt;
        
        
        &lt;p&gt;
          &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
          &lt;a class=&quot;btn btn-primary btn-lg&quot; href=&quot;#about&quot;&gt;Learn more&lt;/a&gt;
        &lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/section&gt;
    
  
  &lt;section id=&quot;about&quot;&gt;
    &lt;div class=&quot;panel panel-success&quot;&gt;
      &lt;div class=&quot;panel-heading&quot;&gt;
        &lt;h3 class=&quot;panel-title&quot;&gt;About IPU&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class=&quot;panel-body&quot;&gt;
        &lt;table class=&quot;table-responsive&quot;&gt;
          &lt;tbody&gt;
            
            &lt;tr&gt;
              &lt;td&gt;&lt;a&gt;&lt;%= image_tag &quot;ipu_logo1.jpg&quot;, width:&quot;auto&quot;, height:&quot;200&quot;, alt=&quot;ipu_logo&quot; %&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;td conspan=&quot;7&quot;&gt;
                &lt;div class=&quot;well&quot;&gt;
                &lt;p&gt;We promote, protect and defend the interest of our members and their dependants around the world. We strive to create awareness of our culture and roots among ourselves and our children. Furthermore IPU promotes social interaction amongst the members of the community and and our members to enhance good relations between our Igbo community and other communities in Nigeria, United Kingdom, USA and throughout the world.&lt;/p&gt;
              &lt;/div&gt;
  
              &lt;/td&gt;
              &lt;td&gt;&lt;a&gt;&lt;%= image_tag(&quot;IMG_6240.JPG&quot;, width:&quot;auto&quot;, height:&quot;200&quot;) %&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
          &lt;div class=&quot;well&quot;&gt;
            &lt;p&gt;Our goal is to continously promote Igbo language and culture (Omenani) everywhere in the world where Igbo's reside. We provide a common platform for Igbo's to engage in conversations concerning our culture and tradition, and share information to promote our ideologies. There are extended benefits for financial members, that include support in times of need, such as bereavement, child birth, hospitalization and many more. You can participate on our platform as a standard member at no extra cost by registering on our home page. If you enjoy what we are doing and want to support us, please make a voluntary contrubition to support our global efforts. However becoming a financial member, makes you eligible for all benefits and support as stated in our Articles of Association (constitution) as may be amended from time to time by the general assembley.&lt;/p&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/section&gt;
  
  &lt;section id=&quot;objectives&quot;&gt;
    &lt;div class=&quot;panel panel-info&quot;&gt;
      &lt;div class=&quot;panel-heading&quot;&gt;
        &lt;h3 class=&quot;panel-title&quot;&gt;Objectives of IPU&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class=&quot;panel-body&quot;&gt;
        &lt;table class=&quot;table-responsive&quot;&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;
                &lt;ol type=&quot;1&quot;&gt;
                  &lt;li&gt;To promote brotherhood, friendship and unity amongst the Igbo community living in Northamptonshire, the United Kingdom, Nigeria, and throughout the world as well as integrating with other communities.&lt;/li&gt;
                  &lt;li&gt;To support the welfare of IPU members whether that be morally, financially or otherwise in causes which in the opinion of the General Meeting merit the support of members.&lt;/li&gt;
                  &lt;li&gt;To promote and create awareness of the Igbo Language and culture within Northamptonshire and the United Kingdom in general through cultural events, festivals, seminars, and speaking Igbo.&lt;/li&gt;
                  &lt;li&gt;To organise lectures and educational trips about Igbo language, culture and heritage to the children of IPU members.&lt;/li&gt;
                  &lt;li&gt;In accordance with Igbo tradition to observe “OMENANI” where appropriate to do so.&lt;/li&gt;
                &lt;/ol&gt;
              &lt;/td&gt;
              &lt;td&gt;&lt;a&gt;&lt;%= image_tag(&quot;IMG_66131.JPG&quot;, width:&quot;auto&quot;, height:&quot;200&quot;) %&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/section&gt;
  
  &lt;section id=&quot;contact&quot;&gt;
    &lt;div class=&quot;panel panel-primary&quot;&gt;
      &lt;div class=&quot;panel-heading&quot;&gt;
        &lt;h3 class=&quot;panel-title&quot;&gt;Contact Us&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class=&quot;panel-body&quot;&gt;
        &lt;table class=&quot;table-responsive&quot;&gt;
          &lt;tbody&gt;
              &lt;tr&gt;
                &lt;td&gt;&lt;%= image_tag(&quot;IMG_62471.JPG&quot;, width:&quot;auto&quot;, height:&quot;200&quot;) %&gt;&lt;/td&gt;
              &lt;td&gt;
                &lt;p&gt;Pastor  &lt;/p&gt;
                  &lt;p&gt;Phone: +44&lt;/p&gt;
                &lt;br&gt;
                &lt;p&gt;Barr &lt;/p&gt;
                  &lt;p&gt;Phone: +44&lt;/p&gt;
                &lt;br&gt;
                &lt;p&gt;Gideon &lt;/p&gt;
                  &lt;p&gt;Phone: +44&lt;/p&gt;
                &lt;br&gt;
                &lt;p&gt;Chidi  &lt;/p&gt;
                  &lt;p&gt;Phone: +44&lt;/p&gt;
                  &lt;br&gt;
                &lt;p&gt;Kingsley &lt;/p&gt;
                  &lt;p&gt;Phone: +44&lt;/p&gt;
              &lt;/td&gt;
            &lt;/tr&gt;
          &lt;/tbody&gt;
        &lt;/table&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/section&gt;
  </code></pre>
  <p>My trouble is that I cannot find any syntax errors. finally to top it off below errors are thrown out.</p>
  <pre><code>[7897e223-644d-47ba-bc0c-1eb65772a76d] app/views/dashboard/index.html.erb:42: syntax error, unexpected ')', expecting =&gt;
  [7897e223-644d-47ba-bc0c-1eb65772a76d] app/views/dashboard/index.html.erb:121: syntax error, unexpected `end', expecting ')'
  [7897e223-644d-47ba-bc0c-1eb65772a76d] app/views/dashboard/index.html.erb:42: syntax error, unexpected ')', expecting =&gt;
  [7897e223-644d-47ba-bc0c-1eb65772a76d] app/views/dashboard/index.html.erb:121: syntax error, unexpected `end', expecting ')'
  [7897e223-644d-47ba-bc0c-1eb65772a76d] app/views/dashboard/index.html.erb:42: syntax error, unexpected ')', expecting =&gt;
  [7897e223-644d-47ba-bc0c-1eb65772a76d] app/views/dashboard/index.html.erb:121: syntax error, unexpected `end', expecting ')'
  [7897e223-644d-47ba-bc0c-1eb65772a76d] app/views/dashboard/index.html.erb:42: syntax error, unexpected ')', expecting =&gt;
  [7897e223-644d-47ba-bc0c-1eb65772a76d] app/views/dashboard/index.html.erb:121: syntax error, unexpected `end', expecting ')'
  </code></pre>
  <p>however, i don't even have any line 121 in app/views/dashboard/index.html.erb:121 as the code finishes before that at line 119.</p>
  <p>How can I find this syntax error?. any and all ideas will be welcome. my production server config is shown below</p>
  <p>Ubuntu 20.04
  Ruby 2.7.2 with RVM rvm 1.29.11
  Webserver : Passenger NGINX
  Database : Mysql 8.0</p>