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

Update Ruby version #12

Closed
transcental opened this issue Jan 5, 2022 · 7 comments
Closed

Update Ruby version #12

transcental opened this issue Jan 5, 2022 · 7 comments

Comments

@transcental
Copy link

transcental commented Jan 5, 2022

I've been porting a ruby application over to macOS using this app. However, the version of Ruby is too old. Please could you update it to 3.0? I've tried to do this manually, but I don't know how to modify the UNIX executable called Ruby in the macOS folder.

@jlnr
Copy link
Member

jlnr commented Jan 5, 2022 via email

@jlnr
Copy link
Member

jlnr commented Jan 7, 2022

Oops, that was more than two hours. Updating Ruby to version 3.0 worked. The problem is that not only does the openssl gem have a non-portable dependency on my homebrew folder (#8), but yaml and even gosu now reference homebrew dylibs. So the result won't be useful for pretty much anything.

You've said you are trying to port a Ruby application. Is it a Gosu game or something else? Have you tried http://foobarwidget.github.io/traveling-ruby/?

Another thing that I could try to look at for inspiration is https://github.com/Homebrew/homebrew-portable-ruby.

@jlnr
Copy link
Member

jlnr commented Jan 7, 2022

I'll try to fix Gosu specifically here gosu/gosu#607

OpenSSL and YAML will remain broken, and I also had to give up texplay and ashton because they won't build anymore.

@transcental
Copy link
Author

transcental commented Jan 7, 2022

The game I'm trying to port is a Gosu game (Flaptus/Flaptus#1). Thanks for the Travelling Ruby link, I've not seen that in my research and I'll give it a go.

EDIT: Travelling Ruby also has the same problem of an older Ruby version (2.4)

I won't be able to help with the referencing of homebrew dylibs, sorry as I have no Ruby knowledge other than running files.

@jlnr
Copy link
Member

jlnr commented Jan 21, 2022

I've fixed the most important bug. Not sure when I'll have time to retry building the app.

Flaptus seems to use some networking code. Unless it uses unencrypted HTTP, which is on the verge of dying out, I don't think it'll work on macOS because I haven't managed to properly bundle OpenSSL into Ruby.app.

@jlnr
Copy link
Member

jlnr commented Jan 23, 2022

Hrm, it almost works, but now there is a new dependency on libgmp.

All of these problems have been solved by the Homebrew team, and I think I (or anyone who has time for this) should try to bundle their Ruby instead of building our own version:

https://github.com/Homebrew/homebrew-portable-ruby/releases

I'll give up for now, sorry.

@jlnr jlnr closed this as completed Jan 23, 2022
@jlnr
Copy link
Member

jlnr commented Jan 23, 2022

If I'll give up on giving up in the future, things will continue here: #13 - feel free to subscribe.

Note that currently the portable Ruby I want to use is stuck on v2.6.8, so this won't help you if you want to run code that requires Ruby 3.

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

2 participants