Sample Header Ad - 728x90

Ask Different (Apple)

Q&A for power users of Apple hardware and software

Latest Questions

25 votes
2 answers
11711 views
Which version(s) of Mac OS X have Ruby installed by default?
I'm thinking about using Ruby to write an installation script, but I'm not sure if all major versions of Mac OS X install it by default. Which version(s) of Mac OS X have the Ruby interpreter installed by default?
I'm thinking about using Ruby to write an installation script, but I'm not sure if all major versions of Mac OS X install it by default. Which version(s) of Mac OS X have the Ruby interpreter installed by default?
Kurt Liu (353 rep)
Oct 31, 2013, 10:46 PM • Last activity: Sep 17, 2024, 03:50 AM
2 votes
1 answers
1136 views
Installing Cocoapods on an M1 Mac with latest ventura fails miserably
I have tried everything to install cocopods on a M1 mac. When I do a `brew install cocoapods` it apparently goes without a problem but when I try to issue `pod install` I see > pod install zsh: command not found: pod They I tried to install `sudo gem instal ffi` I see this error Ignoring bigdecimal-...
I have tried everything to install cocopods on a M1 mac. When I do a brew install cocoapods it apparently goes without a problem but when I try to issue pod install I see > pod install zsh: command not found: pod They I tried to install sudo gem instal ffi I see this error Ignoring bigdecimal-1.4.4 because its extensions are not built. Try: gem pristine bigdecimal --version 1.4.4 Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5 Ignoring io-console-0.4.8 because its extensions are not built. Try: gem pristine io-console --version 0.4.8 Ignoring json-2.2.0 because its extensions are not built. Try: gem pristine json --version 2.2.0 Ignoring nokogiri-1.10.5 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.5 Ignoring sqlite3-1.4.1 because its extensions are not built. Try: gem pristine sqlite3 --version 1.4.1 Ignoring strscan-1.0.3 because its extensions are not built. Try: gem pristine strscan --version 1.0.3 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle' (no such file), '/Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) - /Library/Ruby/Gems/2.6.0/gems/strscan-1.0.3/lib/strscan.bundle (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych/scalar_scanner.rb:2:in `' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych/nodes/node.rb:4:in `' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych/nodes.rb:2:in `' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:19:in `' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/yaml.rb:4:in `' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:701:in `load_yaml' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/config_file.rb:346:in `load_file' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/config_file.rb:198:in `initialize' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/gem_runner.rb:79:in `new' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/gem_runner.rb:79:in `do_configuration' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/gem_runner.rb:44:in `run' from /usr/bin/gem:21:in `' I have tried this with the terminal running using and not using rosetta. No difference. I also see a lot of errors like > : warning: It seems your ruby installation is missing psych (for YAML output). Even after reinstalling yaml I have tried numerous guides to install cocoapods. None work. How do I solve this?
Duck (2572 rep)
Aug 31, 2023, 03:31 PM • Last activity: Mar 4, 2024, 04:05 AM
0 votes
0 answers
312 views
Two versions of ruby installed
It seems like I have two versions of ruby installed. (3.3.0 and 2.6.10.210) How to fix that? ``` peter@mac ios % sudo gem update --system Password: Updating rubygems-update Fetching rubygems-update-3.5.6.gem ERROR: Error installing rubygems-update: There are no versions of rubygems-update (= 3.5.6)...
It seems like I have two versions of ruby installed. (3.3.0 and 2.6.10.210) How to fix that? ``` peter@mac ios % sudo gem update --system Password: Updating rubygems-update Fetching rubygems-update-3.5.6.gem ERROR: Error installing rubygems-update: There are no versions of rubygems-update (= 3.5.6) compatible with your Ruby & RubyGems rubygems-update requires Ruby version >= 3.0.0. The current ruby version is 2.6.10.210. ERROR: While executing gem ... (NoMethodError) undefined method `version' for nil:NilClass peter@mac ios % brew install ruby ==> Downloading https://formulae.brew.sh/api/formula.jws.json ################################################################################################################################################################################################################################# 100.0% ==> Downloading https://formulae.brew.sh/api/cask.jws.json ################################################################################################################################################################################################################################# 100.0% Warning: ruby 3.3.0 is already installed and up-to-date. To reinstall 3.3.0, run: brew reinstall ruby peter@mac ios % brew install rubygems-update Warning: No available formula with the name "rubygems-update". ==> Searching for similarly named formulae and casks... Error: No formulae or casks found for rubygems-update. peter@mac ios % brew install rubygems Warning: No available formula with the name "rubygems". Did you mean rubyfmt? macOS provides gem as part of Ruby. To install a newer version: brew install ruby peter@mac ios % brew upgrade ruby Warning: ruby 3.3.0 already installed peter@mac ios %
Grim (123 rep)
Feb 29, 2024, 06:58 PM
1 votes
1 answers
335 views
Installing Homebrew on Snow Leopard (10.6.8)? (-Curl is outdated.)
I'm using a machine that needs to remain at OS X 10.6.8 for the time being. Trying to install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" But I get the following error: curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 a...
I'm using a machine that needs to remain at OS X 10.6.8 for the time being. Trying to install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) " But I get the following error: curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version Based on other posts, I'm pretty sure this is because the version of Curl I have is too old/outdated (7.19.7). - How can I update Curl to get it working? - Alternatively, how can I get Homebrew installed without using Curl? *-Thanks for any help/info.!*
GhostsonAcid (31 rep)
Oct 23, 2023, 07:58 PM • Last activity: Oct 25, 2023, 06:47 AM
1 votes
0 answers
273 views
Processes are randomly killed
Ever since I've upgraded to Ventura the processes are randomly terminating with Killed 9 signal. For example: I am trying to install a new version of ruby using `rbenv install 3.2.2` and am seeing killed 9 signal being sen (see below) ``` opt/homebrew/opt/postgresql@11/include -I/opt/homebrew/opt/li...
Ever since I've upgraded to Ventura the processes are randomly terminating with Killed 9 signal. For example: I am trying to install a new version of ruby using rbenv install 3.2.2 and am seeing killed 9 signal being sen (see below)
opt/homebrew/opt/postgresql@11/include -I/opt/homebrew/opt/libffi/include -MMD -MF crypto/seed/libcrypto-shlib-seed_cbc.d.tmp -MT crypto/seed/libcrypto-shlib-seed_cbc.o -c -o crypto/seed/libcrypto-shlib-seed_cbc.o crypto/seed/seed_cbc.c
make: *** [crypto/seed/libcrypto-shlib-seed.o] Killed: 9
make: *** Waiting for unfinished jobs....
clang: error: unable to execute command: Killed: 9
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
make: *** [crypto/seed/libcrypto-shlib-seed_cbc.o] Killed: 9
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/sh/01k8dfc529q8srsbj35rnbr40000gp/T/rsa_x931-fd450d.c
clang: note: diagnostic msg: /var/folders/sh/01k8dfc529q8srsbj35rnbr40000gp/T/rsa_x931-fd450d.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/zlatansadibasic/Library/Logs/DiagnosticReports/clang__.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg: 

********************
make: *** [crypto/rsa/libcrypto-shlib-rsa_x931.o] Error 254
make: *** [build_sw] Error 2
However this is not specific to using rbenv command or installing ruby. Every so often I get killed 9 signal being sent to some of the git commands when they are run in iterm2 as well.
Zlatan Sadibasic (11 rep)
May 15, 2023, 09:43 PM • Last activity: May 15, 2023, 09:53 PM
0 votes
0 answers
136 views
irb does not use my .irbrc
On my MacOS, I have the default ruby, but for certain development task, I also have installed ruby 2.4.2 via rvm. When I explicitly invoke /usr/bin/irb my ~/.irbrc is processed (I verified it by putting a `puts :processing` at top of this file). When I use the irb which rvm puts into my PATH (i.e. i...
On my MacOS, I have the default ruby, but for certain development task, I also have installed ruby 2.4.2 via rvm. When I explicitly invoke /usr/bin/irb my ~/.irbrc is processed (I verified it by putting a puts :processing at top of this file). When I use the irb which rvm puts into my PATH (i.e. in my case /Users/MYNAME/.rvm/rubies/ruby-2.4.2/bin/irb, the ~/.irbrc is not processed. I also tried to explicitly do a export IRBRC=$HOME/.irbrc but this also did not help. What could be the reason? BTW, in case it matters: I'm using zsh as interactive shell.
user1934428 (1458 rep)
May 15, 2023, 07:34 AM • Last activity: May 15, 2023, 03:09 PM
1 votes
1 answers
1232 views
homebrew stopped working after MacOS update
I updated my MacBook Pro to Monterey (version 12.6.4). Now when I enter any `brew` command on the command line, I get an exception: /usr/local/Homebrew/Library/Homebrew/version.rb:366:in `initialize': Version value must be a string; got a NilClass () (TypeError) from /usr/local/Homebrew/Library/Home...
I updated my MacBook Pro to Monterey (version 12.6.4). Now when I enter any brew command on the command line, I get an exception: /usr/local/Homebrew/Library/Homebrew/version.rb:366:in `initialize': Version value must be a string; got a NilClass () (TypeError) from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:23:in `initialize' from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:18:in `new' from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:18:in `version' from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:52:in `prerelease?' from /usr/local/Homebrew/Library/Homebrew/os.rb:19:in `' from /usr/local/Homebrew/Library/Homebrew/os.rb:1:in `' from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/Homebrew/Library/Homebrew/global.rb:26:in `' from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in `require_relative' from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in `' My ruby --version says _ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin21]_ I also tried the brew command by setting a Ruby 2.4.2 in front of the PATH search order, but same effect. Digging into the code (os.rb), I found the definition of the constant ::OS_VERSION = ENV["HOMEBREW_OS_VERSION"] and I don't have defined this environment variable, neither do I have defined HOMEBREW_OSX_VERSION. I think this could explain the NilClass exception, but I am not aware that I ever had this environment variable, and brew worked fine before. Any idea of what is going on? UPDATE: I also tried the suggestion on the homebrew page , i.e. doing a git clean -f in /usr/local/Homebrew/Library/Contributions/examples, but there is no Contributions directory, and a clean in the Homebrew base directory did not help either.
user1934428 (1458 rep)
Apr 11, 2023, 03:26 PM • Last activity: Apr 14, 2023, 01:23 PM
0 votes
2 answers
1063 views
Do I need to reinstall my OS due to Ruby?
After trying to upgrade my flutter apps dependencies failed, I've seen a command in the call stack and tried to run it. Now I think I screwed up my local ruby installation with my workarounds. I would like to know if I could retrace my steps to get the original ruby setup without my workarounds, wit...
After trying to upgrade my flutter apps dependencies failed, I've seen a command in the call stack and tried to run it. Now I think I screwed up my local ruby installation with my workarounds. I would like to know if I could retrace my steps to get the original ruby setup without my workarounds, without reinstalling the OS or is it fine the way it is? Possible important information: - Ventura: 13.0 - XCode: 14.01 Here is a summary of what I've done: It was: sudo gem pristine ffi --version 1.15.5, but instead of fixing stuff it broken even more. Some things were missing and I tried to get back to it's original state. I've found [this](https://stackoverflow.com/a/5227550/6629386) answer. Now I tried to reinstall cocoapods which was apperantly broken by running: sudo gem install cocoapods. Didn't work out because of some missing ruby/config.h headers apperantly. After researching I once again found an [answer](https://stackoverflow.com/a/65481787/6629386) : - 1. I ran: cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby - 2. There I created the systemlink: sudo ln -sf ../../../../Headers/ruby/config.h - 3. Afterwards I navigated one folder up: cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 - 4. And here I needed to do something *different* from the original answer: I needed to run: sudo ln -sf universal-darwin21 universal-darwin22 I've also installed the xcode cli 14.2 beta thing, but that didn't help either. Now the App I tried to upgrade is broken, but a different one seems to work, so I think not everything is broken on the system, at least I hope so.
Flajt (1 rep)
Oct 25, 2022, 10:38 PM • Last activity: Feb 24, 2023, 11:17 AM
1 votes
1 answers
63 views
libgd vs rubygem local-fastimage_resize on M1
This works on x86 mac but fails an M1 mac. ``` $ brew install pkg-config libgd $ gem install local-fastimage_resize ``` I suspect it might be something with libgd packaging on M1. But could be something else as well. I don't have an M1 mac so I can't debug it. I was hoping that somebody with M1 and...
This works on x86 mac but fails an M1 mac.
$ brew install pkg-config libgd
$ gem install local-fastimage_resize
I suspect it might be something with libgd packaging on M1. But could be something else as well. I don't have an M1 mac so I can't debug it. I was hoping that somebody with M1 and necessary knowledge can help with this? Some log Follows. (gem_make.out)
current directory: /Users/user/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/local-fastimage_resize-3.4.0/ext/fastimage_native_resize
/Users/user/.asdf/installs/ruby/2.6.8/bin/ruby -I /Users/user/.asdf/installs/ruby/2.6.8/lib/ruby/2.6.0 -r ./siteconf20220923-95236-1gspepr.rb extconf.rb --with-gdlib\=/opt/homebrew/Cellar/gd/2.3.3_3
checking for -l/opt/homebrew/Cellar/gd/2.3.3_3... no
missing libgd
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/user/.asdf/installs/ruby/2.6.8/bin/$(RUBY_BASE_NAME)
	--with-gdlib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/user/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/extensions/arm64-darwin-21/2.6.0/local-fastimage_resize-3.4.0/mkmf.log

extconf failed, exit code 1
(mkmf.log)
have_library: checking for -l/opt/homebrew/Cellar/gd/2.3.3_3... -------------------- no

"clang -o conftest -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0/arm64-darwin21 -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0/ruby/backward -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0 -I. -I/Users/user/.asdf/installs/ruby/2.6.8/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens  -fno-common -pipe conftest.c  -L. -L/Users/user/.asdf/installs/ruby/2.6.8/lib -L. -L/Users/user/.asdf/installs/ruby/2.6.8/lib  -fstack-protector-strong     -lruby.2.6   "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"clang -o conftest -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0/arm64-darwin21 -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0/ruby/backward -I/Users/user/.asdf/installs/ruby/2.6.8/include/ruby-2.6.0 -I. -I/Users/user/.asdf/installs/ruby/2.6.8/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens  -fno-common -pipe conftest.c  -L. -L/Users/user/.asdf/installs/ruby/2.6.8/lib -L. -L/Users/user/.asdf/installs/ruby/2.6.8/lib  -fstack-protector-strong     -lruby.2.6 -l/opt/homebrew/Cellar/gd/2.3.3_3   "
ld: library not found for -l/opt/homebrew/Cellar/gd/2.3.3_3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d", (*tp)());
10:   }
11: 
12:   return 0;
13: }
14: 
15: int t(void) { ; return 0; }
/* end */

--------------------
akostadinov (111 rep)
Dec 20, 2022, 12:30 AM • Last activity: Jan 10, 2023, 10:52 AM
0 votes
1 answers
621 views
Homebrew "`split': invalid byte sequence in UTF-8 (ArgumentError)"
I tried to install ```asitop``` through ```brew``` but it doesn't exist (yet) as a package (see comments). The tentative installation triggered an update of the existing ```brew``` packages. From then on, each time I invoke a ```brew``` command I get the following (even when issuing a ```brew doctor...
I tried to install
through
but it doesn't exist (yet) as a package (see comments). The tentative installation triggered an update of the existing
packages. From then on, each time I invoke a
command I get the following (even when issuing a
doctor
command): /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `split': invalid byte sequence in UTF-8 (ArgumentError) from /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `block in parse' from /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `each' from /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `flat_map' from /usr/local/Homebrew/Library/Homebrew/PATH.rb:93:in `parse' from /usr/local/Homebrew/Library/Homebrew/PATH.rb:25:in `initialize' from /usr/local/Homebrew/Library/Homebrew/global.rb:124:in `new' from /usr/local/Homebrew/Library/Homebrew/global.rb:124:in `' from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in `require_relative' from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in `'
$PATH
renders the following: ?/usr/libexec:/Users/profilename/.gem/ruby/2.6.0/bin:/Users/profilename/Library/Python/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:~/.gem/ruby/2.6.0/bin:/usr/local/opt/ruby/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin I stumbled on this stackoverflow thread , but unfortunately I failed to generalise the solution to my case. Kindly note that I have
installed (see this thread for installation procedure). Can someone please help me to solve this problem?
pdeli (695 rep)
Aug 25, 2022, 12:05 PM • Last activity: Aug 26, 2022, 12:44 PM
0 votes
1 answers
297 views
Why does Apple ship with ruby?
Are there system processes that require ruby? Installing gems using the local ruby will generally ask for permissions and most scripts today ask for a newer version of ruby. Apple has historically removed built in interpreters and stated it will remove php, ruby, and perl. Yet has only removed php....
Are there system processes that require ruby? Installing gems using the local ruby will generally ask for permissions and most scripts today ask for a newer version of ruby. Apple has historically removed built in interpreters and stated it will remove php, ruby, and perl. Yet has only removed php. As of macOS 12.4, what still uses ruby? Macos Catalina Release Notes
Michael Ozeryansky (433 rep)
Jul 3, 2022, 07:46 PM • Last activity: Jul 5, 2022, 09:32 AM
1 votes
3 answers
8061 views
Ruby 2.0.0 fails to install because of openssl
I can't install ruby from source, on configuration (*./configure*) it states Ignore OpenSSL broken by Apple. Please use another openssl. (e.g. using `configure --with-openssl-dir=/path/to/openssl') Failed to configure openssl. It will not be installed. Even if I use the told parameter. *--with-opt-d...
I can't install ruby from source, on configuration (*./configure*) it states Ignore OpenSSL broken by Apple. Please use another openssl. (e.g. using `configure --with-openssl-dir=/path/to/openssl') Failed to configure openssl. It will not be installed. Even if I use the told parameter. *--with-opt-dir=/usr/local* doesn't help either. Notice, I installed the latest openssl (1.0.1e) from source too (it's located at /usr/local/ssh). So later I can't use *gem install*, it just states: ERROR: Loading command: install (LoadError) cannot load such file -- openssl ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass How can I tell the ruby installation to take my installed openssl?
Appleshell (292 rep)
Feb 27, 2013, 10:12 PM • Last activity: Jun 24, 2022, 10:02 AM
0 votes
0 answers
523 views
My m1 Mac throws a error When I update Podfile
When I want to update my Podfile in my Xcode iOS project, the Terminal throw a error like this: ``` Updating local specs repositories /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/ff...
When I want to update my Podfile in my Xcode iOS project, the Terminal throw a error like this:
Updating local specs repositories /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/ffi_c.bundle' (no such file) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle (LoadError)
is the ruby environmental dose not for my m1 Mac? How can I solve this problem?anybody can help me?
Matrix (11 rep)
Mar 4, 2022, 05:07 PM • Last activity: Mar 20, 2022, 06:22 PM
0 votes
1 answers
133 views
Jemalloc Symbolication No Suitable Image Found Error
I'm working with a custom built Ruby, compiled and built on a Mac OS command line with standard XCode command line tools. It brings in the jemalloc library for better memory management. Whenever I run this Ruby executable, and try to profile it with vmmap, heap, or leaks, I get an error like this: `...
I'm working with a custom built Ruby, compiled and built on a Mac OS command line with standard XCode command line tools. It brings in the jemalloc library for better memory management. Whenever I run this Ruby executable, and try to profile it with vmmap, heap, or leaks, I get an error like this:
ruby -e "puts RUBY_VERSION; puts Process.pid; sleep" &
 59251

