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

Ruby code in yaml comment breaks example deploy.yml #1304

Open
harryvederci opened this issue Dec 17, 2024 · 4 comments
Open

Ruby code in yaml comment breaks example deploy.yml #1304

harryvederci opened this issue Dec 17, 2024 · 4 comments

Comments

@harryvederci
Copy link

deploy.yml file section:

# Configure builder setup.
builder:
  arch: amd64
  # Pass in additional build args needed for your Dockerfile.
  # args:
  #   RUBY_VERSION: <%= File.read('.ruby-version').strip %>

When I run kamal deploy:

  Finished all in 0.0 seconds
  ERROR (Errno::ENOENT): No such file or directory @ rb_sysopen - .ruby-version

When I remove the commented out lines, the issue goes away.

@harryvederci
Copy link
Author

The issue is in the <%= ... =>

I don't have a .ruby-version file, so the default config file errors by default for me.

Easily solved by removing it, but I guess a non-ruby dev could try kamal, see it crash, and move on.

Possible solutions:

  • only execute ruby code outside of yml comments
  • remove/alter the .ruby-version example

@harryvederci harryvederci changed the title commented out builder -> args not ignored in deploy.yml Ruby code in yaml comment in builder -> args not ignored in example deploy.yml Dec 17, 2024
@harryvederci harryvederci changed the title Ruby code in yaml comment in builder -> args not ignored in example deploy.yml Ruby code in yaml comment breaks example deploy.yml Dec 17, 2024
@shiny
Copy link

shiny commented Dec 17, 2024

Encounter the same probleam, thanks a lot!

@julienanne
Copy link

Same here ;) Thanks, save my day.

@JangoCG
Copy link

JangoCG commented Jan 6, 2025

Thank you! Saved me the headache

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

4 participants