M1 Mac security problems on iOS platform with Homebrew ruby install

Again, my Mac M1 is balking when trying to install all the libraries etc for a new mobile project.
Does anyone with an M1 Mac have these Mac “malicious software” warnings when updating a Wappler project?

Allowing them to run anyway in Security does not solve the issue.

I use the Mac Security control to OKAY EACH “malicious software” but this will not solve.

I remove ruby and run the upgrade command again from terminal Brew window command but get the "no binary rubies available for: osx/13.1/arm64/ruby-3.0.0."

% rvm install ruby --latest
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.1/arm64/ruby-3.0.0.
Continuing with compilation. Please read ‘rvm help mount’ to get more information on binary rubies.

may take a while depending on your connection…
** % Total % Received % Xferd Average Speed Time Time Time Current**
** Dload Upload Total Spent Left Speed**
100 18.6M 100 18.6M 0 0 3314k 0 0:00:05 0:00:05 --:–:-- 3401k
Downloaded archive checksum did not match, archive was removed!
If you wish to continue with not matching download add ‘–verify-downloads 2’ after the command.

There has been an error fetching the ruby interpreter. Halting the installation.

I have tried finishing the iOS installation in the Wappler terminal for this project and from my own terminal but I am stuck

==> Pouring ruby–3.2.0.arm64_ventura.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using:
** brew postinstall ruby**
==> Summary
:beer: /opt/homebrew/Cellar/ruby/3.2.0: 16,573 files, 46.8MB
==> Running brew cleanup ruby
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).
newm1@newmacbookproconnect ~ % brew postinstall ruby
==> Postinstalling ruby
Warning: The post-install step did not complete successfully
You can try again using:
** brew postinstall ruby**
newm1@newmacbookproconnect ~ % brew postinstall ruby
==> Postinstalling ruby

But the ruby installation is halted by my Mac before it can complete running the ruby install with another popup of this –

Further explanation: When starting a new mobile project and after choosing iOS platform install I got a lot of nice confimations of things installing correctly.

Capacitor is correctly installed.

Checking Xcode installation and version…
com.apple.dt.Xcode
Xcode is correctly installed.

HOWEVER this is when I began to get RUBY install problems as reported in the above post.
These .dylib files started being rejected by my Mac

Checking Cocoapods installation and version…
dyld[76912]: Library not loaded: /opt/homebrew/Cellar/ruby/3.2.0/lib/libruby.3.2.dylib
Referenced from: /opt/homebrew/Cellar/ruby/3.2.0/bin/ruby
Reason: tried: ‘/opt/homebrew/Cellar/ruby/3.2.0/lib/libruby.3.2.dylib’ (code signature in <23E166F8-7DFD-37E4-AD9F-89643F7E9558> ‘/opt/homebrew/Cellar/ruby/3.2.0/lib/libruby.3.2.dylib’ not valid for use in process: library load disallowed by system policy), ‘/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/ruby/3.2.0/lib/libruby.3.2.dylib’ (no such file), ‘/opt/homebrew/Cellar/ruby/3.2.0/lib/libruby.3.2.dylib’ (code signature in <23E166F8-7DFD-37E4-AD9F-89643F7E9558> ‘/opt/homebrew/Cellar/ruby/3.2.0/lib/libruby.3.2.dylib’ not valid for use in process: library load disallowed by system policy), ‘/usr/local/lib/libruby.3.2.dylib’ (no such file), ‘/usr/lib/libruby.3.2.dylib’ (no such file, not in dyld cache)
Cocoapods is correctly installed.

Despite being told “Cocoapods is correctly installed.” that doesn’t comfort me when RUBY for my M1 as Wappler tried to install will not run on my Mac.

Okay, I see that RUBY installation on my Mac has been a problem for many people.

I am going to try this –

That’s not an Wappler issue.
Ruby messes around (had a similar problem a time ago with other projects, Cocoapods haven’t been updated / installed). At the end, I needed a fresh ruby install, if I remember correctly it was a permission problem for some Gems.

Well, it is a “Wappler issue” in the sense that the IOS install script in Wappler showed me these errors.

Since Mac is using Homebrew for these installation of components the successful series of downloads and installs goes well until the apparent NECESSARY install of Ruby.

