I am trying to use bundle install to install fastlane. I am having an issue installing one of the dependencies, json 2.6.1. I get the following error.
Fetching json 2.6.1
Installing json 2.6.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/json-2.6.1/ext/json/ext/generator
C:/tools/ruby30/bin/ruby.exe -I C:/tools/ruby30/lib/ruby/3.0.0 -r
./siteconf20211128-18184-scdpps.rb extconf.rb
creating Makefile
current directory:
C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/json-2.6.1/ext/json/ext/generator
make DESTDIR\= clean
current directory:
C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/json-2.6.1/ext/json/ext/generator
make DESTDIR\=
generating generator-x64-mingw32.def
compiling generator.c
In file included from generator.c:1:
../fbuffer/fbuffer.h:5:10: fatal error: ruby.h: No such file or directory
5 | #include "ruby.h"
| ^~~~~~~~
compilation terminated.
make: *** [Makefile:245: generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in
C:/tools/ruby30/lib/ruby/gems/3.0.0/gems/json-2.6.1 for inspection.
Results logged to
C:/tools/ruby30/lib/ruby/gems/3.0.0/extensions/x64-mingw32/3.0.0/json-2.6.1/gem_make.out
An error occurred while installing json (2.6.1), and Bundler cannot continue.
Make sure that `gem install json -v '2.6.1' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
fastlane was resolved to 2.198.1, which depends on
json
I have the following specs on my system.
windows 10
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
Gemfile
source "https://rubygems.org"
gem "fastlane"
Thanks for the help!
Related
Recently I cloned a project from one of my colleague which is React Native project with TypeScript. The project works fine in Android but failing in while running pod install
I have attached the whole error along with the React Native version.
Fetching ffi 1.15.5
Installing ffi 1.15.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/dev/Desktop/Grap Projects/my-app/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
/Users/dev/.rvm/rubies/ruby-2.7.5/bin/ruby -I /Users/dev/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0 -r ./siteconf20221205-14290-hsozy0.rb extconf.rb
checking for ffi_prep_closure_loc() in -lffi... no
checking for ffi_prep_closure_loc() in -llibffi... no
checking for ffi_prep_closure_loc() in -llibffi-8... no
checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS... no
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile
current directory: /Users/dev/Desktop/Grap Projects/rapp/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR=" clean
current directory: /Users/dev/Desktop/Grap /-app/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR="
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** ["/Users/dev/Desktop/Gr] Error 2
make failed, exit code 2
Gem files will remain installed in /Users/dev/Desktop/Projects//vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5 for inspection.
Results logged to /Users/dev/Desktop/G Projects/-app/vendor/bundle/ruby/2.7.0/extensions/arm64-darwin-22/2.7.0/ffi-1.15.5/gem_make.out
An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.15.5' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
cocoapods was resolved to 1.11.3, which depends on
cocoapods-core was resolved to 1.11.3, which depends on
typhoeus was resolved to 1.4.0, which depends on
ethon was resolved to 0.16.0, which depends on
ffi
➜ ios git:(dev)
I tried every possible way of resolving it but failed to do so. I even tried to create another project which works fine.
"react-native": "0.70.6",
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin22]
Gem File:
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.5'
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
When I run npx react-native projectname, the project is only created partially.
Now when I run bundle install I get:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
Make sure that "gem install ffi -v '1.15.5' --source 'https://rubygems.org/'" succeeds before bundling.
Using atomos 0.1.3
Using bundler 2.1.4
Using claide 1.1.0
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using netrc 0.11.0
Fetching ffi 1.15.5
Installing ffi 1.15.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: █████████████████████s/React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
█████████████/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0 -r ./siteconf20221129-56735-3mfz1o.rb
extconf.rb
checking for ffi_prep_closure_loc() in -lffi… no
checking for ffi_prep_closure_loc() in -llibffi… no
checking for ffi_prep_closure_loc() in -llibffi-8… no
checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS… no
checking for whether -pthread is accepted as LDFLAGS… yes
creating extconf.h
creating Makefile
current directory: █████████████████████React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR=" clean
current directory: █████████████████████React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR="
/bin/sh: -c: line 0: unexpected EOF while looking for matching
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** █████████████████████ Error 2
make failed, exit code 2
Gem files will remain installed in █████████████████████/React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5 for inspection.
Results logged to █████████████████████/React
Native/uber/vendor/bundle/ruby/2.7.0/extensions/arm64-darwin-21/2.7.0/ffi-1.15.5/gem_make.out
An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.15.5' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
cocoapods was resolved to 1.11.3, which depends on
cocoapods-core was resolved to 1.11.3, which depends on
typhoeus was resolved to 1.4.0, which depends on
ethon was resolved to 0.16.0, which depends on
ffi
Yes, I have installed the ffi 1.15.5 (below screenshot) but it is still saying I dont have it
█████████████████████ gem install ffi -v '1.15.5' --source 'https://rubygems.org/ '
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Parsing documentation for ffi-1.15.5
Done installing documentation for ffi after 0 seconds
1 gem installed
Ruby version: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin21]
pod --version: 1.11.3
I am impressed how difficult it is to start a project. Someone please help
I've been stuck with this problem for an hour. The fix would be initializing your project on a folder directory without space.
Try running npx react-native init on Desktop and it should work fine.
When I run npx react-native projectname, the project is only created partially.
Now when I run bundle install I get:
1. Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
2. An error occurred while installing ffi (1.15.5), and Bundler cannot continue. Make sure that "gem install ffi -v '1.15.5' --source 'https://rubygems.org/'" succeeds before bundling.
Using atomos 0.1.3
Using bundler 2.1.4
Using claide 1.1.0
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using netrc 0.11.0
Fetching ffi 1.15.5
Installing ffi 1.15.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: █████████████████████s/React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
█████████████████████/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0 -r ./siteconf20221129-56735-3mfz1o.rb
extconf.rb
checking for ffi_prep_closure_loc() in -lffi… no
checking for ffi_prep_closure_loc() in -llibffi… no
checking for ffi_prep_closure_loc() in -llibffi-8… no
checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS… no
checking for whether -pthread is accepted as LDFLAGS… yes
creating extconf.h
creating Makefile
current directory: █████████████████████React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR=" clean
current directory: █████████████████████React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c
make "DESTDIR="
/bin/sh: -c: line 0: unexpected EOF while looking for matching
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** █████████████████████ Error 2
make failed, exit code 2
Gem files will remain installed in █████████████████████/React
Native/uber/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5 for inspection.
Results logged to █████████████████████/React
Native/uber/vendor/bundle/ruby/2.7.0/extensions/arm64-darwin-21/2.7.0/ffi-1.15.5/gem_make.out
An error occurred while installing ffi (1.15.5), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.15.5' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
cocoapods was resolved to 1.11.3, which depends on
cocoapods-core was resolved to 1.11.3, which depends on
typhoeus was resolved to 1.4.0, which depends on
ethon was resolved to 0.16.0, which depends on
ffi
Yes, I have installed the ffi 1.15.5 (below screenshot) but it is still saying I dont have it
█████████████████████ gem install ffi -v '1.15.5' --source 'https://rubygems.org/ '
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Parsing documentation for ffi-1.15.5
Done installing documentation for ffi after 0 seconds
1 gem installed
Ruby version: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin21]
pod --version: 1.11.3
I am impressed how difficult it is to start a project. Someone please help
Try using expo. https://docs.expo.dev/get-started/create-a-new-app/
run npx create-expo-app my-app
this will create a new app called "my-app".
Or you could run npx create-expo-app --template to begin with a starter app. I like to use 'Navigation (TypeScript)'.
The expo link will explain how to set up your app and how to run your app in a simulator or with the expo go app on your phone. It's a great resource.
Hope that helped!
I have windows 10 and the terminal installed, and when I try and run bundle install I get this output:
Kalden#DESKTOP-KK2V578:/mnt/c/Users/Kalden/Desktop/ktane_voice-master$ bundle
The git source `git://github.com/watsonbox/pocketsphinx-ruby.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching gem metadata from https://rubygems.org/.........
Using bundler 1.16.1
Using coderay 1.1.1
Using espeak-ruby 1.0.2
Fetching ffi 1.9.10
Installing ffi 1.9.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180226-330-1hgm5yc.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10 for inspection.
Results logged to
/mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.10/gem_make.out
An error occurred while installing ffi (1.9.10), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.10'` succeeds before bundling.
In Gemfile:
pocketsphinx-ruby was resolved to 0.3.0, which depends on
ffi
Kalden#DESKTOP-KK2V578:/mnt/c/Users/Kalden/Desktop/ktane_voice-master$ sudo gem install ffi -v '1.9.10'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180226-376-15d5pse.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/ffi-1.9.10 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.10/gem_make.out
I'm trying to install Ruby/JSON on Mac OS X 10.11.
However, the gem install command gives the error message:
smcho#macho ruby-rails-sample> gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/Users/smcho/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20151025-39148-au2m2x.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
ld: warning: directory not found for option '-L/Users/haven/.sm/pkg/active/lib'
make "DESTDIR=" install
./install -m 0755 generator.bundle ./.gem.20151025-39148-i7g03f/json/ext
make: ./install: No such file or directory
make: *** [install-so] Error 1
make install failed, exit code 2
Gem files will remain installed in /Users/smcho/.rvm/gems/ruby-2.2.1/gems/json-1.8.3 for inspection.
Results logged to /Users/smcho/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/json-1.8.3/gem_make.out
The message says make: ./install: No such file or directory, but I'm not sure how to fix this issue.
Is this a known issue, or is there a way to bypass this one?
This is my system version. I executed gem update --system to get the latest version.
> ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
> gem -v
2.4.8
I should have used the latest ruby (2.2.3) not the old one (2.2.1)
ruby-rails-sample> rvm --default use 2.2.3
Using /Users/smcho/.rvm/gems/ruby-2.2.3
smcho#macho ruby-rails-sample> gem install json
Building native extensions. This could take a while...
Successfully installed json-1.8.3
Parsing documentation for json-1.8.3
Installing ri documentation for json-1.8.3
Done installing documentation for json after 1 seconds
1 gem installed