Closed viferga closed 2 years ago
@viferga
Interesting. I'm not sure about this. You're using a Ruby master mswin build, which typically changes daily.
Your error
D:\a\distributable-windows\distributable-windows\metacall\core\source\loaders\rb_loader\source\rb_loader_impl.c(42):
fatal error C1083: Cannot open include file: 'ruby.h': No such file or directory
is probably due to the location of the file changing from include/ruby-3.2.0+1/ruby.h
to include/ruby-3.2.0+2/ruby.h
. This was a change done in Ruby master, so I don't control it. But, the version string can be retrieved via
ruby -e "puts RbConfig::CONFIG['ruby_version']"
Anway, you should probably be using a Ruby release build, not a build of master. The purpose of ruby-loco is to allow people to test against Ruby master builds.
I may create another repo and build the current Ruby release. Also, there are two ENV settings that should be applied for Ruby to locate OpenSSL certs and config file...
Most people use builds from RubyInstaller2, but those builds are either MSYS2 mingw64 or ucrt64 builds, a mswin build isn't provided.
Well, it's fine then, I can use your trick to retrieve dynamically the version. I use your repo because it's the only portable version I've found for windows compiled with msvc. It's really helpful. Although I still like to fix versions because it simplifies problems in the long run.
If you tag by version (eventually) feel free to ping me on telegram or discord, my user is @viferga
and viferga#7874
respectively. Thanks for your time.
I created a repo for building mswin Ruby releases. See the following, which contains a build of Ruby 3.1.2:
https://github.com/MSP-Greg/ruby-mswin/releases
See the README for more information.
Hey, I am using this to build MetaCall in a portable way for Windows. I just realized that you always overwrite the same release and you rename it to master. This makes difficult to have a stable CI/CD because as versions aren't tagged, I have to modify the build script each time to update the version and it fails unexpectedly: https://github.com/metacall/distributable-windows/runs/7369013925?check_suite_focus=true
Can you create different releases for each version? This would be very helpful.
If you need the code for creating releases you can use the one I have for MetaCall: https://github.com/metacall/core/blob/fe109a5e86673d59d588bd2bc23a1cc364ee88b7/.github/workflows/release.yml#L41
It is implemented for Linux but it can be migrated easily for Windows, the tool being used is cross-platform and it is written in Go, so it is portable.
Thanks for your time.