I have done reinstalls & upgrades & tried different versions & checked folders and permissions and I want to reconcile the issue – only happening inside a wappler project install.

Which is why I am here in a Developer forum for Wappler users inquiring if anyone else with a M1 Mac and running the last OS might have encountered the same problem.

The files that it says do not exist in that precise path are there but I can not get Mac permissions to allow them to run.

Same topic posted by you a few days ago. And here’s the solution:

What the errors are showing seems to be a Mac Code Signature problem.

I have done EVERYTHING to reinstall, upgrade, clean up, deinstall, delete, destroy, toss my computer out the window to get Ruby install to function without error.

When I look up code signature in the repeated error, whether in the Wappler terminal view or my own terminal which is where Homebrew component updates usually happen just fine I get these “code signature” errors that cause failure to finish downloading the 3.2.o or 3.1.3 ruby versions <23E166F8-7DFD-37E4-AD9F-89643F7E9558>

Google shows me other users having my problem.

I have tried reinstalling latest gem at their site after seeing other user issues reported with ruby on my M1

No success yet.

Use the xattr command from my bug report I linked in your NodeJS topic, you may need to adjust to the location of ruby

Next, convince the Wappler team to add xattr to Wappler

Are we clear that my problem today is not with node.js?

Thank you everyone for chipping in,
I am going to try this project on my MacPro 2020 last Intel chip laptop.

Most probably you have some installations messed up, while trying to “fix” the problem, reading your previous posts.
I just created a brand new mobile project on my Mac M1 with MacOS 13.0.1 (22A400) and everything works as expected. No errors no warnings:

2 Likes

After running:


I’m experiencing the same issue on my … Apple Mac M1 MacOS 13.2 (22D49).

Then I found this site: https://nickymarino.com/2021/12/17/install-ruby-273-on-m1/

It appeared to have cleared up my issues with installing Ruby.

Then I ran the emulator and this error pops up:

Updating iOS native dependencies with pod install - failed!
:heavy_multiplication_x: update ios - failed!
[error] /opt/homebrew/bin/pod: /opt/homebrew/Cellar/cocoapods/1.11.3_1/libexec/bin/pod: /opt/homebrew/opt/ruby/bin/ruby:
bad interpreter: No such file or directory
/opt/homebrew/bin/pod: line 2: /opt/homebrew/Cellar/cocoapods/1.11.3_1/libexec/bin/pod: Undefined error: 0

Error running your project for ios!

Yes, it has to do with ruby install issue.

Here is what happens when I reopen my project after saving all, closing the project, re-opening it later.

When I check the Updater and then System Check I see errors regarding not being able to run the native build emulator.

And then the red warning. As seen below. The reason why I don’t see the ruby files warnings popping up also is because I disabled the security check with a terminal command.

Here is what I just ran in the Wappler terminal —

So far great … here’s what a Wappler System Check showed me after this procedure –

But when I save all files, close the project. Reopen the project I get this warning again. I know this must be a local machine problem.
But it means that Wappler health check is giving a false reading on the full installation of my iOS.

My attempt this morning:

“ruby” can’t be opened because Apple cannot check it for malicious software. a frequent repeated note on every attempt.

Seems the post install of ruby fails as the messages indicate you can try to open a separate Mac terminal and as suggested execute yourself:

brew postinstall Ruby

I have been down that postinstall route, too.

NO WORKY on M1.

M1 Security only wants the Ruby version that is already installed as part of the usual osx install.

There is a way to install other versions of Ruby but they must exist assigned to one particular application. The Wappler script is trying to install Ruby into a protected global level update that is not tolerated on the M1. Not even a sudo terminal command works.

I could terminal a command to shutdown the security check to prevent warning pop ups on ruby executables but, of course, that did not address the “root cause”.

As I have posted today I had to abandon the M1 machine and put this all on my MacPro pre-M1 Intel core machine, where I could finally get a mobile app project using node, capacitor, iOS working.

This is pretty much identical to my own fails on my M1 Mac Desktop.

There seems to be some issues with the latest Ruby and Apple Quarantine.

To solve all homebrew Mac with Arm64 M1/M2 quarantine problems, open a terminal and run:

sudo xattr -rd com.apple.quarantine /opt/homebrew/Cellar

This will remove all quarantine warnings from the homebrew packages as those are safe to use.

2 Likes