I hope you all are doing well.
I'm facing issue while trying to init the pod in the project. Cocoapods is already installed in the system. XCode Dev intstall is also there, In XCode in command line the xcode version is also selected. Don't know what I'm missing. I have MacOS BigSur.
If I run pod --version command on terminal it gives me version of 1.8.4.
I'm attaching the screenshot if someone has faced this issue.
I have the same issue. I solved it by following these steps:
First uninstall cocoapods with the command:
brew uninstall cocoapods
Reinstall Cocoapods:
sudo gem install cocoapods
I don't know what went wrong, everything was working fine until terminal showed me Popup and my default terminal which used to open with nileshjha#Nileshs-MacBook-Air $ changed to nileshjha#Nileshs-MacBook-Air ~ % .. And after that pod stopped working. I tried all ways to change it back to previous . But didn't succeed.
Now when i am doing pod init , I am getting this error.
zsh: /usr/local/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory
Can you please help me out of this.
I have MacOS Catalina, and am trying to update cocoa pods.
I received an error when I tried running pod update
Here is the error message:
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
Next, I ran sudo gem install cocoapods
That was all that was needed. pod update worked fine after that
The same initial issue occurred when attempting to setup GoogleMaps in a Flutter app after running pod install on the iOS directory.
Running pod install the following error appeared:
zsh: /usr/local/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory
Next, after running sudo gem install cocoapods, that resulted in another error:
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
kevin recommends installing Xcode Developer Tools running:
xcode-select --install
and while highlighting the need to install the tools, the system again produced the same error as before when running the pod install command.
Refresing the tools by removing and reinstalling them became the next target. The tools are removed with the following command:
rm -rf /Library/Developer/CommandLineTools
And again installing the xcode developer tools using:
xcode-select --install
Then, sudo gem install cocoapods and pod install ran successfully.
I installed the latest Xcode 11 release (11A420a) on Mojave 10.14.6 and now homebrew fails with
Error: Xcode alone is not sufficient on Mojave.
Install the Command Line Tools:
xcode-select --install
The command line tools are installed
$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Any idea how to get past this?
Although your XCode is 11, your XCode Command Line tools are outdated. Upgrade the XCL according to the error message.
Turns out the system was confused about what was in /Library/Developer/CommandLineTools. So I removed that version and did xcode-select --install and everything is happy again.
Im trying to install Homebrew on a fresh install of MacOS Mojave 10.14 beta.
Yet after running /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" (this is from https://brew.sh)
I am getting the error,
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Failed during: /usr/bin/sudo /usr/bin/xcode-select --install
I have both the current command line tools from Xcode 9.4 and the beta command line tools for Xcode 10.0 beta.
Is there currently any workaround to allow me to install Homebrew?
I believe the problem is that the Command Line Tools for Xcode 10 do not install headers in /usr/include, but the install script checks there:
https://github.com/Homebrew/install/blob/bbf4a3a8b247c7dba159c3d557cc3853dd764171/install#L110
Thankfully, the code that tries to run xcode-select --install is bypassed if STDIN is not a TTY. Try adding a 0<&- after the install command to close STDIN and skip this command. I just tried it and it worked for me.
As an aside, Homebrew does not officially support 10.14 yet, and the maintainers do not want you to file issues about any problems you find. (Pull requests seem welcome, though.) Unfortunately this means that the Homebrew issue tracker is not a place to discuss problems and solutions.
I'm stuck trying to install rails on my mac. I have OS X 10.6.8 and I have confirmed that I have Ruby, version 1.8.7
I ran sudo gem update and sudo gem update --system to get the latest versions of the software.
However, when I run sudo gem install rails I get this error:
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/json-1.6.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/json-1.6.3/ext/json/ext/parser/gem_make.out
If you have XCode 4 or later you will need to open it and go to Preferences -> Downloads -> Components and install the Command Line tools as they aren't installed by default. Couldn't install Rails until this happened.
Im using osx 10.10. You can download from the command-line
xcode-select --install
Not sure what it needs to compile, but OSX can't compile any native ruby extensions at all unless the Apple developer tools are installed. On 10.7 Lion you can download it free from the app store, or Download it here for 10.6: http://developer.apple.com/xcode/index.php
It may also be on your OSX install discs, though probably much more out of date.
Did you install the OS X developer tools? You'll need to do this to be able to build native extensions
Just a follow up ...
it may be that you are on a mac and rails cannot find the right compiler for c headers.
just install xcode from apps store / homebrew or go to terminal ...
$ xcode-select --install
complete the installation and agree on the licensing etc, then ...
$ sudo gem install rails
There are two possible reasons for the fail:
PRIMARY REASON: Missing Xcode Command Line Tools
Verifying Xcode Command Line Tools Installation manually:
Check for presence of
"/usr/include/iconv.h" (if absent=>Missing or improperly installed Xcode CLT)
Installing Xcode CLT:
Try running xcode-select --install on terminal and follow the instructions. If it fails, open Xcode.app, select from menu "Xcode" - "Open Developer Tool" - "More Developer Tools" to open the developer site, download the installer for your OS version and run it.
SECONDARY REASON(if 1. fails): Version issues
Try upgrading the ruby version using rbenv.
Hope it helps!
Steps to sort out this issue:
Follow these steps unless error is fixed.
Open terminal and run commands:
sudo xcode-select --install
sudo xcodebuild -license accept
Make sure you have installed only one Xcode and it is the latest one. If more than one version is installed then keep only the latest one with name in applications like Xcode.app
Open Xcode->preferences->locations then check if any command line tools are selected; if not then select
Install Ruby by:
brew install ruby
Install CocoaPods by
sudo gem install cocoapods
Try to install Ruby via RVM. I solved in this way
How to install ruby on Ubuntu with rvm
The Command line tools didn't solve this issue for me.
I upgraded ruby installation through rbenv to 2.2.0, made that the global default ruby installation, and this issue was fixed.
Switch Ruby to Homebrew version:
$ brew install ruby
$ brew link --overwrite ruby
$ echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
$ echo 'export LDFLAGS="-L/usr/local/opt/ruby/lib"' >> ~/.bash_profile
$ echo 'export CPPFLAGS="-I/usr/local/opt/ruby/include"' >> ~/.bash_profile
Just had a similar issue. I can confirm that installing the command line tools fixes it.
https://stackoverflow.com/a/58226876/8070378
Solved after run:
sudo xcode-select --install
sudo xcodebuild -license accept
I had this problem on macOS Catalina 10.15.7, and it seems that Xcode 12.3's Ruby is a variant of 2.6, but my software needed 2.7.
I installed rvm and ran rvm install ruby-2.7, and now it works just fine 🎉