Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid yield in layout.erb #121

Closed
bechtle-simon-mueller opened this issue Aug 20, 2021 · 3 comments
Closed

Invalid yield in layout.erb #121

bechtle-simon-mueller opened this issue Aug 20, 2021 · 3 comments

Comments

@bechtle-simon-mueller
Copy link

I cannot access the dashboard. In the browser it says: internal server error

Expected Behavior

Dashboard shows

Current Behavior

Dashboard doesn't show

Steps to Reproduce (for bugs)

  1. start docker container
  2. navigate your browser to the url

Your Environment

latest docker image from here

Details from docker container logs dashing

2021-08-20 14:14:20 - SyntaxError - /usr/share/dashing-icinga2/dashboards/layout.erb:26: Invalid yield:
        /usr/share/dashing-icinga2/dashboards/layout.erb
@mocdaniel
Copy link
Owner

mocdaniel commented Aug 20, 2021

I just confirmed this error and noticed that this yield-thing caused trouble in older versions of dashing-icinga2 already, but didn't break the dashboard. For some reason, thin redirects requests to / to /layout in this container's version instead of rendering the actual dashboard - a fix will be available soon.

@mocdaniel
Copy link
Owner

mocdaniel commented Aug 20, 2021

Fixed in 5ed16c9, dbodky/dashing-icinga2:latest over on DockerHub should work again as well.

Long story short: Dockerfile used ruby:buster as base image and thus something like ruby:buster:latest implicitly. Ruby 3.X and the gems coming with it broke the templating language used in template.erb, apparently (I am no ruby specialist :D). I pinned the ruby version to use to 2.7.X by changing the base image to ruby:2.7-buster for now. I'm going to go ahead and close this issue for now.

@srgzx
Copy link

srgzx commented Nov 22, 2022

Hi, I know this is a long shot, but I am working on a project that uses Sinatra and Thin that has this exact same problem, and I am attempting to learn what's causing it and how to make it compatible with Ruby 3.x. I am not a Ruby specialist either, unfortunately. If you or anyone else can remember exactly what is going on here, or can suggest how to fix it other than downgrading to Ruby 2.7, I would appreciate it. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants