Here's my terminal export:
Here for pod init:
Masons-iMac:GoodDays nacly$ ls
GoodDays GoodDaysTests
GoodDays.xcodeproj GoodDaysUITests
Masons-iMac:GoodDays nacly$ pod init
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
Here for cocoapods install:
Masons-iMac:GoodDays nacly$ sudo gem install cocoapods
Password:
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 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210114-6600-1nfobc.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/gem_make.out
A final note. I tried to update RubyGems:
Masons-iMac:GoodDays nacly$ gem update --system
Updating rubygems-update
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
I have also tried this:
Masons-iMac:GoodDays nacly$ sudo gem install cocoapods -n/usr/local/bin
Successfully installed nanaimo-0.3.0
Successfully installed colored2-3.1.2
Successfully installed claide-1.0.3
Successfully installed atomos-0.1.3
Successfully installed xcodeproj-1.19.0
Successfully installed ruby-macho-1.4.0
Successfully installed molinillo-0.6.6
Successfully installed gh_inspector-1.1.3
Successfully installed fourflusher-2.3.1
Successfully installed escape-0.0.4
Successfully installed cocoapods-try-1.2.0
Successfully installed netrc-0.11.0
Successfully installed cocoapods-trunk-1.5.0
Successfully installed cocoapods-search-1.0.0
Successfully installed cocoapods-plugins-1.0.0
Successfully installed cocoapods-downloader-1.4.0
Successfully installed cocoapods-deintegrate-1.0.4
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 ./siteconf20210114-6782-1lu9tjk.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/gem_make.out
Masons-iMac:GoodDays nacly$ ls
GoodDays GoodDaysTests
GoodDays.xcodeproj GoodDaysUITests
Masons-iMac:GoodDays nacly$ pod init
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
Related
I have installed the Cocoapods-art in the bundle using this command:
bundle exec gem install cocoapods-art
This is the success message:
Fetching cocoapods-art-1.0.4.gem
Successfully installed cocoapods-art-1.0.4
Parsing documentation for cocoapods-art-1.0.4
Done installing documentation for cocoapods-art after 0 seconds
1 gem installed
when I execute: bundle exec gem list, I don't see Cocoapods repo-art in the gem list.
When I try to add: pod repo-art add folderNamer, I get:
[!] Unknown command: `repo-art`
Did you mean: repo?
My problem was:
Installing cocoapods by gem in MacOS Catalina + Xcode 12.2, I got the error:
You have to install development tools first
...
checking for ffi.h... * extconf.rb failed *
Then I installed the cocoapods (1.10.1) by homebrew
brew install cocoapods
And the cocoapods-art was installed with gem
gem install cocoapods-art
At that moment, I was with the same error.
For me, its finally worked removing and installing again the cocoapods-art with sudo.
This troubleshooting - https://developer.apple.com/forums/thread/668456 don't resolving to use the last version of cocoapods ;)
I was getting same error with gem install cocoapods-art. Then I used the command sudo gem install cocoapods-art and it worked :)
OS: AMI 2018.03.0 (HVM)
Ruby version: 2.3.7p456 (2018-03-28 revision 63024) [x86_64-linux-gnu] - installed using yum install ruby23
gem install nokogiri throws:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /home/ec2-user/.gem/ruby/2.3/gems/nokogiri-
1.8.4/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20180801-6218-101te4s.rb extconf.rb
mkmf.rb can't find header files for ruby at
/usr/share/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /home/ec2-
user/.gem/ruby/2.3/gems/nokogiri-1.8.4 for inspection.
Results logged to /home/ec2-user/.gem/ruby/2.3/extensions/x86_64-
linux/2.3/nokogiri-1.8.4/gem_make.out
what am i missing here?
From the error output, it would seem it can't find the development dependencies for Ruby, which Nokogiri is trying to use in order to build the gem natively.
You can run yum -y install gcc ruby-devel rubygems to make certain the dependencies are installed.
Basing my answer somewhat from https://stackoverflow.com/a/4502672/1129980
Update
Tested this now on a new EC2 instance:
yum install -y ruby23-devel gcc libxml2 libxml2-devel libxslt libxslt-devel patch
gem install nokogiri --no-ri --no-rdoc
That works :)
Try running the below mentioned commands
sudo yum -y install ruby-dev ( or ruby-devel)
sudo yum -y install libgmp-dev libgmpxx4ldbl ruby-dev ruby2.3-dev
I did: sudo apt-get install ruby ruby-dev.
And i run: sudo gem install jekyll.
But it gives this output:
Building native extensions. This could take a while... ERROR: Error
installing jekyll: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 -r ./siteconf20151018-15792-1gfjwox.rb extconf.rb creating Makefile
make "DESTDIR=" clean sh: 1: make: not found
make "DESTDIR=" sh: 1: make: not found
make failed, exit code 127
Gem files will remain installed in
/var/lib/gems/2.1.0/gems/fast-stemmer-1.0.2 for inspection. Results
logged to
/var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/fast-stemmer-1.0.2/gem_make.out
You need to install make and other build tools first, run this:
sudo apt-get install build-essential
make: not found
This means that the program make (that is used to build libraries from code) is not present on your machine. You should try to install it with your package manager.
sudo apt-get cmake
might do the trick.
sudo apt-get install build-essential solves the issue for mysql gem failing due to make program failure for linux.
Im running terminal on Mac OSX 10.9.5 and had no problems installing the following:
Brew 0.9.5
Ruby 2.0.0p481
Sass 3.4.9
npm 2.20
Yeoman
Bower 1.3.12
Grunt-cli 0.1.13
After typing sudo gem install compass -V it installs a bunch of files but get's stuck here:
Building native extensions. This could take a while...
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150116-1042-1pd2lzv.rb extconf.rb
checking for ffi.h...
Any suggestions would be great.
When I try to do a bundle install I get the following json error. The bundle install does not complete. What gives?
Errno::EACCES: Permission denied - /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.7.5/.gitignore
An error occurred while installing json (1.7.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.5'` succeeds before bundling.
>>$ gem install json -v '1.7.5'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.7.5/.gitignore
EDIT: The sudo install command gives the following error:
>>$ sudo gem install json -v '1.7.5'
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/usr/local/Cellar/ruby/1.9.3-p194/bin/ruby extconf.rb
creating Makefile
make
sh: make: command not found
Gem files will remain installed in /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.7.5 for inspection.
Results logged to /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
you need to install ruby1.8-dev and not just ruby1.8, you are missing the development headers.
if on OSX:
sudo install ruby1.8-dev
if on unix
sudo aptitude install ruby1.8-dev
or
sudo apt-get install ruby1.8-dev
go into your directory with rubygems source and run:
sudo ruby setup.rb
after that run:
if on OSX:
sudo gem install json -v '1.7.5'
some unix system may need gem version command to work properly so you should run:
sudo gem1.8 install json -v '1.7.5'
Try using this script
sudo chown -R $USER /usr/local
Found the answer here: "sh: make: command not found" when running "$ bundle" after adding redcarpet gem to Rails app Needed to upgrade command line tools after installing Mountain Lion