After initially upgrading to 10.10 and XCode6-Beta, I tried to run 'pod update' and I received this error:
cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)
I tried to update Cocoapods using 'sudo gem install cocoapods', but received another error:
Fetching: xcodeproj-0.17.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby" -rubygems /Library/Ruby/Gems/2.0.0/gems/rake-10.1.1/bin/rake RUBYARCHDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext RUBYLIBDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** 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.
Even though I have installed XCode 6, I would like to use XCode 5 at this time because I want to make releases.
Related: Cocoapods with Xcode 6 and 10.10 Yosemite
You'll need to reinstall the cocoapod gem and use XCode6's Command Line Tools, as specified by this answer.
Then you can do a pod install and continue to use XCode5.
Just open the xcworkspace created in XCode5 instead of XCode6Beta.
Simply deleting ~/.rvm folder resolves the problems that arise from ruby/library version, ACL, and configuration conflicts. All your gems will have to be reinstalled but this is the simplest and cleanest solution I know of that works with Xcode 5. Just run
> sudo rm -rf ~/.rvm
in s.hell.
Related
Initially, I tried to install Ruby instead of using the on already on MacOS and installed cocoapods using gem install cocoapods however this wouldn't work and was giving the error:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
And also tried sudo gem install -n /usr/local/bin cocoapods which gave the error:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf60240306-20262-1w4q438.rb extconf.rb
checking for ffi.h... *** 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.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
For Ruby I am using version: ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
And when I tried to update the system using sudo gem update --system, it says "Latest version already installed. Done."
Then I downloaded Homebrew and tried to install cocoapods but again I got an error
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/xcodeproj
Target /usr/local/bin/xcodeproj
already exists. You may want to remove it:
rm '/usr/local/bin/xcodeproj'
To force the link and overwrite all conflicting files:
brew link --overwrite cocoapods
To list all files that would be deleted:
brew link --overwrite --dry-run cocoapods
Possible conflicting files are:
/usr/local/bin/xcodeproj
Then after following advice on another stackoverflow answer, I used brew link --overwrite cocoapods. However, now there is a problem with XCode and the iPhone device simulator won't connect - is showing no device.
I am getting this error during build time:
Showing Recent Messages
/Users/Developer/honours/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths
I am not too sure how to fix this and would really appreciate any help!
Solved my issue by using this website, step 4 was incredibly helpful! Then I resolved the issue I had with Xcode not being able to find the xcconfig file by using flutter build ios from this answer. By running flutter build, it told me what the issue was and how I could fix it - I needed to change the default signing identifier.
I was trying to install gem sqlite3 but failed with error below.
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/usr/local/opt/ruby/bin/ruby -r ./siteconf20151016-8328-1i1buur.rb extconf.rb --with-sqlite3-dir /usr/bin
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.
.....
I just searched through and solved it via installing XCode before installing sqlite3, can anyone tell me the reason? What does XCode actually do?
I am a newbie on those gem of Ruby.
Installing XCode (or more precisely the XCode command line tools) will also install the toolchain needed to compile the native extensions (written in C) needed by the sqlite3 gem.
I've been struggling to install jekyll on my mac, don't know much about ruby or configuring/debugging these messages.
I'm getting the following when running "sudo gem install jekyll"
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR="
make: *** No rule to make target `/include/universal-darwin13/ruby/config.h', needed by `porter.o'. Stop.
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2/ext/gem_make.out
"gcc --version" returns the following:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
use this command :
$ sudo xcode-select -r
then
$ sudo gem install jekyll
Hope this help you.
Besides upgrading xcode, as rayrashmi suggested, you have to actually open it so the command-line tools are properly installed.
(I am assuming you installed the command-line tools from xcode before upgrading to mavericks, if you haven't they're under Preferences → Downloads → Components, official info here.)
Then, just upgrade gem if you haven't already done so and install jekyll and any other library you were using, like pigments.
As they say, "worked for me."
I'm trying to install vagrant on MacOS (Lion). But it keeps failing.
What happens...
sudo gem update --system
sudo gem install vagrant
Building native extensions. This could take a while... ERROR: Error
installing vagrant: 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/ffi-1.0.11 for inspection. Results logged
to /Library/Ruby/Gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.out
I have XCode installed (installed it this morning from the AppStore).
Any ideas how I can fix this?
The problem was that XCode 4.3 doesn't in command line tools by default (not sure if this is the first version that doesn't do this). Installing them got it working.
Command Line Tools can be installed by going to Preferences > Downloads > Components.
I'm not sure why your build was failing, but starting with Vagrant 1.0 (not released yet, but RCs are out), the preferred installation method will be packages, so you can just download a pkg for Mac and install, even without XCode installed: http://downloads.vagrantup.com/
I've installed the newer version of SQLite3 (3.7.0.1) on my macbook (OS X 10.5) but 'sqlite3 --version' gives me the older version I had on my system:
$ sqlite3 --version
3.4.0
I suppose I was expecting this version to be overwritten but that doesn't seem to be the case. Can anyone clue me in? I'd really appreciate it, right now I'm trying to get started with Rails but I had received this error:
$ sudo gem install sqlite3-ruby
Password:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for #include <sqlite3.h>
... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for sqlite3_initialize()... no
sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade!
*** 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.
Oddly enough though since installing the new version of sqlite3 this error has gone away (in other words sqlite3-ruby was installed successfully) - but sqlite3 still points to 3.4.0, I've checked the directories in my $PATH and they only contain 3.7.0.1
Thanks in advance for any help.
Have you tried telling the OS to use the new one by typing hash sqlite3? Sometimes an OS remembers the original version and doesn't know to refresh itself and hash will poke it in the eye.
Otherwise you might need to tell the gem to look in the right place. Check into these options in the installer:
--with-sqlite3-dir
--with-sqlite3-include
--with-sqlite3-lib
I also face the same problem on my CentOS Server. I found this solution work for me. Hope it help! http://amitava1.blogspot.com/2010/08/ruby-on-rails-on-centos-55-with.html
main process:
$ wget http://www.sqlite.org/sqlite-amalgamation-3.7.0.1.tar.gz
$ tar xvzf sqlite-amalgamation-3.7.0.1.tar.gz
$ cd sqlite-3.7.0.1
$ ./configure --prefix=/opt/local/sqlite-3.7.0.1
$ make
$ sudo make install
$ sudo /opt/ruby-enterprise-1.8.7-2010.02/bin/gem install sqlite3-ruby -- --with-sqlite3-dir=/opt/local/sqlite-3.7.0.1
Building native extensions. This could take a while...
Successfully installed sqlite3-ruby-1.3.1
1 gem installed