hardpixel / mrml-ruby

Ruby wrapper for MRML, the MJML parser implementation in Rust.
MIT License
50 stars 7 forks source link

Error installing gem #2

Closed cassiompf closed 1 year ago

cassiompf commented 1 year ago

Describe the bug I'm trying to install the gem in my project and I'm getting a rust build error.

To Reproduce

  1. Install recent version of rust on windows WSL 2 and your dependencies: https://www.rust-lang.org/tools/install
  2. add gem 'mrml', '~>1.3' in your gemfile
  3. run bundle install
  4. Error: image
error[E0425]: cannot find value `RUBY_ABI_VERSION` in the crate root
  --> /home/cassio/.cargo/registry/src/github.com-1ecc6299db9ec823/rb-sys-0.9.52/src/ruby_abi_version.rs:14:73
   |
14 | pub const __RB_SYS_RUBY_ABI_VERSION: std::os::raw::c_ulonglong = crate::RUBY_ABI_VERSION as _;
   |                                                                         ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `ruby_abi_version`
...
22 |         pub extern "C" fn ruby_abi_version() -> std::os::raw::c_ulonglong {
   |         ----------------------------------------------------------------- similarly named function `ruby_abi_version` defined here

For more information about this error, try `rustc --explain E0425`.
error: could not compile `rb-sys` due to previous error
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:568: target/release/libmrml.so] Error 101

make failed, exit code 2

Expected behavior Have it compile the mrml binary to complete the gem installation

jonian commented 1 year ago

Hi @cassiompf, thanks for the report. I can reproduce this with ruby 3.2.1, on 2.7.6 the gem installs without errors.

This is an issue with rb-sys, that is a dependency of magnus, and not with mrml-ruby. I have updated rust dependencies to latest versions and released mrml v1.4.0 and the issue is fixed.

Please try installing the gem again.

cassiompf commented 1 year ago

@jonian thank you so much! now i got it installed. sorry for the delay to reply.