Comments (3)
Hi.
According to https://stackoverflow.com/a/68118750/4432837 the Ruby version included by Apple is not really working. You have to install Ruby yourself, e.g. from homebrew -- see https://www.ruby-lang.org/en/documentation/installation/#homebrew
\edit: It might also work if you install the headers with something like sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
(adjust the version to match your system version!)
from colorls.
Funny thing is I resolved this issue just now and came to check if the issue was addressed yet.
Figured out by myself that I was being served by MacOS's bundled ruby which are of lower version. But I had Ruby 3.2+ installed via Homebrew and I just updated the $PATH when it indicated from in the prompt after trying:
brew install ruby
It says: echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc
So, after doing this, I had to reload .zshrc by:
source ~/.zshrc
And then sudo gem install colorls --user-install works just fine.
Also had to add /Users/lenin/.gem/ruby/3.2.0/bin to $PATH
from colorls.
The content of mkmf.log is:/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-22/2.6.0/clocale-0.0.4/mkmf.log
`"xcrun clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin22 -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/backward -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -DUSE_FFI_CLOSURE_ALLOC conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib -L. -L/AppleInternal/Library/BuildRoots/d9889869-120b-11ee-b796-7a03568b17ac/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.5.Internal.sdk/usr/local/lib -lruby.2.6 "
In file included from conftest.c:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char *argv)
4: {
5: return 0;
6: }
/ end */
`
from colorls.
Related Issues (20)
- Integrate Auto Library
- opensuse command defaults to colorls.ruby3.1
- Failing to install colorls on Ubuntu WSL HOT 2
- zsh: /usr/local/bin/colorls: bad interpreter: /usr/bin/ruby2.5: no such file or directory HOT 2
- Option for NOT human readable size - show file size in bytes HOT 5
- Distribute `colorls` as a standalone binary. HOT 2
- Icon for .fileextension HOT 2
- Fedora 37 upgradable for Fedora 38 HOT 1
- collect2 missing error install HOT 1
- Install failure on macOS Monterey M2 Chip HOT 1
- zsh: /usr/local/bin/colorls: bad interpreter: /usr/local/homebrew/opt/[email protected]/bin/ruby: no such file or directory HOT 2
- colorls -h shows help HOT 2
- Rounding bug for large files HOT 1
- How to make colorls running under specific ruby env using ruby-install?
- can't find gem colorls (>= 0.a) with executable colorls (Gem::GemNotFoundException)
- Installation problem on Windows. MSYS2 HOT 2
- Combination of flags not working with `spec`
- ERROR: While executing gem ... (Errno::EEXIST) File exists @ dir_s_mkdir - /usr/local/bin ON M1 Pro Sonoma 14.3
- -m Option does not work!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colorls.