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

Error: undefined method 'mapping' for YAML:Module #59

Open
szabgab opened this issue May 25, 2021 · 5 comments
Open

Error: undefined method 'mapping' for YAML:Module #59

szabgab opened this issue May 25, 2021 · 5 comments

Comments

@szabgab
Copy link
Contributor

szabgab commented May 25, 2021

This is my code for now:

$ cat src/sentry.cr 
require "sentry"

This is the error I get:

$ crystal run src/sentry.cr 
Showing last frame. Use --error-trace for full trace.

In lib/sentry/src/sentry.cr:12:10

 12 | YAML.mapping(
           ^------
Error: undefined method 'mapping' for YAML:Module

This is Crystal:

$ crystal --version

Crystal 1.0.0 [dd40a2442] (2021-03-22)

LLVM: 10.0.0
Default target: x86_64-unknown-linux-gnu

Running on Ubuntu 21.04

@straight-shoota
Copy link

The sentry version you're using is not compatible with Crystal 1.0.

It looks like this should be fixed in the master branch, but there has not been a sentry release in over a year.

@szabgab
Copy link
Contributor Author

szabgab commented May 25, 2021

👍

@samueleaton
Copy link
Owner

works for me on latest crystal version. is this just me needing to republish a new release? Just did a new release.

@straight-shoota
Copy link

Yes, that should fix it. The updated code was just not released yet.

@szabgab
Copy link
Contributor Author

szabgab commented May 25, 2021

Thanks, it works now.

There is one more thing though, The shards.yml file has crystal: 0.34.0 which means we need to use --ignore-crystal-version I think it would be better to have crystal: >= 0.34.0

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