Open ewartx opened 6 years ago
+1 did you come up with a fix?
High Sierra uses ruby v2.3x as 2.0 seems to be deprecating. I found a workaround that involves installing ruby 2.0 via rvm. https://rvm.io/. Hopefully compass will compatibility in the future.
You can use the follow terminal commands
Compass should work as is afterwards. Good luck
+1 Sass and Compass all have the same problem. When Install again another problem comes like: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.
reinstall compass fix it sudo gem install -n /usr/local/bin compass
After upgrading to macOS High Sierra, get it fixed with following commands: sudo gem update --system sudo gem install -n /usr/local/bin cocoapods once it will be finished then write below command: pod install This solution has worked for me...!!!
I was able to fix it with a slightly modified answer from https://github.com/oklai/koala/issues/679
- Open Terminal
- Install Homebrew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Do not close Terminal, open Mac Appstore and check Update, install all XCode Command Line Tools updates OR in my case, XCode Command Line Tools started install automaticly throught Terminal right after step 2.
- Back to Terminal
- Install Ruby: brew install rbenv ruby-build
At this point, install Compass (instead of SASS in original answer)
- Install Compass gem: sudo gem install -n /usr/local/bin compass
Thanks @Mttylzq!
@ewartx yeah that worked beautiful! thanks,
I read this solution from another site. Mine is the Xcode problem. I have to agree with the xcode license (sudo xcodebuild -license
) after update to high Seria. I paste the solution here.
It depends on what each one of us has in her/his box. A quicker way to fix your issue is to read a log file it tells you exactly how to fix it if you have a recent Mac OS version 10.13.2. I read this thread and came across replies that say need to install xcode. I knew I installed xcode but anyways I tried again to install xcode and it says you have it installed. Hence this didn’t fix the issue in my case.
I went back to the error message “failed to build germ native extension” and searched in the bottom for the line where it says look into the log file. In my case the file name is mkmf.log and it gave me the location as well. I opened it and it says right there that “you didn’t agree to xcode …”, and I do have a habit to avoid signing or agreeing on anything so I must have skipped this step when I installed Xcode. It says to execute “sudo xcodebuild -license” which I did and followed the directions to agree. After that I was able to lunch the command “sudo gem install sass” and installed sass successfully.
to sum, each one of us has different setup on her/his machine, and in my humble view the quickest way to resolve the issues is to trust log files and stop ignoring it :slight_smile:
so much thx, @drewbrolik
Thanks so much! @drewbrolik
Thank thank you @drewbrolik :D
$ sudo gem install -n /usr/local/bin compass ERROR: While executing gem ... (TypeError) no implicit conversion of nil into String
Not familiar with compass but I've just upgraded to High Sierra and ruby -v
was telling me the same error until I did xcode-select --install
.
@drewbrolik was the good one for me (y)
I upgrade to High Sierra a couple of days ago, and after doing so, I found that git
wouldn't work. A search of the web lead me to use the xcode-select --install
command, which resolved that, however compass still responds with the error mentioned in the original post.
@duylinh : I attempted your method, it ran through a lengthly list of items it installed. I entered, "pod install" and I get the message:
[ ! ] No 'Podfile' found in the project directory.
@drewbrolik 's fix seems to have resolved the issue. Thank you.
duylinh's solution worked for me but I got this error after gem update --system Installing RubyGems 3.0.2 ERROR: While executing gem ... (Errno::EPERM) Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/gem
See: https://stackoverflow.com/questions/47171570/can-not-install-cocoapods-with-rubygem-2-7-1
running it (gem update --system) again came back with no errors and I proceeded. to run the next command.
After that pod install worked.
This was on High Sierra
I encountered the same as @nfranzmeier but on macOS 10.14.3 Mojave. Second time no error and got the message "Latest version already installed. Done."
zsh: /usr/local/bin/colorls: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory
I had this same issue while trying to use colorls
which I installed on Mojave but it happened after updating to Catalina. It appears Mojave uses Ruby v2.3.0 by default and the gems were installed to the associated directory. Catalina however uses 2.6 by default so reinstalling the gem worked well for me.
Hi @ifeoluwa-paystack I am having the same problem after upgrading to catalina. Can you post the solution? Thanks
Hi @fxgx99, it's Ifeoluwa with a different account. What worked for me was running gem install colorls
again. That installed it into the gem folder for Ruby 2.6 and everything started working fine.
I do not know if it's related but before I did this, I installed the xcode command line tools. I had to do that when I updated from Sierra to High Sierra and from High Sierra to Mojave so it was the first thing I did before anything else.
xcode-select --install
I am getting the same error message as the one in your post above. Except when I do gem install colorsls
I get the error: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
And when I do xcode-select --install
I get: xcode-select: error: command line tools are already installed, use "Software Update" to install updates
I am not sure where to got from here
@fxgx99, you need to run the command as super user, I forgot to mention. sudo gem install colorls
which prompts you for your password. Once you provide that, it gets installed.
It appears you have the command line tools installed so you do not need to run the xcode-select --install
command.
Sorry I forgot to mention that I am running the gem install colorls
with sudo
and still getting the same error: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.
I had the same issue
rbenv rehash
fixed it for me. Here's a PDF containing my entire terminal log session if you want to see everything I tried before:
You can search for ❯ to quickly jump through the commands tried, as seen here:
Note: this fixes the inline issue
zsh: /Users/alechp/.gem/ruby/2.3.0/bin/colorls: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory
however, there still seems to be an issue with sourcing the autocomplete path (ie. source $(dirname $(gem which colorls))/tab_complete.sh
per colorls install guide) upon opening a new terminal:
Hi @alechp unfortunately it still doesn't work. I "think" that I am struggling to link colorls to the 2.6 ruby version which comes with Catalina. Because the error message actually says the 2.3 version is no longer there. The installation must have removed it. Below is the screenshots of my error messages: Any help will be appreciated
I finally found a solution: so here is my solution for Catalina upgrade issue: I decided to reinstall everything: Install rvm from terminal: \curl -sSL https://get.rvm.io | bash -s stable
After installation complete, source the script with source /Users/{username}/.rvm/scripts/rvm
Install the ruby version: rvm install 2.6.5
now with right ruby version in place you should be able to install gems for the version you've chosen, mine was:
gem install colorls
And voila....
reinstall compass fix it sudo gem install -n /usr/local/bin compass
on macOS Catalina works too for me
reinstall compass fix it sudo gem install -n /usr/local/bin compass
on macOS Catalina works too for me
Same for cocoapods:
sudo gem install -n /usr/local/bin cocoapods
Hi I am still seeing same issue zsh: /usr/local/bin/foreman: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory
can fix for this, i tried every thing
I hackily fixed this issue by manually editing the pod
script file vi $(which pod)
, replace the shebang with the result of which ruby
...for example,#!/usr/bin/ruby
.
Run below command gurjindersingh$ sudo gem install -n /usr/local/bin cocoapods Then set command-line tools under locations in Xcode preferences.
This link and all of the above helped me solve this. Thanks! https://superuser.com/a/1490984/1141917
Whenever a compass command is run on the command line, I get this error:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory