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

issue with 2.0.2 #333

Open
igorkasyanchuk opened this issue Dec 29, 2024 · 9 comments
Open

issue with 2.0.2 #333

igorkasyanchuk opened this issue Dec 29, 2024 · 9 comments

Comments

@igorkasyanchuk
Copy link

Hello, when I start rails s I have a crash

image

with version 2.0.1 everything works fine.

Ruby 3.3.6 and Rails 8.0.1.

@gjtorikian
Copy link
Owner

What operating system ?

And, was this installed through gem or bundler? Can you copy paste the logs for when you install 2.0.2?

Probably something in the gem did not get packaged correctly. But I can’t imagine what.

@igorkasyanchuk
Copy link
Author

Using bundle. Added to my Gemfile

@gjtorikian
Copy link
Owner

And OS?

@kivikakk
Copy link
Collaborator

kivikakk commented Dec 30, 2024

Decided to have a look into this since I think we might see more reports of this soon. I'm on arm64-darwin and Ruby 3.3.x, same as the reporter. Tried a plain gem install commonmarker -v 2.0.2:

$ gem install commonmarker -v 2.0.2
Fetching commonmarker-2.0.2-arm64-darwin.gem
Successfully installed commonmarker-2.0.2-arm64-darwin
Parsing documentation for commonmarker-2.0.2-arm64-darwin
Installing ri documentation for commonmarker-2.0.2-arm64-darwin
Done installing documentation for commonmarker after 0 seconds
1 gem installed

A new release of RubyGems is available: 3.5.22 → 3.6.2!
Run `gem update --system 3.6.2` to update your installation.

$ irb -rcommonmarker
/Users/kivikakk/.gem/ruby/3.3.0/gems/irb-1.14.0/lib/irb/init.rb:471: warning: LoadError: cannot load such file -- commonmarker/commonmarker
irb(main):001>
$ ls ~/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/*
/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/config.rb
/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/constants.rb
/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/extension.rb
/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/node.rb
/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/renderer.rb
/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/utils.rb
/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/version.rb

/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/3.2:
commonmarker.bundle

/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/3.4:
commonmarker.bundle

/Users/kivikakk/.gem/ruby/3.3.0/gems/commonmarker-2.0.2-arm64-darwin/lib/commonmarker/node:
ast.rb  inspect.rb

Same on 3.4.0preview2, with same extracted tree and error, but that may be because it's the preview (what I have in my current Nixpkgs pin) and it seems to use 3.4.0+0 as the ABI thingy; I suspect (and will confirm) that a released 3.4 will work fine.

Works on Ruby 3.2.5 without any issues, so I'm guessing it's the lack of 3.3 build in the gem that's causing OP's issue.

edit: confirmed works fine on 3.4.1.

@gjtorikian
Copy link
Owner

That’s really strange. Nothing about the build system changed that should have affected the packaging; doubly weird that it’s only 3.3.

@gjtorikian
Copy link
Owner

gjtorikian commented Dec 30, 2024

The only clue I could find is this reference to rake-compiler-dock (which was upgraded to support Ruby 3.4): https://github.com/rake-compiler/rake-compiler-dock/blob/cc37afbe112d14ccacec6bf7b4d78852cfc74aba/History.md?plain=1#L35

But even still, it looks like OP is using 3.3.6. Edit: ah, but this refers to the Ruby version on the docker image building the gem. So yeah this might actually need to change: https://github.com/oxidize-rb/rb-sys/blob/5d1999ba70d301581524b8252c8ff3b8a825afa2/docker/Dockerfile.arm64-darwin#L3

@kivikakk
Copy link
Collaborator

Ah, yep, might need to be 3.3.5!

@jagthedrummer
Copy link

I just ran into this problem in CI on GitHub Actions. You can see a failed run here: https://github.com/bullet-train-co/bullet_train-core/actions/runs/12549241610/job/34989960868

We're running Ruby 3.3.6.

There's the complaint about cannot load such file -- commonmarker/commonmarker which is caused by a previous cannot load such file -- /home/runner/work/bullet_train-core/bullet_train-core/tmp/starter/vendor/bundle/ruby/3.3.0/gems/commonmarker-2.0.2-x86_64-linux/lib/commonmarker/3.3/commonmarker.

It looks like this fallback line doesn't work as intended:

require "commonmarker/commonmarker"

@gjtorikian
Copy link
Owner

Yep. There’s already a PR open upstream for the fix.

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