growstuff icon indicating copy to clipboard operation
growstuff copied to clipboard

ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template

Open CloCkWeRX opened this issue 1 year ago • 4 comments

https://growstuff.org/seeds/pazinjanka-soybean-ed4ecd88-3528-468d-a42c-b86eb9f25965

app/views/seeds/show.html.haml:49: syntax error, unexpected '(', expecting ')'

2024-02-04T03:10:11.152931+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template: check - content_for :title, "#{@seed.owner}'s #{@seed.crop} seeds"
2024-02-04T03:10:11.152933+00:00 app[web.1]: - content_for :opengraph do
2024-02-04T03:10:11.152935+00:00 app[web.1]:   = tag("meta", property: "og:image", content: seed_image_path(@seed))
2024-02-04T03:10:11.152935+00:00 app[web.1]:   - if @seed.description
2024-02-04T03:10:11.152936+00:00 app[web.1]:     = tag("meta", property: "og:description", content: og_description(@seed.description))
2024-02-04T03:10:11.152937+00:00 app[web.1]:   = tag("meta", property: "og:image", content: "#{@seed.owner}'s #{@seed.crop} seeds")
2024-02-04T03:10:11.152938+00:00 app[web.1]:   = tag("meta", property: "og:type", content: "website")
2024-02-04T03:10:11.152939+00:00 app[web.1]:   = tag("meta", property: "og:url", content: request.original_url)
2024-02-04T03:10:11.152939+00:00 app[web.1]:   = tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
2024-02-04T03:10:11.152940+00:00 app[web.1]: 
2024-02-04T03:10:11.152941+00:00 app[web.1]: 
2024-02-04T03:10:11.152941+00:00 app[web.1]: - content_for :breadcrumbs do
2024-02-04T03:10:11.152941+00:00 app[web.1]:   %li.breadcrumb-item= link_to 'Seeds', seeds_path
2024-02-04T03:10:11.152942+00:00 app[web.1]:   %li.breadcrumb-item= link_to @seed.owner, member_seeds_path(@seed.owner)
2024-02-04T03:10:11.152942+00:00 app[web.1]:   %li.breadcrumb-item.active= link_to @seed, @seed
2024-02-04T03:10:11.152942+00:00 app[web.1]: 
2024-02-04T03:10:11.152942+00:00 app[web.1]: .seed
2024-02-04T03:10:11.152942+00:00 app[web.1]:   .row
2024-02-04T03:10:11.152944+00:00 app[web.1]:     .col-md-9.col-12
2024-02-04T03:10:11.152944+00:00 app[web.1]:       .jumbotron
2024-02-04T03:10:11.152945+00:00 app[web.1]:         .d-flex.justify-content-between
2024-02-04T03:10:11.152946+00:00 app[web.1]:           %h1.display-3
2024-02-04T03:10:11.152946+00:00 app[web.1]:             = crop_icon(@seed.crop)
2024-02-04T03:10:11.152946+00:00 app[web.1]:             = @seed.crop.name.titleize
2024-02-04T03:10:11.152946+00:00 app[web.1]:             seeds
2024-02-04T03:10:11.152947+00:00 app[web.1]:           %span.text-muted= I18n.l @seed.created_at.to_date
2024-02-04T03:10:11.152947+00:00 app[web.1]:         - if @seed.organic != 'unknown'
2024-02-04T03:10:11.152947+00:00 app[web.1]:           .badge.badge-success.seedtitle--organic= @seed.organic
2024-02-04T03:10:11.152947+00:00 app[web.1]:         - if @seed.gmo != 'unknown'
2024-02-04T03:10:11.152947+00:00 app[web.1]:           .badge.badge-success.seedtitle--gmo= @seed.gmo
2024-02-04T03:10:11.152948+00:00 app[web.1]:         - if @seed.heirloom != 'unknown'
2024-02-04T03:10:11.152948+00:00 app[web.1]:           .badge.badge-success.seedtitle--heirloom= @seed.heirloom
2024-02-04T03:10:11.152948+00:00 app[web.1]:         - if @seed.parent_planting
2024-02-04T03:10:11.152948+00:00 app[web.1]:           %p
2024-02-04T03:10:11.152949+00:00 app[web.1]:             Saved from planting:
2024-02-04T03:10:11.152949+00:00 app[web.1]:             = planting_icon
2024-02-04T03:10:11.152949+00:00 app[web.1]:             = link_to @seed.parent_planting, planting_path(@seed.parent_planting)
2024-02-04T03:10:11.152949+00:00 app[web.1]:       = render 'seeds/actions', seed: @seed
2024-02-04T03:10:11.152949+00:00 app[web.1]: 
2024-02-04T03:10:11.152950+00:00 app[web.1]:       %section= render 'facts', seed: @seed
2024-02-04T03:10:11.152950+00:00 app[web.1]: 
2024-02-04T03:10:11.152950+00:00 app[web.1]:       - unless @seed.description.blank?
2024-02-04T03:10:11.152950+00:00 app[web.1]:         = cute_icon
2024-02-04T03:10:11.152951+00:00 app[web.1]:         .card.seed--description
2024-02-04T03:10:11.152951+00:00 app[web.1]:           .card-header
2024-02-04T03:10:11.152951+00:00 app[web.1]:             %h2 Notes
2024-02-04T03:10:11.152951+00:00 app[web.1]:           .card-body
2024-02-04T03:10:11.152951+00:00 app[web.1]:             :growstuff_markdown
2024-02-04T03:10:11.152952+00:00 app[web.1]:               #{strip_tags(@seed.description)}
2024-02-04T03:10:11.152952+00:00 app[web.1]: 
2024-02-04T03:10:11.152952+00:00 app[web.1]:       - if current_member
2024-02-04T03:10:11.152952+00:00 app[web.1]:         - if @seed.tradable && current_member != @seed.owner
2024-02-04T03:10:11.152953+00:00 app[web.1]:           %p= link_to "Request seeds",
2024-02-04T03:10:11.152953+00:00 app[web.1]:                       new_message_path(recipient_id: @seed.owner.id,
2024-02-04T03:10:11.152953+00:00 app[web.1]:                                            subject: "Interested in your #{@seed.crop} seeds"),
2024-02-04T03:10:11.152965+00:00 app[web.1]:                       class: 'btn btn-primary'
2024-02-04T03:10:11.152965+00:00 app[web.1]:       - else
2024-02-04T03:10:11.152966+00:00 app[web.1]:         = render 'shared/signin_signup', to: 'request seeds'
2024-02-04T03:10:11.152966+00:00 app[web.1]: 
2024-02-04T03:10:11.152966+00:00 app[web.1]:       %section.plantings
2024-02-04T03:10:11.152966+00:00 app[web.1]:         = render 'seeds/descendants', seed: @seed
2024-02-04T03:10:11.152966+00:00 app[web.1]:       %section.seed-photos
2024-02-04T03:10:11.152967+00:00 app[web.1]:         - @photos.each do |photo|
2024-02-04T03:10:11.152967+00:00 app[web.1]:           = render 'photos/hero', photo: photo
2024-02-04T03:10:11.152967+00:00 app[web.1]: 
2024-02-04T03:10:11.152967+00:00 app[web.1]:     .col-md-3.col-12
2024-02-04T03:10:11.152967+00:00 app[web.1]:       = render 'seeds/owner'
2024-02-04T03:10:11.152967+00:00 app[web.1]:       = render @seed.crop
2024-02-04T03:10:11.152968+00:00 app[web.1]: 
2024-02-04T03:10:11.152968+00:00 app[web.1]: ):
2024-02-04T03:10:11.152976+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 1:    - content_for :title, "#{@seed.owner}'s #{@seed.crop} seeds"
2024-02-04T03:10:11.152977+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 2:    - content_for :opengraph do
2024-02-04T03:10:11.152978+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 3:      = tag("meta", property: "og:image", content: seed_image_path(@seed))
2024-02-04T03:10:11.152978+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 4:      - if @seed.description
2024-02-04T03:10:11.152979+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 5:        = tag("meta", property: "og:description", content: og_description(@seed.description))
2024-02-04T03:10:11.152979+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 6:      = tag("meta", property: "og:image", content: "#{@seed.owner}'s #{@seed.crop} seeds")
2024-02-04T03:10:11.152980+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 7:      = tag("meta", property: "og:type", content: "website")
2024-02-04T03:10:11.152980+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 8:      = tag("meta", property: "og:url", content: request.original_url)
2024-02-04T03:10:11.152980+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 9:      = tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
2024-02-04T03:10:11.152980+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 10:    
2024-02-04T03:10:11.152980+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 11:    
2024-02-04T03:10:11.152981+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 12:    - content_for :breadcrumbs do
2024-02-04T03:10:11.152981+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 13:      %li.breadcrumb-item= link_to 'Seeds', seeds_path
2024-02-04T03:10:11.152981+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 14:      %li.breadcrumb-item= link_to @seed.owner, member_seeds_path(@seed.owner)
2024-02-04T03:10:11.152985+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 15:      %li.breadcrumb-item.active= link_to @seed, @seed
2024-02-04T03:10:11.152986+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 16:    
2024-02-04T03:10:11.152986+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 17:    .seed
2024-02-04T03:10:11.152986+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 18:      .row
2024-02-04T03:10:11.152987+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 19:        .col-md-9.col-12
2024-02-04T03:10:11.152987+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 20:          .jumbotron
2024-02-04T03:10:11.152987+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 21:            .d-flex.justify-content-between
2024-02-04T03:10:11.152988+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 22:              %h1.display-3
2024-02-04T03:10:11.152988+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 23:                = crop_icon(@seed.crop)
2024-02-04T03:10:11.152988+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 24:                = @seed.crop.name.titleize
2024-02-04T03:10:11.152989+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 25:                seeds
2024-02-04T03:10:11.152989+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 26:              %span.text-muted= I18n.l @seed.created_at.to_date
2024-02-04T03:10:11.152990+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 27:            - if @seed.organic != 'unknown'
2024-02-04T03:10:11.152990+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 28:              .badge.badge-success.seedtitle--organic= @seed.organic
2024-02-04T03:10:11.152990+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 29:            - if @seed.gmo != 'unknown'
2024-02-04T03:10:11.152990+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 30:              .badge.badge-success.seedtitle--gmo= @seed.gmo
2024-02-04T03:10:11.152991+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 31:            - if @seed.heirloom != 'unknown'
2024-02-04T03:10:11.152991+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 32:              .badge.badge-success.seedtitle--heirloom= @seed.heirloom
2024-02-04T03:10:11.152991+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 33:            - if @seed.parent_planting
2024-02-04T03:10:11.152991+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 34:              %p
2024-02-04T03:10:11.152991+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 35:                Saved from planting:
2024-02-04T03:10:11.152992+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 36:                = planting_icon
2024-02-04T03:10:11.152992+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 37:                = link_to @seed.parent_planting, planting_path(@seed.parent_planting)
2024-02-04T03:10:11.152992+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 38:          = render 'seeds/actions', seed: @seed
2024-02-04T03:10:11.152993+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 39:    
2024-02-04T03:10:11.152993+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 40:          %section= render 'facts', seed: @seed
2024-02-04T03:10:11.152993+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 41:    
2024-02-04T03:10:11.152993+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 42:          - unless @seed.description.blank?
2024-02-04T03:10:11.152993+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 43:            = cute_icon
2024-02-04T03:10:11.152994+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 44:            .card.seed--description
2024-02-04T03:10:11.152994+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 45:              .card-header
2024-02-04T03:10:11.152994+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 46:                %h2 Notes
2024-02-04T03:10:11.152994+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 47:              .card-body
2024-02-04T03:10:11.152994+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 48:                :growstuff_markdown
2024-02-04T03:10:11.152994+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 49:                  #{strip_tags(@seed.description)}
2024-02-04T03:10:11.152995+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 50:    
2024-02-04T03:10:11.152995+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 51:          - if current_member
2024-02-04T03:10:11.152995+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 52:            - if @seed.tradable && current_member != @seed.owner
2024-02-04T03:10:11.152995+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 53:              %p= link_to "Request seeds",
2024-02-04T03:10:11.152995+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 54:                          new_message_path(recipient_id: @seed.owner.id,
2024-02-04T03:10:11.152996+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 55:                                               subject: "Interested in your #{@seed.crop} seeds"),
2024-02-04T03:10:11.152996+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 56:                          class: 'btn btn-primary'
2024-02-04T03:10:11.152996+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 57:          - else
2024-02-04T03:10:11.152996+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 58:            = render 'shared/signin_signup', to: 'request seeds'
2024-02-04T03:10:11.152997+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 59:    
2024-02-04T03:10:11.152997+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 60:          %section.plantings
2024-02-04T03:10:11.152997+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 61:            = render 'seeds/descendants', seed: @seed
2024-02-04T03:10:11.152997+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 62:          %section.seed-photos
2024-02-04T03:10:11.152997+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 63:            - @photos.each do |photo|
2024-02-04T03:10:11.152998+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 64:              = render 'photos/hero', photo: photo
2024-02-04T03:10:11.152998+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 65:    
2024-02-04T03:10:11.153001+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 66:        .col-md-3.col-12
2024-02-04T03:10:11.153001+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 67:          = render 'seeds/owner'
2024-02-04T03:10:11.153001+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] 68:          = render @seed.crop
2024-02-04T03:10:11.153001+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51]   
2024-02-04T03:10:11.153002+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:49: syntax error, unexpected '(', expecting ')'
2024-02-04T03:10:11.153002+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:49: unknown regexp option - d
2024-02-04T03:10:11.153002+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:49: syntax error, unexpected ')', expecting '}'
2024-02-04T03:10:11.153002+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:50: syntax error, unexpected backslash, expecting '}'
2024-02-04T03:10:11.153002+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:50: unknown regexp options - dv
2024-02-04T03:10:11.153003+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:50: syntax error, unexpected backslash
2024-02-04T03:10:11.153003+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:53: syntax error, unexpected constant, expecting '}'
2024-02-04T03:10:11.153003+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:53: syntax error, unexpected constant, expecting '}'
2024-02-04T03:10:11.153003+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:54: syntax error, unexpected ')', expecting '}'
2024-02-04T03:10:11.153003+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:54: syntax error, unexpected `end', expecting '}'
2024-02-04T03:10:11.153004+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:59: syntax error, unexpected `end', expecting '}'
2024-02-04T03:10:11.153004+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/views/seeds/show.html.haml:70: syntax error, unexpected `end', expecting '}'
2024-02-04T03:10:11.153004+00:00 app[web.1]: [10452e66-befc-4a32-88a8-bf079f664c51] app/controllers/seeds_controller.rb:39:in `show'
2024-02-04T03:10:11.421893+00:00 heroku[web.1]: Process running mem=571M(110.6%)

CloCkWeRX avatar Feb 04 '24 03:02 CloCkWeRX

Confusing as we've had green builds for ages and last touch was 019d94f1cbf915aa20296a2b803054f2a16e5086

CloCkWeRX avatar Feb 04 '24 03:02 CloCkWeRX

Guess: this is something to do with the growstuff_markdown attempting to regexp stuff; as the haml template is "fine" but there are errors about regexp.

CloCkWeRX avatar Feb 04 '24 04:02 CloCkWeRX

Works locally: image

CloCkWeRX avatar Feb 04 '24 04:02 CloCkWeRX

Happy on staging https://growstuff-staging.herokuapp.com/seeds

CloCkWeRX avatar Feb 04 '24 05:02 CloCkWeRX