❯ 2.7.4
59251
heap 59251 > /dev/null
2022-03-08 17:45:04.966 heap[59276:1918119] *** Symbolication:  Couldn't load /opt/carrier/lib/libjemalloc.2.dylib to introspect target process's malloc zone named jemalloc_zone_0x106ba8a68: dlopen(/opt/carrier/lib/libjemalloc.2.dylib, 261): no suitable image found.  Did find:
  /opt/carrier/lib/libjemalloc.2.dylib: code signature in (/opt/carrier/lib/libjemalloc.2.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
2022-03-08 17:45:04.966 heap[59276:1918119] *** Symbolication:  no introspect structure for malloc zone jemalloc_zone_0x106ba8a68
2022-03-08 17:45:04.974 heap[59276:1918119] *** Symbolication:  no introspect structure for malloc zone jemalloc_zone_0x106ba8a68
Can anyone suggest how to resolve this?
Keith Bennett (1263 rep)
Mar 12, 2022, 10:50 AM • Last activity: Mar 13, 2022, 01:26 PM
40 votes
9 answers
33880 views
Ruby on OS X 10.9 Ignoring gems because extensions are not built
Every few days this will happen when doing various things in Ruby CLI (notably, using the `knife` utility for Chef) on OS X (unable to replicate in other environments; Linux, FreeBSD, etc.): Ignoring bcrypt-3.1.7 because its extensions are not built. Try: gem pristine bcrypt-3.1.7 Ignoring bigdecima...
Every few days this will happen when doing various things in Ruby CLI (notably, using the knife utility for Chef) on OS X (unable to replicate in other environments; Linux, FreeBSD, etc.): Ignoring bcrypt-3.1.7 because its extensions are not built. Try: gem pristine bcrypt-3.1.7 Ignoring bigdecimal-1.2.5 because its extensions are not built. Try: gem pristine bigdecimal-1.2.5 Ignoring ffi-yajl-1.1.0 because its extensions are not built. Try: gem pristine ffi-yajl-1.1.0 Ignoring gem-wrappers-1.2.5 because its extensions are not built. Try: gem pristine gem-wrappers-1.2.5 Ignoring gem-wrappers-1.2.4 because its extensions are not built. Try: gem pristine gem-wrappers-1.2.4 Ignoring pg-0.17.1 because its extensions are not built. Try: gem pristine pg-0.17.1 Ignoring psych-2.0.6 because its extensions are not built. Try: gem pristine psych-2.0.6 Ignoring sqlite3-1.3.9 because its extensions are not built. Try: gem pristine sqlite3-1.3.9 And while it's a simple fix, it keeps happening. Has anyone come across this before? $ ruby -v ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-darwin11.2.0]
tony_perkis666 (785 rep)
Oct 1, 2014, 04:53 PM • Last activity: Feb 8, 2022, 10:34 PM
0 votes
1 answers
338 views
Is it safe to switch to the brew ruby system-wide?
Is it safe to switch to the homebrew ruby version system-wide? Won't it break anything? The brew version is 3.0.3; the system version is 2.6.8p205. E.g., by adding the following lines to `.zshrc`: ``` export PATH="/opt/homebrew/opt/ruby/bin:$PATH" export LDFLAGS="-L/opt/homebrew/opt/ruby/lib" export...
Is it safe to switch to the homebrew ruby version system-wide? Won't it break anything? The brew version is 3.0.3; the system version is 2.6.8p205. E.g., by adding the following lines to .zshrc:
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/ruby/lib/pkgconfig"
Yurij (101 rep)
Jan 22, 2022, 01:33 PM • Last activity: Jan 22, 2022, 07:17 PM
0 votes
1 answers
134 views
Shell script for searching custom search engine no longer works in Catalina (Ruby)
I recently upgraded from Mac OS Mojave to Catalina. On Mojave, I used a quick action to perform web searches via Google's encrypted search engine at encrypted.google.com. The quick action script is `open "https://encrypted.google.com/search?q=$(ruby -rcgi -e 'print CGI.escape $<.read.chomp')"`. This...
I recently upgraded from Mac OS Mojave to Catalina. On Mojave, I used a quick action to perform web searches via Google's encrypted search engine at encrypted.google.com. The quick action script is open "https://encrypted.google.com/search?q=$(ruby -rcgi -e 'print CGI.escape $<.read.chomp')". This script no longer works in Catalina due to deprecated Ruby support. Does anyone know how I could script the same action in Catalina?
JQlo66WfDAoNbqE1 (21 rep)
Dec 20, 2021, 03:52 PM • Last activity: Dec 20, 2021, 04:29 PM
0 votes
2 answers
1460 views
Installing ruby 1.9 on Mac OS X 10.7
I'm trying to install Kitabu on Mac OS X 10.7.4. When I tried to use `gem install kitabu --pre` to install kitabu, I got an error ERROR: Error installing kitabu: kitabu requires Ruby version ~> 1.9. And the preinstalled ruby is not version 1.9. ruby -v ruby 1.8.7 (2011-12-28 patchlevel 357) [univers...
I'm trying to install Kitabu on Mac OS X 10.7.4. When I tried to use gem install kitabu --pre to install kitabu, I got an error ERROR: Error installing kitabu: kitabu requires Ruby version ~> 1.9. And the preinstalled ruby is not version 1.9. ruby -v ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] Can I update preinstalled ruby to 1.9? If that's not possible, how can I install ruby 1.9 so that I can run it when gem is executed?
prosseek (5726 rep)
Jun 10, 2012, 06:36 AM • Last activity: Aug 28, 2021, 05:45 AM
3 votes
2 answers
4628 views
How to install ruby gems without sudo
I want to install a Ruby Gem to my computer, but since I don't have an administrator account I can't use `sudo`. How do I install a Gem without `sudo`, and what (if any) privileges do I loose? This is in reference to [this question][1] I asked on Stack Overflow. Update: - I installed RVM, but I got...
I want to install a Ruby Gem to my computer, but since I don't have an administrator account I can't use sudo. How do I install a Gem without sudo, and what (if any) privileges do I loose? This is in reference to this question I asked on Stack Overflow. Update: - I installed RVM, but I got these two errors: WARNING: your RVM loading script /etc/profile.d/rvm.sh is deprecated and causes you to have umask g+w set in your shell, run rvm get head --auto-dotfiles again to fix your scripts. And WARNING: You have '~/.profile' file, you might want to load it, to do that add the following line to '/Users/CalebKleveter/.bash_profile': source ~/.profile I ran rvm get head --auto-dotfiles, but I got the same errors again. Any suggestions on what to do? And what does the second error message want me to do? Update 2: - I tried gem install cocoapods and I got the error in my other post, then I tried rvm gem install cocoapods and I got "Please note that rvm gem ... was removed, try gem install cocoapods or rvm all do gem install cocoapods instead. ( see: 'rvm usage' )" so I tried rvm all do gem install cocoapods and it just started a new command prompt, that is what is supposed to happen, right?
Caleb Kleveter (457 rep)
Oct 5, 2015, 03:17 PM • Last activity: May 28, 2021, 08:35 PM
2 votes
0 answers
939 views
Copy file in home directory during Homebrew formula install
Is it possible to create files outside of `/usr/local/Cellar` during a Homebrew formula installation? Here is my code: ```ruby def install cmd = "whoami; cd /Users/hughcrt; pwd; mkdir test" value = `#{cmd}` print value end ``` And when I do `brew install --build-from-source my-formula` I get: ``` mk...
Is it possible to create files outside of /usr/local/Cellar during a Homebrew formula installation? Here is my code:
def install           
    cmd = "whoami; cd /Users/hughcrt; pwd; mkdir test"
    value = #{cmd}
    print value
end
And when I do brew install --build-from-source my-formula I get:
mkdir: test: Operation not permitted
hughcrt
/Users/hughcrt
It don't understand why I can't create a file as the user in the script is hughcrt and I'm in the right directory
Hugh (373 rep)
Jan 8, 2021, 02:39 PM • Last activity: Jan 8, 2021, 02:54 PM
Showing page 1 of 20 total questions