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
Cannot initialize ruby plugin: failed to load ruby library after update to Big Sur #1742
Comments
The Ruby plugin only looks for the Ruby library in the following two places on macOS, so updating your system-wide Ruby alone wouldn't be enough: Lines 330 to 331 in a723249
Can you upload your stderr.log file? |
Seems libruby.dylib is missing... but why |
Does This particularly library is also pretty old, and there's a chance it doesn't work on macOS 11, but I would expect a different message other than |
Disregard my comment about Does |
It does, but I did some digging around, turns out the symlink(alias) is broken between ...Ruby.framework/Ruby and the actual ruby install within the Versions folder. So dfhack worked in pointing out there was a problem with ruby. Any idea as to how I can go about fixing this? |
Interesting - that's similar to #1613, but there wasn't a broken symlink issue there. If you want to try out the Ruby build I've been working on for #1718, you can get a recent version from https://github.com/lethosor/ruby-build/actions/runs/447673168 (direct link to macOS download). Ruby scripts themselves will have issues without additional updates to the plugin itself, but it would be useful to me to know if this at least loads on macOS 11 successfully, and if simple scripts like |
Ok, so the macOS |
Oh, that error is expected if you run startdwarf without specifying a number above 7. The fact that it shows up every time you run a Ruby script after triggering that error is one of the bugs I was referring to that requires updates to the Ruby plugin. Good to know that the library works for you, though! I plan to put out a wider call for testing a Ruby upgrade for a future release. |
@lethosor Hey I have this exact same problem and this is the only thread on the entire internet that identifies it. I tried to download your Ruby build but the link is broken. Help me please. |
Were you logged in to GitHub when you clicked on the link? You'll get a 404 if you're logged out, but it still works for me when I'm logged in. |
Ah thanks it works now! |
@lethosor hi, thanks for your work! I have the same issue, but putting libruby-2-7-2.dylib into the /hack folder does nothing. |
Did you rename it to |
I'm on macOS Big Sur and after renaming to |
For those who are late to the party (the artifacts from #1742 (comment) unfortunately appear to have expired): this prebuilt Ruby 2.7.3 binary from rubies.travis-ci.org seems to be working for me on 11.2:
Just put the |
Sorry about that. A status update from #1718: currently, Ruby 2.7 has problems on Windows, and I have very limited bandwidth to troubleshoot those problems, so that is preventing us from moving to Ruby 2.7 across all platforms (which I would strongly prefer over the current setup). Unfortunately I don't have any estimate as to when these issues will be resolved. |
Thanks for all the help you've been providing in this thread. I'm a new Mac user and am having the same issue as OP, however I can't download those Ruby files because it appears the link has expired. Any chance you could post a fresh link? Thank you! |
@pvtvega unfortunately I cannot, due to #1742 (comment). A change in the GitHub Actions environment (possibly an autotools upgrade) has broken the macOS build between December and now. The instructions from #1742 (comment) might help you, though - specifically a Ruby 2.7 (not 3.0) build for a relatively recent macOS version should work. |
I appreciate the quick reply, I’m replying by email so hopefully this makes it to you (I’m new to GitHub). I’ve successfully got the game to launch and properly load graphics now, but worldgen seems totally broken. I cannot get the world to generate past about the 15 year mark. But I suppose that would be an issue for a different forum. Oh well!
… On May 9, 2021, at 16:46, Alan ***@***.***> wrote:
@pvtvega <https://github.com/pvtvega> unfortunately I cannot, due to #1742 (comment) <#1742 (comment)>. A change in the GitHub Actions environment (possibly an autotools upgrade) has broken the macOS build between December and now.
The instructions from #1742 (comment) <#1742 (comment)> might help you, though - specifically a Ruby 2.7 (not 3.0) build for a relatively recent macOS version should work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1742 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUAIZSGCGBDUJR5Z6H2VK6LTM3YCZANCNFSM4VRSXIMA>.
|
If you're running on an ARM machine, it could be an issue like https://www.bay12games.com/dwarves/mantisbt/view.php?id=11734 (unclear to me how widespread the issue is) |
~~ I tried to download your Ruby build but it says its expired. Is there a newer version to try?~~ re-read you comment above and downloaded the 2.7 version to the hack directory and renamed it. working now. :D Oh had to go to Prefs>>Security and unlock, Allow the lib there and run the command you mentioned: xattr -d com.apple.quarantine hack/libruby.dylib |
If your error didn't have anything to do with Ruby, this is definitely not the right place. I would recommend bringing it up in the Lazy Mac Pack thread. |
For visibility: our current plan is to remove Ruby support because of issues like this being too difficult and time-consuming to address, and because Ruby doesn't play very well as an embedded language. See #2081 for more details. |
Total noob. Trying to play DF for the first time on my M1 Macbook Air and I wanted the Isometric view with Stone Sense. Setting my "Print Mode" in Lazy Mac Pack to "2D" gives me this error too. And my DF screen also turns blank I ran the command "brew install ruby" but that didn't solve it |
The print mode setting has nothing to do with this issue, and this issue isn't related to stonesense. As for homebrew, it probably installs ruby somewhere that DFHack isn't looking. For stonesense problems, please open a new issue. |
Thanks for your help guys! |
After updating to MacOS 11.1, I got this error: "Cannot initialize ruby plugin: failed to load ruby library". Game still runs tho. I updated ruby to 2.7.2p137 using rbenv... problem persists. My next course of action is to try and build from source, never done that before.
The text was updated successfully, but these errors were encountered: